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 |
|
Activateformtemplate |
|
Addalternatedomain |
|
Addcontentdb |
|
Adddataconnectionfile |
|
Add-ecsfiletrustedlocation |
|
Add-ecssafedataprovider |
|
Add-ecstrusteddataconnectionlibrary |
|
Add-ecsuserdefinedfunction |
|
Addexemptuseragent |
|
Addpath |
|
Addpermissionpolicy |
无 |
Addsolution |
|
Addtemplate |
|
Adduser |
|
Addwppack |
|
Addzoneurl |
|
Allowuserformwebserviceproxy |
使用 AllowForUserForms 和 Identity 参数。 |
Allowwebserviceproxy |
使用 AllowWebServiceProxy 和 Identity 参数。 |
Authentication |
使用 AuthenticationMethod 或 AuthenticationProvider 参数。 |
Backup |
|
Backuphistory |
|
Binddrservice |
无 |
Blockedfilelist |
无 |
Canceldeployment |
无 |
Changepermissionpolicy |
无 |
Copyappbincontent |
无 |
Createadminvs |
|
Creategroup |
无 |
Createsite |
|
Createsiteinnewdb |
New-SPSite 使用 ContentDatabase 参数。 |
Createweb |
|
Databaserepair |
无 |
Deactivatefeature |
|
Deactivateformtemplate |
|
Deleteadminvs |
无 |
Deletealternatedomain |
|
Deleteconfigdb |
|
Deletecontentdb |
|
Deletegroup |
无 |
Deletepath |
|
Deletepermissionpolicy |
无 |
Deletesite |
|
Deletesolution |
|
Deletetemplate |
|
Deleteuser |
|
Deleteweb |
|
Deletewppack |
|
Deletezoneurl |
|
Deploysolution |
|
Deploywppack |
|
Disablessc |
无 |
Displaysolution |
|
Editcontentdeploymentpath |
|
无 |
|
Enablessc |
无 |
Enumalternatedomains |
|
Enumcontentdbs |
|
Enumdataconnectionfiledependants |
|
Enumdataconnectionfiles |
|
Enumdeployments |
无 |
Enumexemptuseragents |
|
Enumformtemplates |
|
Enumgroups |
无 |
Enumroles |
无 |
Enumservices |
|
Enumsites |
Get-SPSiteAdministration(要运行此 cmdlet,您必须是 Farm Administrators 组的成员。) Get-SPSite(要运行此 cmdlet,您必须是安装了 SharePoint 2010 产品 的计算机上的本地管理员。) |
Enumsolutions |
|
Enumsubwebs |
|
Enumtemplates |
|
Enumusers |
|
Enumwppacks |
|
Enumzoneurls |
|
Execadmsvcjobs |
|
Export |
|
Extendvs |
|
Extendvsinwebfarm |
|
Forcedeletelist |
无 |
Getadminport |
使用以下语法:
|
Getdataconnectionfileproperty 属性 |
使用以下语法:
|
Getformtemplateproperty 属性 |
使用以下语法:
|
Getosearchsetting |
无 |
Getproperty |
|
Getsitelock |
|
Getsiteuseraccountdirectorypath |
无 |
Geturlzone |
|
Import |
|
Installfeature |
|
Listlogginglevels |
|
Listqueryprocessoroptions |
无 |
Listregisteredsecuritytrimmers |
|
Localupgradestatus |
无 |
Managepermissionpolicylevel |
无 |
Mergecontentdbs |
|
Migrateuser |
|
Osearch |
对于 Osearch 参数 farmcontactemail、farmperformancelevel、farmserviceaccount 和 farmservicepassword,使用 Get-SPEnterpriseSearchService 和 Set-SPEnterpriseSearchService cmdlet。 对于 Osearch 参数 start 和 stop,分别使用 Start-SPEnterpriseSearchServiceInstance 和 Stop-SPEnterpriseSearchServiceInstance cmdlet。 对于 Osearch 参数 defaultindexlocation,使用 Get-SPEnterpriseSearchServiceInstance 和 Set-SPEnterpriseSearchServiceInstance cmdlet。 |
Osearchdiacriticsensitive |
使用 Get-SPEnterpriseSearchServiceApplication cmdlet 来检索特定的 Search Service 应用程序,然后从 Set-SPEnterpriseSearchServiceApplication cmdlet 中使用 DiacriticSensitive 参数。 |
Provisionservice |
|
Quiescefarm |
无 |
Quiescefarmstatus |
无 |
Quiesceformtemplate |
|
Reconvertallformtemplates |
|
Refreshdms |
无 |
Refreshsitedms |
无 |
Registersecuritytrimmer |
|
Registerwsswriter |
无 |
Removedataconnectionfile |
|
Remove-ecsfiletrustedlocation |
|
Remove-ecssafedataprovider |
|
Remove-ecstrusteddataconnectionlibrary |
|
Remove-ecsuserdefinedfunction |
|
Removedrservice |
无 |
Removeexemptuseragent |
|
Removeformtemplate |
|
Removesolutiondeploymentlock |
无 |
Renameserver |
|
Renamesite |
使用 Url 参数。 |
Renameweb |
使用 RelativeUrl 参数。 |
Restore |
|
Retractsolution |
|
Retractwppack |
无 |
Runcontentdeploymentjob |
|
Scanforfeatures |
使用 Scanforfeatures 参数。 |
Setadminport |
|
Setapppassword |
无 |
Setconfigdb |
|
Setcontentdeploymentjobschedule |
|
Setdataconnectionfileproperty |
|
Set-ecsexternaldata |
|
Set-ecsloadbalancing |
使用 LoadBalancingScheme 参数。 |
Set-ecsmemoryutilization |
使用 MemoryCacheThreshold 和 PrivateBytesMax 参数。 |
Set-ecssecurity |
使用 CrossDomainAccessAllowed、EncryptedUserConnectionRequired 和 FileAccessMethod 参数。 |
Set-ecssessionmanagement |
使用 SessionsPerUserMax 和 SiteCollectionAnonymousSessionsMax 参数。 |
Set-ecsworkbookcache |
使用 Workbookcache 和 WorkbookCacheSizeMax 参数。 |
Setformtemplateproperty |
|
Setlogginglevel |
|
Setosearchsetting |
无 |
Setproperty |
|
Setqueryprocessoroptions |
无 |
Setsitelock |
使用 LockState 参数。 |
Setsiteuseraccountdirectorypath |
|
Setworkflowconfig |
|
Siteowner |
|
Syncsolution |
使用 Synchronize 参数。 |
Unextendvs |
|
Uninstallfeature |
|
Unquiescefarm |
无 |
Unquiesceformtemplate |
|
Unregistersecuritytrimmer |
|
Unregisterwsswriter |
无 |
Updateaccountpassword |
|
Updatealerttemplates |
无 |
Updatefarmcredentials |
无 |
Upgrade |
无 |
Upgradeformtemplate |
|
Upgradesolution |
|
Upgradetargetwebapplication |
无 |
Uploadformtemplate |
|
Userrole |
|
Verifyformtemplate |