stsadm命令对应的power shell命令的对照表

熟悉SharePoint 2007的朋友对stsadm命令一定不陌生, 在SharePoint 2010里, 开始使用power shell是不是就有点不知所措了呢? 没关系, 这个列表会让你找回一点熟悉的感觉.

 

Stsadm operation

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

None

Addsolution

Add-SPSolution

Addtemplate

Install-SPWebTemplate

Adduser

New-SPUser

Addwppack

Install-SPWebPartPack

Addzoneurl

New-SPAlternateUrl

Allowuserformwebserviceproxy

Set-SPInfoPathWebServiceProxy

Use the AllowForUserForms and Identity parameters.

Allowwebserviceproxy

Set-SPInfoPathWebServiceProxy

Use the AllowWebServiceProxy and Identity parameters.

Authentication

Set-SPWebApplication

Use the AuthenticationMethod or AuthenticationProvider parameters.

Backup

Backup-SPConfigurationDatabase

Backup-SPFarm

Backup-SPSite

Backuphistory

Get-SPBackupHistory

Binddrservice

None

Blockedfilelist

None

Canceldeployment

None

Changepermissionpolicy

None

Copyappbincontent

None

Createadminvs

New-SPCentralAdministration

Creategroup

None

Createsite

New-SPSite

Createsiteinnewdb

New-SPSite Use the ContentDatabase parameter.

New-SPContentDatabase

Createweb

New-SPWeb

Databaserepair

None

Deactivatefeature

Disable-SPFeature

Deactivateformtemplate

Disable-SPInfoPathFormTemplate

Deleteadminvs

None

Deletealternatedomain

Remove-SPAlternateUrl

Deleteconfigdb

Remove-SPConfigurationDatabase

Deletecontentdb

Dismount-SPContentDatabase

Deletegroup

None

Deletepath

Remove-SPManagedPath

Deletepermissionpolicy

None

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

None

Displaysolution

Get-SPSolution

Editcontentdeploymentpath

Set-SPContentDeploymentPath

Email

None

Enablessc

None

Enumalternatedomains

Get-SPAlternateURL

Enumcontentdbs

Get-SPContentDatabase

Enumdataconnectionfiledependants

Get-SPDataConnectionFileDependent

Enumdataconnectionfiles

Get-SPDataConnectionFile

Enumdeployments

None

Enumexemptuseragents

Get-SPInfoPathUserAgent

Enumformtemplates

Get-SPInfoPathFormTemplate

Enumgroups

None

Enumroles

None

Enumservices

Get-SPServiceInstance

Enumsites

Get-SPSiteAdministration (To run this cmdlet, you must be a member of the Farm Administrators group.)

Get-SPSite (To run this cmdlet, you must be a local administrator on the computer where SharePoint 2010 Products is installed.)

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

None

Getadminport

Get-SPWebApplication

Use the following syntax:

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

Getdataconnectionfileproperty property

Get-SPDataConnectionFile

Use the following syntax:

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

Getformtemplateproperty property

Get-SPInfoPathFormTemplate

Use the following syntax:

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

Getosearchsetting

None

Getproperty

Get-SPFarmConfig

Get-SPTimerJob

Disable-SPTimerJob

Enable-SPTimerJob

Set-SPTimerJob

Start-SPTimerJob

Getsitelock

Get-SPSiteAdministration

Getsiteuseraccountdirectorypath

None

Geturlzone

Get-SPAlternateURL

Import

Import-SPWeb

Installfeature

Install-SPFeature

Listlogginglevels

Get-SPLogLevel

Listqueryprocessoroptions

None

Listregisteredsecuritytrimmers

Get-SPEnterpriseSearchSecurityTrimmer

Localupgradestatus

None

Managepermissionpolicylevel

None

Mergecontentdbs

Move-SPSite

Migrateuser

Move-SPUser

Osearch

For the Osearch parameters farmcontactemail, farmperformancelevel, farmserviceaccount, and farmservicepassword, use the Get-SPEnterpriseSearchService and Set-SPEnterpriseSearchService cmdlets.

For the Osearch parameters start and stop, use the Start-SPEnterpriseSearchServiceInstance and Stop-SPEnterpriseSearchServiceInstance cmdlets, respectively.

For the Osearch parameter defaultindexlocation, use the Get-SPEnterpriseSearchServiceInstance and Set-SPEnterpriseSearchServiceInstance cmdlets.

Osearchdiacriticsensitive

Use the Get-SPEnterpriseSearchServiceApplication cmdlet to retrieve the specific Search service application, and then use DiacriticSensitive parameter from the Set-SPEnterpriseSearchServiceApplication cmdlet.

Provisionservice

Start-SPServiceInstance

Quiescefarm

None

Quiescefarmstatus

None

Quiesceformtemplate

Stop-SPInfoPathFormTemplate

Reconvertallformtemplates

Update-SPInfoPathFormTemplate

Refreshdms

None

Refreshsitedms

None

Registersecuritytrimmer

New-SPEnterpriseSearchSecurityTrimmer

Registerwsswriter

None

Removedataconnectionfile

Uninstall-SPDataConnectionFile

Remove-ecsfiletrustedlocation

Remove-SPExcelFileLocation

Remove-ecssafedataprovider

Remove-SPExcelDataProvider

Remove-ecstrusteddataconnectionlibrary

Remove-SPExcelDataConnectionLibrary

Remove-ecsuserdefinedfunction

Remove-SPExcelFileLocation

Removedrservice

None

Removeexemptuseragent

Remove-SPInfoPathUserAgent

Removeformtemplate

Uninstall-SPInfoPathFormTemplate

Removesolutiondeploymentlock

None

Renameserver

Rename-SPServer

Renamesite

Set-SPSite

Use the Url parameter.

Renameweb

Set-SPWeb

Use the RelativeUrl parameter.

Restore

Restore-SPFarm

Restore-SPSite

Retractsolution

Uninstall-SPSolution

Retractwppack

None

Runcontentdeploymentjob

Start-SPContentDeploymentJob

Scanforfeatures

Install-SPFeature

Use the Scanforfeatures parameter.

Setadminport

Set-SPCentralAdministration

Setapppassword

None

Setconfigdb

Connect-SPConfigurationDatabase

Setcontentdeploymentjobschedule

Set-SPContentDeploymentJob

Setdataconnectionfileproperty

Set-SPDataConnectionFile

Set-ecsexternaldata

Set-SPExcelFileLocation

Set-ecsloadbalancing

Set-SPExcelServiceApplication

Use the LoadBalancingScheme parameter.

Set-ecsmemoryutilization

Set-SPExcelServiceApplication

Use the MemoryCacheThreshold and PrivateBytesMax parameters.

Set-ecssecurity

Set-SPExcelServiceApplication

Use the CrossDomainAccessAllowed, EncryptedUserConnectionRequired, and FileAccessMethod parameters.

Set-ecssessionmanagement

Set-SPExcelServiceApplication

Use the SessionsPerUserMax and SiteCollectionAnonymousSessionsMax parameters.

Set-ecsworkbookcache

Set-SPExcelServiceApplication

Use the Workbookcache and WorkbookCacheSizeMax parameters.

Setformtemplateproperty

Set-SPInfoPathFormTemplate

Setlogginglevel

Set-SPLogLevel

Setosearchsetting

None

Setproperty

Set-SPFarmConfig

Get-SPTimerJob

Disable-SPTimerJob

Enable-SPTimerJob

Set-SPTimerJob

Start-SPTimerJob

Setqueryprocessoroptions

None

Setsitelock

Set-SPSiteAdministration

Use the LockState parameter.

Setsiteuseraccountdirectorypath

Get-SPSiteSubscription

New-SPSiteSubscription

Remove-SPSiteSubscription

Setworkflowconfig

Set-SPWorkflowConfig

Siteowner

Set-SPSiteAdministration

Syncsolution

Install-SPSolution

Use the Synchronize parameter.

Unextendvs

Remove-SPWebApplication

Uninstallfeature

Uninstall-SPFeature

Unquiescefarm

None

Unquiesceformtemplate

Start-SPInfoPathFormTemplate

Unregistersecuritytrimmer

Remove-SPEnterpriseSearchSecurityTrimmer

Unregisterwsswriter

None

Updateaccountpassword

Set-SPManagedAccount

Updatealerttemplates

None

Updatefarmcredentials

None

Upgrade

None

Upgradeformtemplate

Install-SPInfoPathFormTemplate

Upgradesolution

Update-SPSolution

Upgradetargetwebapplication

None

Uploadformtemplate

Install-SPInfoPathFormTemplate

Userrole

Get-SPUser

Move-SPUser

New-SPUser

Remove-SPUser

Set-SPUser

Verifyformtemplate

Test-SPInfoPathFormTemplate

 

资料来源:

Stsadm to Windows PowerShell mapping (SharePoint Server 2010)

http://technet.microsoft.com/en-us/library/ff621084(office.14).aspx

posted on 2010-04-27 21:31  中道学友  阅读(1852)  评论(0编辑  收藏  举报

导航

技术追求准确,态度积极向上