Stsadm 與 Microsoft PowerShell mapping in SharePoint Server 中Stsadm to Microsoft PowerShell mapping in SharePoint Server

摘要:列出 Stsadm 作業及其相對應的 PowerShell cmdlet。Summary: Lists Stsadm operations and their equivalent PowerShell cmdlets.

不是一對一對應的作業與 cmdlet 之間,表格列出您必須使用以取得相同功能的特定 PowerShell 參數。Where there is no one-to-one mapping between the operations and cmdlets, the table lists the specific PowerShell parameters you must use to get the same functionality.

Stsadm 作業Stsadm operation
Windows PowerShell cmdletWindows PowerShell cmdlet
ActivatefeatureActivatefeature
Enable-SPFeatureEnable-SPFeature
ActivateformtemplateActivateformtemplate
啟用 SPInfoPathFormTemplateEnable-SPInfoPathFormTemplate
AddalternatedomainAddalternatedomain
新 SPAlternateUrlNew-SPAlternateUrl
AddcontentdbAddcontentdb
Mount-spcontentdatabaseMount-SPContentDatabase
New-spcontentdatabaseNew-SPContentDatabase
AddexemptuseragentAddexemptuseragent
新增 SPInfoPathUserAgentAdd-SPInfoPathUserAgent
AddpathAddpath
新 SPManagedPathNew-SPManagedPath
AddpermissionpolicyAddpermissionpolicy
None
AddsolutionAddsolution
Add-SPSolutionAdd-SPSolution
AddtemplateAddtemplate
None
AdduserAdduser
New-SPUserNew-SPUser
AddwppackAddwppack
安裝 SPWebPartPackInstall-SPWebPartPack
AddzoneurlAddzoneurl
新 SPAlternateUrlNew-SPAlternateUrl
AllowuserformwebserviceproxyAllowuserformwebserviceproxy
Set-spinfopathwebserviceproxySet-SPInfoPathWebServiceProxy
使用AllowForUserFormsIdentity參數。Use the AllowForUserForms and Identity parameters.
AllowwebserviceproxyAllowwebserviceproxy
Set-spinfopathwebserviceproxySet-SPInfoPathWebServiceProxy
使用AllowWebServiceProxyIdentity參數。Use the AllowWebServiceProxy and Identity parameters.
驗證Authentication
Set-spwebapplication >Set-SPWebApplication
使用AuthenticationMethodAuthenticationProvider參數。Use the AuthenticationMethod or AuthenticationProvider parameters.
備份Backup
Backup-spconfigurationdatabase >Backup-SPConfigurationDatabase
Backup-SPFarmBackup-SPFarm
Backup-SPSiteBackup-SPSite
備份歷程記錄Backuphistory
取得 SPBackupHistoryGet-SPBackupHistory
BinddrserviceBinddrservice
None
BlockedfilelistBlockedfilelist
None
CanceldeploymentCanceldeployment
None
ChangepermissionpolicyChangepermissionpolicy
None
CopyappbincontentCopyappbincontent
None
CreateadminvsCreateadminvs
新 SPCentralAdministrationNew-SPCentralAdministration
CreategroupCreategroup
None
CreatesiteCreatesite
New-SPSiteNew-SPSite
CreatesiteinnewdbCreatesiteinnewdb
New-spsite使用ContentDatabase參數。New-SPSite Use the ContentDatabase parameter.
New-spcontentdatabaseNew-SPContentDatabase
CreatewebCreateweb
New-SPWebNew-SPWeb
DatabaserepairDatabaserepair
None
DeactivatefeatureDeactivatefeature
Disable-SPFeatureDisable-SPFeature
DeactivateformtemplateDeactivateformtemplate
Disable-spinfopathformtemplateDisable-SPInfoPathFormTemplate
DeleteadminvsDeleteadminvs
None
DeletealternatedomainDeletealternatedomain
Remove-spalternateurlRemove-SPAlternateUrl
DeleteconfigdbDeleteconfigdb
移除 SPConfigurationDatabaseRemove-SPConfigurationDatabase
DeletecontentdbDeletecontentdb
Dismount-spcontentdatabase >Dismount-SPContentDatabase
DeletegroupDeletegroup
None
DeletepathDeletepath
Remove-SPManagedPathRemove-SPManagedPath
DeletepermissionpolicyDeletepermissionpolicy
None
DeletesiteDeletesite
Remove-SPSiteRemove-SPSite
DeletesolutionDeletesolution
Remove-SPSolutionRemove-SPSolution
DeletetemplateDeletetemplate
None
DeleteuserDeleteuser
Remove-SPUserRemove-SPUser
DeletewebDeleteweb
Remove-SPWebRemove-SPWeb
DeletewppackDeletewppack
解除安裝 SPWebPartPackUninstall-SPWebPartPack
DeletezoneurlDeletezoneurl
Remove-spalternateurlRemove-SPAlternateUrl
DeploysolutionDeploysolution
Install-SPSolutionInstall-SPSolution
DeploywppackDeploywppack
安裝 SPWebPartPackInstall-SPWebPartPack
DisablesscDisablessc
None
DisplaysolutionDisplaysolution
Get-SPSolutionGet-SPSolution
EditcontentdeploymentpathEditcontentdeploymentpath
Set-spcontentdeploymentpathSet-SPContentDeploymentPath
EmailEmail
None
EnablesscEnablessc
None
EnumalternatedomainsEnumalternatedomains
Get-spalternateurl >Get-SPAlternateURL
EnumcontentdbsEnumcontentdbs
-Get-spcontentdatabaseGet-SPContentDatabase
EnumdataconnectionfiledependantsEnumdataconnectionfiledependants
Get-spdataconnectionfiledependentGet-SPDataConnectionFileDependent
EnumdataconnectionfilesEnumdataconnectionfiles
Get-spdataconnectionfileGet-SPDataConnectionFile
EnumdeploymentsEnumdeployments
None
EnumexemptuseragentsEnumexemptuseragents
取得 SPInfoPathUserAgentGet-SPInfoPathUserAgent
EnumformtemplatesEnumformtemplates
取得 SPInfoPathFormTemplateGet-SPInfoPathFormTemplate
EnumgroupsEnumgroups
None
EnumrolesEnumroles
None
EnumservicesEnumservices
Get-spserviceinstanceGet-SPServiceInstance
EnumsitesEnumsites
Get-spsiteadministration(若要執行此指令程式,您必須是伺服器陣列管理員 」 群組的成員)。Get-SPSiteAdministration (To run this cmdlet, you must be a member of the Farm Administrators group.)
Get-spsite(若要執行此指令程式,您必須是本機系統管理員在安裝 SharePoint Server 的電腦上)。Get-SPSite (To run this cmdlet, you must be a local administrator on the computer where SharePoint Server is installed.)
EnumsolutionsEnumsolutions
Get-SPSolutionGet-SPSolution
EnumsubwebsEnumsubwebs
Get-SPWebGet-SPWeb
EnumtemplatesEnumtemplates
Get-spwebtemplateGet-SPWebTemplate
EnumusersEnumusers
Get-SPUserGet-SPUser
EnumwppacksEnumwppacks
取得 SPWebPartPackGet-SPWebPartPack
EnumzoneurlsEnumzoneurls
Get-spalternateurl >Get-SPAlternateURL
ExecadmsvcjobsExecadmsvcjobs
Start-spadminjobStart-SPAdminJob
匯出Export
Export-SPWebExport-SPWeb
ExtendvsExtendvs
新 SPWebApplicationNew-SPWebApplication
ExtendvsinwebfarmExtendvsinwebfarm
新 SPWebApplicationExtensionNew-SPWebApplicationExtension
ForcedeletelistForcedeletelist
None
GetadminportGetadminport
Get-spwebapplicationGet-SPWebApplication
使用下列語法:Use the following syntax:
Get-spwebapplication IncludeCentralAdministrationGet-SPWebApplication -IncludeCentralAdministration
Getdataconnectionfileproperty屬性Getdataconnectionfileproperty property
Get-spdataconnectionfileGet-SPDataConnectionFile
使用下列語法:Use the following syntax:
Get-spdataconnectionfileGet-SPDataConnectionFile
Getformtemplateproperty屬性Getformtemplateproperty property
取得 SPInfoPathFormTemplateGet-SPInfoPathFormTemplate
使用下列語法:Use the following syntax:
Get-SPInfoPathFormTemplateGet-SPInfoPathFormTemplate
GetosearchsettingGetosearchsetting
None
GetpropertyGetproperty
Get-spfarmconfig >Get-SPFarmConfig
Get-sptimerjob >Get-SPTimerJob
Disable-sptimerjob >Disable-SPTimerJob
Enable-sptimerjob >Enable-SPTimerJob
Set-sptimerjob >Set-SPTimerJob
Start-sptimerjobStart-SPTimerJob
GetsitelockGetsitelock
Get-spsiteadministrationGet-SPSiteAdministration
GetsiteuseraccountdirectorypathGetsiteuseraccountdirectorypath
None
GeturlzoneGeturlzone
Get-spalternateurl >Get-SPAlternateURL
匯入Import
Import-SPWebImport-SPWeb
InstallfeatureInstallfeature
Install-SPFeatureInstall-SPFeature
ListlogginglevelsListlogginglevels
Get-sploglevelGet-SPLogLevel
ListqueryprocessoroptionsListqueryprocessoroptions
None
ListregisteredsecuritytrimmersListregisteredsecuritytrimmers
取得 SPEnterpriseSearchSecurityTrimmerGet-SPEnterpriseSearchSecurityTrimmer
LocalupgradestatusLocalupgradestatus
None
ManagepermissionpolicylevelManagepermissionpolicylevel
None
MergecontentdbsMergecontentdbs
Move-SPSiteMove-SPSite
MigrateuserMigrateuser
Move-SPUserMove-SPUser
OsearchOsearch
Osearch參數farmcontactemailfarmperformancelevelfarmserviceaccountfarmservicepassword,使用Get-spenterprisesearchserviceSet-spenterprisesearchservice指令程式。For the Osearch parameters farmcontactemail, farmperformancelevel, farmserviceaccount, and farmservicepassword, use the Get-SPEnterpriseSearchService and Set-SPEnterpriseSearchService cmdlets.
若是Osearch參數啟動停止,請分別使用Start-spenterprisesearchserviceinstanceStop-spenterprisesearchserviceinstance cmdlet。For the Osearch parameters start and stop, use the Start-SPEnterpriseSearchServiceInstance and Stop-SPEnterpriseSearchServiceInstance cmdlets, respectively.
若是Osearch參數defaultindexlocation,請使用Get-spenterprisesearchserviceinstance cmdlet。For the Osearch parameter defaultindexlocation, use the Get-SPEnterpriseSearchServiceInstance cmdlet.
OsearchdiacriticsensitiveOsearchdiacriticsensitive
使用Get-spenterprisesearchserviceapplication cmdlet 擷取特定的 Search service 應用程式,然後使用DiacriticSensitive參數從Set-spenterprisesearchserviceapplication cmdlet。Use the Get-SPEnterpriseSearchServiceApplication cmdlet to retrieve the specific Search service application, and then use DiacriticSensitive parameter from the Set-SPEnterpriseSearchServiceApplication cmdlet.
ProfilechangelogProfilechangelog
無。None.
不過,您可以使用 Stsadm profilechangelog作業如果您使用的服務應用程式 (SA) 名稱取代共用服務提供者 (SSP) 名稱:However, you can use the Stsadm profilechangelog operation if you replace the Shared Services Provider (SSP) name with the service application (SA) name:
stsadm -o profilechangelog-title <SA name>-daysofhistory <number of days>-generateanniversaries
ProvisionserviceProvisionservice
Start-spserviceinstanceStart-SPServiceInstance
QuiescefarmQuiescefarm
None
QuiescefarmstatusQuiescefarmstatus
None
QuiesceformtemplateQuiesceformtemplate
停駐點 SPInfoPathFormTemplateStop-SPInfoPathFormTemplate
ReconvertallformtemplatesReconvertallformtemplates
更新 SPInfoPathFormTemplateUpdate-SPInfoPathFormTemplate
RefreshdmsRefreshdms
None
RefreshsitedmsRefreshsitedms
None
RegistersecuritytrimmerRegistersecuritytrimmer
新 SPEnterpriseSearchSecurityTrimmerNew-SPEnterpriseSearchSecurityTrimmer
RegisterwsswriterRegisterwsswriter
None
RemovedataconnectionfileRemovedataconnectionfile
解除安裝之 SPDataConnectionFileUninstall-SPDataConnectionFile
RemovedrserviceRemovedrservice
None
RemoveexemptuseragentRemoveexemptuseragent
移除 SPInfoPathUserAgentRemove-SPInfoPathUserAgent
RemoveformtemplateRemoveformtemplate
解除安裝 SPInfoPathFormTemplateUninstall-SPInfoPathFormTemplate
RemovesolutiondeploymentlockRemovesolutiondeploymentlock
None
RenameserverRenameserver
Rename-SPServerRename-SPServer
RenamesiteRenamesite
Set-SPSiteSet-SPSite
使用Url參數。Use the Url parameter.
RenamewebRenameweb
Set-SPWebSet-SPWeb
使用RelativeUrl參數。Use the RelativeUrl parameter.
還原Restore
Restore-SPFarmRestore-SPFarm
Restore-SPSiteRestore-SPSite
RetractsolutionRetractsolution
Uninstall-SPSolutionUninstall-SPSolution
RetractwppackRetractwppack
None
RuncontentdeploymentjobRuncontentdeploymentjob
Start-spcontentdeploymentjobStart-SPContentDeploymentJob
ScanforfeaturesScanforfeatures
Install-SPFeatureInstall-SPFeature
使用Scanforfeatures參數。Use the Scanforfeatures parameter.
SetadminportSetadminport
Set-spcentraladministrationSet-SPCentralAdministration
SetapppasswordSetapppassword
None
SetconfigdbSetconfigdb
連線 SPConfigurationDatabaseConnect-SPConfigurationDatabase
SetcontentdeploymentjobscheduleSetcontentdeploymentjobschedule
Set-spcontentdeploymentjobSet-SPContentDeploymentJob
SetdataconnectionfilepropertySetdataconnectionfileproperty
Set-spdataconnectionfileSet-SPDataConnectionFile
SetformtemplatepropertySetformtemplateproperty
設定 SPInfoPathFormTemplateSet-SPInfoPathFormTemplate
SetlogginglevelSetlogginglevel
Set-sploglevelSet-SPLogLevel
SetosearchsettingSetosearchsetting
None
SetpropertySetproperty
Set-spfarmconfigSet-SPFarmConfig
Get-sptimerjob >Get-SPTimerJob
Disable-sptimerjob >Disable-SPTimerJob
Enable-sptimerjob >Enable-SPTimerJob
Set-sptimerjob >Set-SPTimerJob
Start-sptimerjobStart-SPTimerJob
SetqueryprocessoroptionsSetqueryprocessoroptions
None
SetsitelockSetsitelock
設定 SPSiteAdministrationSet-SPSiteAdministration
使用LockState參數。Use the LockState parameter.
SetsiteuseraccountdirectorypathSetsiteuseraccountdirectorypath
取得 SPSiteSubscriptionGet-SPSiteSubscription
新 SPSiteSubscriptionNew-SPSiteSubscription
Remove-spsitesubscriptionRemove-SPSiteSubscription
SetworkflowconfigSetworkflowconfig
Set-spworkflowconfigSet-SPWorkflowConfig
SiteownerSiteowner
設定 SPSiteAdministrationSet-SPSiteAdministration
SyncsolutionSyncsolution
Install-SPSolutionInstall-SPSolution
使用Synchronize參數。Use the Synchronize parameter.
UnextendvsUnextendvs
移除 SPWebApplicationRemove-SPWebApplication
UninstallfeatureUninstallfeature
Uninstall-SPFeatureUninstall-SPFeature
UnquiescefarmUnquiescefarm
None
UnquiesceformtemplateUnquiesceformtemplate
開始 SPInfoPathFormTemplateStart-SPInfoPathFormTemplate
UnregistersecuritytrimmerUnregistersecuritytrimmer
移除 SPEnterpriseSearchSecurityTrimmerRemove-SPEnterpriseSearchSecurityTrimmer
UnregisterwsswriterUnregisterwsswriter
None
UpdateaccountpasswordUpdateaccountpassword
Set-spmanagedaccountSet-SPManagedAccount
UpdatealerttemplatesUpdatealerttemplates
None
UpdatefarmcredentialsUpdatefarmcredentials
None
UpgradeUpgrade
None
UpgradeformtemplateUpgradeformtemplate
Install-spinfopathformtemplateInstall-SPInfoPathFormTemplate
UpgradesolutionUpgradesolution
Update-SPSolutionUpdate-SPSolution
UpgradetargetwebapplicationUpgradetargetwebapplication
None
UploadformtemplateUploadformtemplate
Install-spinfopathformtemplateInstall-SPInfoPathFormTemplate
UserroleUserrole
Get-SPUserGet-SPUser
Move-SPUserMove-SPUser
New-SPUserNew-SPUser
Remove-SPUserRemove-SPUser
Set-SPUserSet-SPUser
VerifyformtemplateVerifyformtemplate
Test-spinfopathformtemplateTest-SPInfoPathFormTemplate

另請參閱See also

其他資源Other Resources

Index of Microsoft PowerShell cmdlets for SharePoint ServerIndex of Microsoft PowerShell cmdlets for SharePoint Server