Stsadm 與 Microsoft PowerShell mapping in SharePoint Server 中

適用于:yes-img-132013 yes-img-16 2016yes-img-192019 yes-img-se訂閱版本 no-img-sopMicrosoft 365 中的 SharePoint

當作業和 Cmdlet 之間沒有一對一對應時,資料表會列出您必須用來取得相同功能的特定 PowerShell 參數。

   
Stsadm 作業 Windows PowerShell Cmdlet
Activatefeature Enable-SPFeature
Activateformtemplate Enable-SPInfoPathFormTemplate
Addalternatedomain New-SPAlternateUrl
Addcontentdb Mount-SPContentDatabaseNew-SPContentDatabase
Addexemptuseragent Add-SPInfoPathUserAgent
Addpath New-SPManagedPath
Addpermissionpolicy
Addsolution Add-SPSolution
Addtemplate
Adduser New-SPUser
Addwppack Install-SPWebPartPack
Addzoneurl New-SPAlternateUrl
Allowuserformwebserviceproxy Set-SPInfoPathWebServiceProxy 使用 AllowForUserFormsIdentity 參數。
Allowwebserviceproxy Set-SPInfoPathWebServiceProxy 使用 AllowWebServiceProxyIdentity 參數。
驗證 Set-SPWebApplication 使用 AuthenticationMethodAuthenticationProvider 參數。
備份 Backup-SPConfigurationDatabaseBackup-SPFarmBackup-SPSite
Backuphistory Get-SPBackupHistory
Binddrservice
Blockedfilelist
Canceldeployment
Changepermissionpolicy
Copyappbincontent Install-SPApplicationContent
Createadminvs New-SPCentralAdministration
Creategroup
Createsite New-SPSite
Createsiteinnewdb New-SPSite 使用 ContentDatabase 參數。 New-SPContentDatabase
Createweb New-SPWeb
Databaserepair 使用 Get-SPContentDatabaseOrphanedData 偵測孤立的資料,但請注意,它不會修復孤立的資料。
Deactivatefeature Disable-SPFeature
Deactivateformtemplate Disable-SPInfoPathFormTemplate
Deleteadminvs Remove-SPCentralAdministration
Deletealternatedomain Remove-SPAlternateUrl
Deleteconfigdb Disconnect-SPConfigurationDatabase
Deletecontentdb Dismount-SPContentDatabase
Deletegroup
Deletepath Remove-SPManagedPath
Deletepermissionpolicy
Deletesite Remove-SPSite
Deletesolution Remove-SPSolution
Deletetemplate
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
電子郵件 使用 Set-SPWebApplication 搭配 -SMTPServer 參數集。
Enablessc
Enumallwebs Get-SPContentDatabaseOrphanedData
Enumalternatedomains Get-SPAlternateURL
Enumcontentdbs Get-SPContentDatabase
Enumdataconnectionfiledependants Get-SPDataConnectionFileDependent
Enumdataconnectionfiles Get-SPDataConnectionFile
列舉部署
Enumexemptuseragents Get-SPInfoPathUserAgent
列舉範本 Get-SPInfoPathFormTemplate
列舉群組
列舉
列舉服務 Get-SPServiceInstance
列舉 Get-SPSiteAdministration (若要執行此 Cmdlet,您必須是伺服器陣列管理員群組的成員。) Get-SPSite (若要執行此 Cmdlet,您必須是安裝 SharePoint Server 之電腦上的本機系統管理員。)
列舉 Get-SPSolution
Enumsubwebs Get-SPWeb
列舉範本 Get-SPWebTemplate
列舉值 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-SPFarmConfigGet-SPTimerJobDisable-SPTimerJobEnable-SPTimerJobSet-SPTimerJobStart-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-SPEnterpriseSearchServiceInstance Cmdlet。
Osearchdiacriticsensitive 使用 Get-SPEnterpriseSearchServiceApplication Cmdlet 擷取特定 Search Service 應用程式,然後從 Set-SPEnterpriseSearchServiceApplication Cmdlet 使用 DiacriticSensitive 參數。
Profilechangelog 無。 不過,如果您將共用服務提供者 (SSP) 名稱取代為服務應用程式 (SA) 名稱,則可以使用 Stsadm profilechangelog 作業: stsadm -o profilechangelog-title <SA name>-daysofhistory <number of days>-generateanniversaries
Provisionservice Start-SPServiceInstance
Quiescefarm
Quiescefarmstatus
Quiesceformtemplate Stop-SPInfoPathFormTemplate
Reconvertallformtemplates Update-SPInfoPathFormTemplate
Refreshdms
Refreshsitedms
Registersecuritytrimmer New-SPEnterpriseSearchSecurityTrimmer
Registerwsswriter
Removedataconnectionfile Uninstall-SPDataConnectionFile
Removedrservice
Removeexemptuseragent Remove-SPInfoPathUserAgent
Removeformtemplate Uninstall-SPInfoPathFormTemplate
Removesolutiondeploymentlock
Renameserver Rename-SPServer
Renamesite Set-SPSite 使用 Url 參數。
Renameweb Set-SPWeb 使用 RelativeUrl 參數。
還原 Restore-SPFarmRestore-SPSite
Retractsolution Uninstall-SPSolution
Retractwppack
Runcontentdeploymentjob Start-SPContentDeploymentJob
Scanforfeatures Install-SPFeature 使用 Scanforfeatures 參數。
Setadminport Set-SPCentralAdministration
Setapppassword Set-SPApplicationCredentialKeyRemove-SPApplicationCredentialKey
Setconfigdb Connect-SPConfigurationDatabase
Setcontentdeploymentjobschedule Set-SPContentDeploymentJob
Setdataconnectionfileproperty Set-SPDataConnectionFile
Setformtemplateproperty Set-SPInfoPathFormTemplate
Setlogginglevel Set-SPLogLevel
Setosearchsetting
Setproperty Set-SPFarmConfigGet-SPTimerJobDisable-SPTimerJobEnable-SPTimerJobSet-SPTimerJobStart-SPTimerJob
Setqueryprocessoroptions
Setsitelock Set-SPSiteAdministration 使用 LockState 參數。
Setsiteuseraccountdirectorypath Get-SPSiteSubscriptionNew-SPSiteSubscriptionRemove-SPSiteSubscription
Setworkflowconfig Set-SPWorkflowConfig
Siteowner Set-SPSiteAdministration
同步處理 Update-SPProfileSyncClear-SPContentDatabaseSyncDataGet-SPContentDatabase (與 -DaysSinceLastProfileSync 參數)
Syncsolution Install-SPSolution 使用 Synchronize 參數。
Unextendvs Remove-SPWebApplication
Uninstallfeature Uninstall-SPFeature
Unquiescefarm
Unquiesceformtemplate Start-SPInfoPathFormTemplate
Unregistersecuritytrimmer Remove-SPEnterpriseSearchSecurityTrimmer
Unregisterwsswriter
Updateaccountpassword Set-SPManagedAccount
Updatealerttemplates
Updatefarmcredentials
升級
Upgradeformtemplate Install-SPInfoPathFormTemplate
Upgradesolution Update-SPSolution
Upgradetargetwebapplication
Uploadformtemplate Install-SPInfoPathFormTemplate
Userrole Get-SPUserMove-SPUserNew-SPUserRemove-SPUserSet-SPUser
Verifyformtemplate Test-SPInfoPathFormTemplate

另請參閱

其他資源

Index of Microsoft PowerShell cmdlets for SharePoint Server