適用於:
2013
2016
2019
訂閱版
Microsoft 365 中的 SharePoint
如果 Stsadm 作業與 PowerShell Cmdlet 之間沒有一對一對應,下表會列出您必須用來取得類似功能的特定 PowerShell 參數。
| Stsadm 作業 | Windows PowerShell Cmdlet |
| 啟用功能 | Enable-SPFeature |
| Activateformtemplate | 啟用-SPInfoPathFormTemplate |
| Addalternate網域 | New-SPAlternateUrl |
| 新增內容資料庫 | 掛載-SPContentDatabaseNew-SPContentDatabase |
| Addexemptuseragent | 新增 SPInfoPathUserAgent |
| 新增路徑 | New-SPManagedPath |
| Addpermission原則 | 無 |
| 新增解決方案 | Add-SPSolution |
| 新增範本 | 無 |
| 新增用戶 | New-SPUser |
| Addwppack | 安裝-SPWebPartPack |
| 新增區域網址 | New-SPAlternateUrl |
| 允許userformwebserviceproxy | Set-SPInfoPathWebServiceProxy 使用 AllowForUserForms 和 Identity 參數。 |
| 允許webserviceproxy | Set-SPInfoPathWebServiceProxy 使用 AllowWebServiceProxy 和 Identity 參數。 |
| 驗證 | Set-SPWebApplication 使用 AuthenticationMethod 或 AuthenticationProvider 參數。 |
| 備份 | 備份-SPConfiguration資料庫備份-SPFarm備份-SPSite |
| 備份歷史記錄 | Get-SPBackup歷史記錄 |
| Binddrservice | 無 |
| 封鎖檔案清單 | 無 |
| 取消部署 | 無 |
| 變更權限原則 | 無 |
| Copyappbin內容 | Install-SPA應用程式內容 |
| 創建管理員 | New-SPCentralAdministration |
| 建立群組 | 無 |
| 創建網站 | New-SPSite |
| 在新資料庫中建立網站 | New-SPSite 使用 ContentDatabase 參數。 New-SPContentDatabase |
| 創建網 | New-SPWeb |
| 資料庫修復 | 使用 Get-SPContentDatabaseOrphanedData 來偵測孤立的資料,但請注意,它不會修復孤立的資料。 |
| 停用功能 | Disable-SPFeature |
| 停用formtemplate | 停用-SPInfoPathFormTemplate |
| 刪除管理員 | Remove-SPCentralAdministration |
| Delete替代網域 | 刪除-SPAlternateUrl |
| 刪除configdb | Disconnect-SPConfigurationDatabase |
| 刪除內容資料庫 | 卸載-SPContentDatabase |
| 刪除群組 | 無 |
| 刪除路徑 | Remove-SPManagedPath |
| Deletepermission原則 | 無 |
| 刪除網站 | Remove-SPSite |
| 刪除解決方案 | Remove-SPSolution |
| 刪除模板 | 無 |
| 刪除用戶 | Remove-SPUser |
| 刪除網 | Remove-SPWeb |
| 刪除wppack | 卸載-SPWebPartPack |
| 刪除區域網址 | 刪除-SPAlternateUrl |
| 部署解決方案 | Install-SPSolution |
| 部署wppack | 安裝-SPWebPartPack |
| Disablessc | 無 |
| 顯示解決方案 | Get-SPSolution |
| 編輯內容部署路徑 | Set-SPContentDeploymentPath |
| 電子郵件 | 使用 Set-SPWebApplication 搭配 -SMTPServer 參數集。 |
| Enablessc | 無 |
| 枚舉網 | Get-SPContentDatabaseOrphanedData |
| 列舉替代網域 | Get-SPAlternateURL |
| 列舉內容資料庫 | Get-SPContentDatabase |
| Enumdataconnectionfiledependants | Get-SPDataConnectionFileDependent |
| 列舉資料連線檔案 | Get-SPDataConnectionFile |
| 列舉部署 | 無 |
| Enumexemptuseragents | Get-SPInfoPathUserAgent |
| 列舉表單範本 | Get-SPInfoPathFormTemplate |
| 列舉群組 | 無 |
| 列舉 | 無 |
| 枚舉服務 | Get-SPServiceInstance |
| 枚舉 | Get-SPSiteAdministration (若要執行此 Cmdlet,您必須是伺服器陣列管理員群組的成員。) Get-SPSite (若要執行此 Cmdlet,您必須是安裝 SharePoint Server 之電腦上的本機系統管理員 ) |
| 枚舉解 | Get-SPSolution |
| 枚舉子網 | Get-SPWeb |
| 列舉模板 | Get-SPWebTemplate |
| 枚舉使用者 | Get-SPUser |
| 列舉 | Get-SPWebPartPack |
| 列舉區網址 | Get-SPAlternateURL |
| Execadmsvc工作 | Start-SPAdminJob |
| Export | Export-SPWeb |
| 擴展VS | New-SPWeb應用程式 |
| Extendvsinwebfarm | New-SPWebApplicationExtension |
| 強制刪除清單 | 無 |
| Getadminport |
Get-SPWebApplication 使用下列語法: Get-SPWebApplication -IncludeCentralAdministration| ? {$_.IsAdministrationWebApplication -eq $true} |
| Getdataconnectionfile屬性屬性 |
Get-SPDataConnectionFile 使用下列語法: Get-SPDataConnectionFile| where {$_.Name -eq "dataConFileName"}| format-list |
| Getformtemplate屬性屬性 |
Get-SPInfoPathFormTemplate 使用下列語法: Get-SPInfoPathFormTemplate| where {$_.DisplayName -eq "formTemplateName"}| format-list |
| Getosearch設定 | 無 |
| Get屬性 | Get-SPFarmConfigGet-SPTimerJob停用-SPTimerJob啟用-SPTimerJobSet-SPTimerJobStart-SPTimerJob |
| Getsitelock | Get-SPSiteAdministration |
| Getsiteuseraccount目錄路徑 | 使用 Get-SPSite 取得網站物件,然後輸出 UserAccountDirectoryPath 屬性。 |
| Geturlzone | Get-SPAlternateURL |
| Import | Import-SPWeb |
| 安裝功能 | Install-SPFeature |
| 清單記錄層級 | 取得 SPLogLevel |
| Listqueryprocessor選項 | 無 |
| Listregisteredsecuritytrimmers | Get-SPEnterpriseSearchSecurityTrimmer |
| Localupgrade狀態 | 無。 不過, Get-SPPendingUpgradeActions 會提供類似的資訊。 |
| Managepermissionpolicy層級 | 無 |
| 合併內容資料庫 | Move-SPSite |
| 移轉使用者 | Move-SPUser |
| 搜尋 | 若是 Osearch 參數 farmcontactemail、farmperformancelevel、farmserviceaccount 及 farmservicepassword,請使用 Get-SPEnterpriseSearchService 和 Set-SPEnterpriseSearchService Cmdlet。 若是 Osearch 參數 start 和 stop,請分別使用 Start-SPEnterpriseSearchServiceInstance 和 Stop-SPEnterpriseSearchServiceInstance Cmdlet。 若是 Osearch 參數 defaultindexlocation,請使用 Get-SPEnterpriseSearchServiceInstance Cmdlet。 |
| O搜索變音敏感 | 使用 Get-SPEnterpriseSearchServiceApplication Cmdlet 擷取特定 Search Service 應用程式,然後從 Set-SPEnterpriseSearchServiceApplication Cmdlet 使用 DiacriticSensitive 參數。 |
| 設定檔變更日誌 | 無。 不過,如果您將 SSP) 名稱 (共用服務提供者取代為服務應用程式 (SA) 名稱,則可以使用 Stsadm profilechangelog 作業: stsadm -o profilechangelog-title <SA name>-daysofhistory <number of days>-generateanniversaries |
| 供應服務 | 啟動-SPServiceInstance |
| 靜止農場 | 無 |
| Quiescefarm狀態 | 無 |
| 靜止形式範本 | Stop-SPInfoPathFormTemplate |
| 重新轉換所有表單模板 | Update-SPInfoPathFormTemplate |
| 刷新dms | 無 |
| 刷新網站dms | 無 |
| 註冊安全修剪器 | New-SPEnterpriseSearchSecurityTrimmer |
| 註冊wsswriter | 無 |
| 已刪除ataconnection檔案 | Uninstall-SPDataConnectionFile |
| 已刪除服務 | 無 |
| 刪除豁免使用者代理程式 | 移除-SPInfoPathUserAgent |
| 移除表格範本 | Uninstall-SPInfoPathFormTemplate |
| Removesolutiondeploymentlock | 無 |
| 重新命名伺服器 | Rename-SPServer |
| 重新命名網站 | 套裝-SPSite 使用 Url 參數。 |
| 重命名網 | 集-SPWeb 使用 RelativeUrl 參數。 |
| 還原 | 恢復-SPFarm恢復-SPSite |
| 縮回解決方案 | Uninstall-SPSolution |
| 撤回wppack | 無 |
| Runcontentdeployment工作 | Start-SPContentDeploymentJob |
| 掃描功能 | 安裝-SPFeature 使用 Scanforfeatures 參數。 |
| Setadminport | Set-SPCentral管理 |
| 設定應用程式密碼 | Set-SPApplicationCredentialKeyRemove-SPApplicationCredentialKey |
| 設定configdb | Connect-SPConfigurationDatabase |
| 設定內容部署工作排程 | Set-SPContentDeploymentJob |
| Setdataconnectionfile屬性 | Set-SPDataConnectionFile |
| Setformtemplate屬性 | Set-SPInfoPathFormTemplate |
| 設定日誌層級 | 設定-SPLogLevel |
| 瀨戶搜尋設定 | 無 |
| Set屬性 | Set-SPFarmConfigGet-SPTimerJobDisable-SPTimerJobEnable-SPTimerJobSet-SPTimerJobStart-SPTimerJob |
| Setqueryprocessor選項 | 無 |
| Setsitelock | Set-SPSite管理 使用 LockState 參數。 |
| Setsiteuseraccount目錄路徑 | 套裝-SPSite 使用 UserAccountDirectoryPath 參數。 |
| Setworkflowconfig | Set-SPWorkflowConfig |
| 網站擁有者 | Set-SPSite管理 |
| 同步處理 | Update-SPProfileSyncClear-SPContentDatabaseSyncDataGet-SPContentDatabase (具有 -DaysSinceLastProfileSync 參數) |
| 同步解決方案 | 安裝-SPSolution 使用 同步化 參數。 |
| 未延伸 | 移除-SPWebApplication |
| 卸載功能 | Uninstall-SPFeature |
| Unquiescefarm | 無 |
| Unquiesceform模板 | Start-SPInfoPathFormTemplate |
| 取消註冊安全性修剪器 | Remove-SPEnterpriseSearchSecurityTrimmer |
| 取消註冊wsswriter | 無 |
| 更新帳戶密碼 | Set-SPManagedAccount |
| 更新警示範本 | 無 |
| Updatefarm認證 | 無 |
| 升級 | 無 |
| 升級表單範本 | Install-SPInfoPathFormTemplate |
| 升級解決方案 | Update-SPSolution |
| 升級目標網頁應用程式 | 無 |
| 上傳表單範本 | Install-SPInfoPathFormTemplate |
| 使用者角色 | Get-SPUsermove-SPUsernew-SPUserRemove-SPUserSet-SPUser |
| Verifyform範本 | Test-SPInfoPathFormTemplate |