Set-SPTrustedIdentityTokenIssuer
設定 Web 應用程式的身分識別提供者。
Syntax
Set-SPTrustedIdentityTokenIssuer
[-Identity] <SPTrustedIdentityTokenIssuerPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-ClaimProvider <SPClaimProviderPipeBind>]
[-ClaimsMappings <SPClaimMappingPipeBind[]>]
[-Description <String>]
-ImportTrustCertificate <X509Certificate2>
[-Realm <String>]
[-SignInUrl <String>]
[-UseWReply]
[-Confirm]
[-RegisteredIssuerName <String>]
[-WhatIf]
[<CommonParameters>]
Set-SPTrustedIdentityTokenIssuer
[-Identity] <SPTrustedIdentityTokenIssuerPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-ClaimProvider <SPClaimProviderPipeBind>]
[-ClaimsMappings <SPClaimMappingPipeBind[]>]
[-Description <String>]
-MetadataEndPoint <Uri>
[-Realm <String>]
[-SignInUrl <String>]
[-UseWReply]
[-Confirm]
[-RegisteredIssuerName <String>]
[-WhatIf]
[<CommonParameters>]
Description
Set-SPTrustedIdentityTokenIssuer Cmdlet 會設定 Web 應用程式或擴充 Web 應用程式的識別提供者。 針對 ASP.NET 成員資格提供者和角色提供者,只有當結果是透過管道傳送至變數並傳遞至 Web 應用程式時,此 Cmdlet 才會變更識別提供者。 針對 STS) 識別提供者 (安全性權杖服務,此 Cmdlet 會變更 SPFarm 物件中保存的識別提供者物件。
如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱線上文件 SharePoint Server Cmdlet。
範例
-------------------------範例 1----------------------
Set-SPTrustedIdentityTokenIssuer "LiveIDSTS" -Certificate (Get-ChildItem"cert:Certificates (LocalComputer)\Personal\Certificates -Name "LiveID Cert")
本範例會將識別提供者設定為 LiveIDSTS。
-------------------------EXAMPLE 2----------------------
C:\PS>$ip = @( (Get-SPTrustedIdentityTokenIssuer "LiveID STS"), (New-SPTrustedIdentityTokenIssuer -ASPNetMembershipProvider "myMembershipProvider" -ASPNetRoleProvider "myRoleProvider"), (Get-SPTrustedIdentityTokenIssuer "NTLM")) )
New-SPWebApplication https://contoso.com -IdentityProvider $ip
此範例會使用 .ASPNetMembership 及 Role 參數設定身分識別提供者。 使用這些參數時,必須設定變數;否則值不會生效。
參數
-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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ClaimProvider
指定 IP STS 可用解析及搜尋宣告人員挑選器的宣告。
此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID、有效的宣告提供者名稱 (例如 MyIDprovider1),或有效的 SPClaimProvider 物件執行個體。
Type: | SPClaimProviderPipeBind |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ClaimsMappings
指定將宣告從原始的 Token 對應至 SharePoint 的 Token。
此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID、有效的宣告對應規則 (例如 Email),或有效的 SPClaimMapping 物件執行個體。
Type: | SPClaimMappingPipeBind[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Confirm
執行 Cmdlet 之前提示您確認。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Description
指定新身分識別提供者的說明。
此類型必須是有效的字串,例如 LiveID STS。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Identity
指定要更新的身分識別提供者。
此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID、有效的識別身分提供者名稱 (例如 LiveID STS),或有效的 SPIdentityProvider 物件執行個體。
Type: | SPTrustedIdentityTokenIssuerPipeBind |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ImportTrustCertificate
指定來自受信任驗證提供者伺服器陣列的 X.509 憑證物件。
此類型必須是有效的 X.509 憑證名稱,例如 Certificate1。
Type: | X509Certificate2 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-MetadataEndPoint
Type: | Uri |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Realm
指定與此信任相關的領域或資源分割區。
此類型必須是有效的領域名稱,例如 MD_REALM。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-RegisteredIssuerName
{{Fill RegisteredIssuerName Description}}
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SignInUrl
指定此信任的身分識別提供者 STS 的登入 URL。
此類型必須是格式為 https://int.live.com/ 的有效 URL。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-UseWReply
包含具有 Token 要求的 WReply。 Wreply 是會在完成要求者之登出程序時將其重新導向的信賴憑證者 URL。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-WhatIf
顯示執行 Cmdlet 時會發生什麼情況。 未執行 Cmdlet。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |