Stsadm 與 Windows PowerShell 的對應 (SharePoint Server 2010)

 

適用版本: SharePoint Foundation 2010, SharePoint Server 2010

上次修改主題的時間: 2015-03-09

本文列出 Stsadm 作業及其相對應的 Windows PowerShell Cmdlet;並針對作業與 Cmdlet 之間不是一對一對應的情況,提供列出您必須使用以取得相同功能的特定 Windows PowerShell 參數表格。

Stsadm 作業

Windows PowerShell Cmdlet

Activatefeature

Enable-SPFeature

Activateformtemplate

Enable-SPInfoPathFormTemplate

Addalternatedomain

New-SPAlternateUrl

Addcontentdb

Mount-SPContentDatabase

New-SPContentDatabase

Adddataconnectionfile

Install-SPDataConnectionFile

Add-ecsfiletrustedlocation

New-SPExcelFileLocation

Add-ecssafedataprovider

New-SPExcelDataProvider

Add-ecstrusteddataconnectionlibrary

New-SPExcelDataConnectionLibrary

Add-ecsuserdefinedfunction

New-SPExcelUserDefinedFunction

Addexemptuseragent

Add-SPInfoPathUserAgent

Addpath

New-SPManagedPath

Addpermissionpolicy

Addsolution

Add-SPSolution

Addtemplate

Install-SPWebTemplate

Adduser

New-SPUser

Addwppack

Install-SPWebPartPack

Addzoneurl

New-SPAlternateUrl

Allowuserformwebserviceproxy

Set-SPInfoPathWebServiceProxy

使用 AllowForUserFormsIdentity 參數。

Allowwebserviceproxy

Set-SPInfoPathWebServiceProxy

使用 AllowWebServiceProxyIdentity 參數。

Authentication

Set-SPWebApplication

使用 AuthenticationMethodAuthenticationProvider 參數。

Backup

Backup-SPConfigurationDatabase

Backup-SPFarm

Backup-SPSite

Backuphistory

Get-SPBackupHistory

Binddrservice

Blockedfilelist

Canceldeployment

Changepermissionpolicy

Copyappbincontent

Createadminvs

New-SPCentralAdministration

Creategroup

Createsite

New-SPSite

Createsiteinnewdb

New-SPSite 使用 ContentDatabase 參數。

New-SPContentDatabase

Createweb

New-SPWeb

Databaserepair

Deactivatefeature

Disable-SPFeature

Deactivateformtemplate

Disable-SPInfoPathFormTemplate

Deleteadminvs

Deletealternatedomain

Remove-SPAlternateUrl

Deleteconfigdb

Remove-SPConfigurationDatabase

Deletecontentdb

Dismount-SPContentDatabase

Deletegroup

Deletepath

Remove-SPManagedPath

Deletepermissionpolicy

Deletesite

Remove-SPSite

Deletesolution

Remove-SPSolution

Deletetemplate

Uninstall-SPWebTemplate

Deleteuser

Remove-SPUser

Deleteweb

Remove-SPWeb

Deletewppack

Uninstall-SPWebPartPack

Deletezoneurl

Remove-SPAlternateUrl

Deploysolution

Install-SPSolution

Deploywppack

Install-SPWebPartPack

Disablessc

Displaysolution

Get-SPSolution

Editcontentdeploymentpath

Set-SPContentDeploymentPath

Email

Enablessc

Enumalternatedomains

Get-SPAlternateURL

Enumcontentdbs

Get-SPContentDatabase

Enumdataconnectionfiledependants

Get-SPDataConnectionFileDependent

Enumdataconnectionfiles

Get-SPDataConnectionFile

Enumdeployments

Enumexemptuseragents

Get-SPInfoPathUserAgent

Enumformtemplates

Get-SPInfoPathFormTemplate

Enumgroups

Enumroles

Enumservices

Get-SPServiceInstance

Enumsites

Get-SPSiteAdministration (若要執行此 Cmdlet,您必須是伺服器陣列管理員群組的成員)。

Get-SPSite (若要執行此 Cmdlet,您必須是 SharePoint 2010 產品安裝所在之電腦上的本機管理員)。

Enumsolutions

Get-SPSolution

Enumsubwebs

Get-SPWeb

Enumtemplates

Get-SPWebTemplate

Enumusers

Get-SPUser

Enumwppacks

Get-SPWebPartPack

Enumzoneurls

Get-SPAlternateURL

Execadmsvcjobs

Start-SPAdminJob

Export

Export-SPWeb

Extendvs

New-SPWebApplication

Extendvsinwebfarm

New-SPWebApplicationExtension

Forcedeletelist

Getadminport

Get-SPWebApplication

使用下列語法:

Get-SPWebApplication -IncludeCentralAdministration | ? {$_.IsAdministrationWebApplication -eq $true}

Getdataconnectionfileproperty 屬性

Get-SPDataConnectionFile

使用下列語法:

Get-SPDataConnectionFile | where {$_.Name -eq "dataConFileName"} | format-list

Getformtemplateproperty 屬性

Get-SPInfoPathFormTemplate

使用下列語法:

Get-SPInfoPathFormTemplate | where {$_.DisplayName -eq "formTemplateName"} | format-list

Getosearchsetting

Getproperty

Get-SPFarmConfig

Get-SPTimerJob

Disable-SPTimerJob

Enable-SPTimerJob

Set-SPTimerJob

Start-SPTimerJob

Getsitelock

Get-SPSiteAdministration

Getsiteuseraccountdirectorypath

Geturlzone

Get-SPAlternateURL

Import

Import-SPWeb

Installfeature

Install-SPFeature

Listlogginglevels

Get-SPLogLevel

Listqueryprocessoroptions

Listregisteredsecuritytrimmers

Get-SPEnterpriseSearchSecurityTrimmer

Localupgradestatus

Managepermissionpolicylevel

Mergecontentdbs

Move-SPSite

Migrateuser

Move-SPUser

Osearch

若是 Osearch 參數 farmcontactemailfarmperformancelevelfarmserviceaccountfarmservicepassword,請使用 Get-SPEnterpriseSearchServiceSet-SPEnterpriseSearchService Cmdlet。

若是 Osearch 參數 startstop,請分別使用 Start-SPEnterpriseSearchServiceInstanceStop-SPEnterpriseSearchServiceInstance Cmdlet。

若是 Osearch 參數 defaultindexlocation,請使用 Get-SPEnterpriseSearchServiceInstanceSet-SPEnterpriseSearchServiceInstance Cmdlet。

Osearchdiacriticsensitive

使用 Get-SPEnterpriseSearchServiceApplication Cmdlet 擷取特定 Search Service 應用程式,然後從 Set-SPEnterpriseSearchServiceApplication Cmdlet 使用 DiacriticSensitive 參數。

Provisionservice

Start-SPServiceInstance

Quiescefarm

Quiescefarmstatus

Quiesceformtemplate

Stop-SPInfoPathFormTemplate

Reconvertallformtemplates

Update-SPInfoPathFormTemplate

Refreshdms

Refreshsitedms

Registersecuritytrimmer

New-SPEnterpriseSearchSecurityTrimmer

Registerwsswriter

Removedataconnectionfile

Uninstall-SPDataConnectionFile

Remove-ecsfiletrustedlocation

Remove-SPExcelFileLocation

Remove-ecssafedataprovider

Remove-SPExcelDataProvider

Remove-ecstrusteddataconnectionlibrary

Remove-SPExcelDataConnectionLibrary

Remove-ecsuserdefinedfunction

Remove-SPExcelFileLocation

Removedrservice

Removeexemptuseragent

Remove-SPInfoPathUserAgent

Removeformtemplate

Uninstall-SPInfoPathFormTemplate

Removesolutiondeploymentlock

Renameserver

Rename-SPServer

Renamesite

Set-SPSite

使用 Url 參數。

Renameweb

Set-SPWeb

使用 RelativeUrl 參數。

Restore

Restore-SPFarm

Restore-SPSite

Retractsolution

Uninstall-SPSolution

Retractwppack

Runcontentdeploymentjob

Start-SPContentDeploymentJob

Scanforfeatures

Install-SPFeature

使用 Scanforfeatures 參數。

Setadminport

Set-SPCentralAdministration

Setapppassword

Setconfigdb

Connect-SPConfigurationDatabase

Setcontentdeploymentjobschedule

Set-SPContentDeploymentJob

Setdataconnectionfileproperty

Set-SPDataConnectionFile

Set-ecsexternaldata

Set-SPExcelFileLocation

Set-ecsloadbalancing

Set-SPExcelServiceApplication

使用 LoadBalancingScheme 參數。

Set-ecsmemoryutilization

Set-SPExcelServiceApplication

使用 MemoryCacheThresholdPrivateBytesMax 參數。

Set-ecssecurity

Set-SPExcelServiceApplication

使用 CrossDomainAccessAllowedEncryptedUserConnectionRequiredFileAccessMethod 參數。

Set-ecssessionmanagement

Set-SPExcelServiceApplication

使用 SessionsPerUserMaxSiteCollectionAnonymousSessionsMax 參數。

Set-ecsworkbookcache

Set-SPExcelServiceApplication

使用 WorkbookcacheWorkbookCacheSizeMax 參數。

Setformtemplateproperty

Set-SPInfoPathFormTemplate

Setlogginglevel

Set-SPLogLevel

Setosearchsetting

Setproperty

Set-SPFarmConfig

Get-SPTimerJob

Disable-SPTimerJob

Enable-SPTimerJob

Set-SPTimerJob

Start-SPTimerJob

Setqueryprocessoroptions

Setsitelock

Set-SPSiteAdministration

使用 LockState 參數。

Setsiteuseraccountdirectorypath

Get-SPSiteSubscription

New-SPSiteSubscription

Remove-SPSiteSubscription

Setworkflowconfig

Set-SPWorkflowConfig

Siteowner

Set-SPSiteAdministration

Syncsolution

Install-SPSolution

使用 Synchronize 參數。

Unextendvs

Remove-SPWebApplication

Uninstallfeature

Uninstall-SPFeature

Unquiescefarm

Unquiesceformtemplate

Start-SPInfoPathFormTemplate

Unregistersecuritytrimmer

Remove-SPEnterpriseSearchSecurityTrimmer

Unregisterwsswriter

Updateaccountpassword

Set-SPManagedAccount

Updatealerttemplates

Updatefarmcredentials

Upgrade

Upgradeformtemplate

Install-SPInfoPathFormTemplate

Upgradesolution

Update-SPSolution

Upgradetargetwebapplication

Uploadformtemplate

Install-SPInfoPathFormTemplate

Userrole

Get-SPUser

Move-SPUser

New-SPUser

Remove-SPUser

Set-SPUser

Verifyformtemplate

Test-SPInfoPathFormTemplate