Convert-SPWebApplication
轉換 Web 應用程式的驗證模式。
Syntax
Convert-SPWebApplication
-Identity <SPWebApplicationPipeBind>
-From <String>
-To <String>
[-AssignmentCollection <SPAssignmentCollection>]
[-Force]
[-RetainPermissions]
[-Database <SPContentDatabase>]
[-MapList <String>]
[-SiteSubsriptionId <Guid>]
[-SkipPolicies]
[-SkipSites]
[-SourceSkipList <String>]
[-TrustedProvider <SPTrustedIdentityTokenIssuerPipeBind>]
[-LoggingDirectory <String>]
[<CommonParameters>]
Description
使用 Convert-SPWebApplication Cmdlet 將 Web 應用程式的驗證模式轉換為 Windows 宣告驗證模式,並將內容資料庫中的使用者帳戶移轉至宣告編碼值。
保留許可權時,只有當來源帳戶已啟用且可由 SharePoint 查詢時,才會轉換網站內的使用者。 例如,如果在傳統 Windows 到 Windows 宣告轉換之前刪除或停用 Active Directory 帳戶,資料庫中的帳戶將不會更新為宣告格式。
如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱線上文件 SharePoint Server Cmdlet。
範例
------------範例 1-------
Convert-SPWebApplication -Identity "https://<webappurl>" -To Claims -RetainPermissions
此範例會將 Identity 參數指定的 Web 應用程式轉換為使用宣告驗證模式。
------------範例 2-------
Convert-SPWebApplication -Identity "https://<webappurl>" -From Legacy -To Claims -RetainPermissions
本範例會將 Identity 參數所指定的 Web 應用程式從傳統Windows 驗證轉換為宣告驗證模式,同時保留許可權。 套用安全性更新 MS04-022 或套用 SharePoint Server 2013 的 2014 年 4 月累積更新之後,需要 -From 參數。 這是所有 SharePoint Server 2016 版本的必要專案。
參數
-AssignmentCollection
管理物件以適當處置它們。 使用 SPWeb 或 SPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。 您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。 使用 SPWeb、SPSite 或 SPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。
使用 Global 參數時,所有物件會包含在全域儲存區內。 若未立即使用物件,或未使用 Stop-SPAssignment 命令處置物件,將會發生記憶體不足的狀況。
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Database
指定要移轉的內容資料庫名稱。
Type: | SPContentDatabase |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Force
強制轉換 Web 應用程式。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-From
指定要從中轉換的驗證方法。
此參數的有效值如下所示。
舊版、Claims-Windows、Claims-Trusted-Default
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Identity
指定您要轉換之 Web 應用程式的 URL,例如:https://mysite/app1
Type: | SPWebApplicationPipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-LoggingDirectory
指定將寫入移轉結果詳細資訊記錄的目錄。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2016, SharePoint Server 2019 |
-MapList
以下列格式指定包含為數據列清單的檔案:user-key、migrated-user-name、migrated-user-key。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-RetainPermissions
指定用來執行 Cmdlet 的帳戶,並保留 Web 應用程式中的權限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SiteSubsriptionId
指定網站訂用帳戶的 GUID。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SkipPolicies
指定不會移轉 SPWebApplication 安全性原則。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SkipSites
指定將不會移轉 SPWebApplication 的 SPSites。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SourceSkipList
以下列格式指定包含為數據列清單的檔案:使用者金鑰。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-To
指定要轉換成的驗證方法。
此參數的有效值如下所示。
Claims、Claims-Windows、Claims-Trusted-Default、Claims-SharePoint-Online
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-TrustedProvider
當您從信任的登入提供者移轉時,這是您指定哪個信任登入提供者。
Type: | SPTrustedIdentityTokenIssuerPipeBind |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |