Wednesday, October 17, 2012

STSADM to Windows PowerShell equivalent mapping


This article lists Stsadm operations and their equivalent Windows PowerShell cmdlets. Where there is no one-to-one mapping between the operations and cmdlets, the table lists the specific Windows PowerShell parameters you must use to get the same functionality.

Stsadm operation Windows PowerShell cmdlet
Activatefeature Enable-SPFeature
Addalternatedomain New-SPAlternateUrl
Addcontentdb Mount-SPContentDatabase
New-SPContentDatabase
Addpath New-SPManagedPath
Addpermissionpolicy None
Addsolution Add-SPSolution
Addtemplate Install-SPWebTemplate
Adduser New-SPUser
Addwppack Install-SPWebPartPack
Addzoneurl New-SPAlternateUrl
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
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
Email None
Enablessc None
Enumalternatedomains Get-SPAlternateURL
Enumcontentdbs Get-SPContentDatabase
Enumdeployments None
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}
Getproperty Get-SPFarmConfig
Get-SPTimerJob
Disable-SPTimerJob
Enable-SPTimerJob
Set-SPTimerJob
Start-SPTimerJob
Getsitelock Get-SPSiteAdministration
Geturlzone Get-SPAlternateURL
Import Import-SPWeb
Installfeature Install-SPFeature
Listlogginglevels Get-SPLogLevel
Localupgradestatus None
Managepermissionpolicylevel None
Mergecontentdbs Move-SPSite
Migrateuser Move-SPUser
Provisionservice Start-SPServiceInstance
Refreshdms None
Refreshsitedms None
Registerwsswriter None
Removedrservice None
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
Scanforfeatures Install-SPFeature
Use the Scanforfeatures parameter.
Setadminport Set-SPCentralAdministration
Setapppassword None
Setconfigdb Connect-SPConfigurationDatabase
Setlogginglevel Set-SPLogLevel
Setproperty Set-SPFarmConfig
Get-SPTimerJob
Disable-SPTimerJob
Enable-SPTimerJob
Set-SPTimerJob
Start-SPTimerJob
Setsitelock Set-SPSiteAdministration
Use the LockState parameter.
Setworkflowconfig Set-SPWorkflowConfig
Siteowner Set-SPSiteAdministration
Spsearch Get-SPSearchService
Set-SPSearchService
Get-SPSearchServiceInstance
Set-SPSearchServiceInstance
Spsearchdiacriticsensitive None
Syncsolution Install-SPSolution
Use the Synchronize parameter.
Unextendvs Remove-SPWebApplication
Uninstallfeature Uninstall-SPFeature
Unregisterwsswriter None
Updateaccountpassword Set-SPManagedAccount
Updatealerttemplates None
Updatefarmcredentials None
Upgrade None
Upgradesolution Update-SPSolution
Upgradetargetwebapplication None
Userrole Get-SPUser
Move-SPUser
New-SPUser
Remove-SPUser
Set-SPUser


TECHNET - stsadm to Windows PowerShell mapping (SharePoint Foundation 2010)
http://technet.microsoft.com/en-us/library/ff621081.aspx


No comments:

Post a Comment