Stsadm 與 Microsoft PowerShell mapping in SharePoint Server 中

 

**適用版本:**SharePoint Foundation 2013, SharePoint Server 2013 Enterprise, SharePoint Server 2013 Standard, SharePoint Server 2016

**上次修改主題的時間:**2017-08-24

**摘要:**列出 Stsadm 作業以及其對等PowerShell指令程式。

針對作業與 Cmdlet 之間不是一對一對應的情況,下表列出您必須使用以取得相同功能的特定 PowerShell 參數。

Stsadm 作業

Windows PowerShell Cmdlet

Activatefeature

Enable-SPFeature

Activateformtemplate

Enable-SPInfoPathFormTemplate

Addalternatedomain

New-SPAlternateUrl

Addcontentdb

Mount-SPContentDatabase

New-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 參數。

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

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(若要執行此指令程式,您必須是SharePoint Server安裝所在之電腦的本機管理員)。

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-SPEnterpriseSearchServiceInstance Cmdlet。

Osearchdiacriticsensitive

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

Profilechangelog

無。

但是,如果您以服務應用程式 (SA) 名稱取代共用服務提供者 (SSP) 名稱,您可以使用 Stsadm profilechangelog 作業:

stsadm -o profilechangelog
-title <SA name>
-daysofhistory <number of days>
-generateanniversaries

如需服務應用程式的詳細資訊,請參閱<關於 SharePoint Server 中的服務應用程式和服務>。

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

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

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

See also

Index of Microsoft PowerShell cmdlets for SharePoint Server