New-SPSecureStoreApplication
建立新的 Secure Store 應用程式。
Syntax
New-SPSecureStoreApplication
-ServiceContext <SPServiceContextPipeBind>
-TargetApplication <TargetApplication>
[-Administrator <SPClaim[]>]
[-AssignmentCollection <SPAssignmentCollection>]
[-CredentialsOwnerGroup <SPClaim[]>]
-Fields <TargetApplicationField[]>
[-TicketRedeemer <SPClaim[]>]
[<CommonParameters>]
Description
Cmdlet New-SPSecureStoreApplication
會建立新的 Secure Store 應用程式。
如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱線上文件 SharePoint Server Cmdlet。
範例
------------------範例------------------
$usernameField = New-SPSecureStoreApplicationField -Name "UserName" -Type WindowsUserName -Masked:$false
$passwordField = New-SPSecureStoreApplicationField -Name "Password" -Type WindowsPassword -Masked:$true
$fields = $usernameField,$passwordField
$userClaim = New-SPClaimsPrincipal -Identity "CONTOSO\janedoe" -IdentityType WindowsSamAccountName
$contosoTargetApp = New-SPSecureStoreTargetApplication -Name "ContosoTargetApplication" -FriendlyName "Contoso Target Application" -ApplicationType Group
New-SPSecureStoreApplication -ServiceContext http://contoso -TargetApplication $contosoTargetApp -Fields $fields -Administrator $userClaim
此範例會建立新的群組目標應用程式 ContosoTargetApplication,然後建立該目標應用程式的新應用程式。 這個新的應用程式有兩個欄位:WindowsUserName 類型的 UserName 和 WindowsPassword 類型的密碼。 CONTOSO 網域上具有身分識別 janedoe 的使用者會設定為目標應用程式管理員。
參數
-Administrator
指定新 Secure Store 應用程式的系統管理員。
Type: | SPClaim[] |
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 |
-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 |
-CredentialsOwnerGroup
指定擁有群組認證之群組的宣告物件。
Type: | SPClaim[] |
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 |
-Fields
指定應用程式的欄位資訊。 預設欄位為使用者名稱和密碼。
Type: | TargetApplicationField[] |
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 |
-ServiceContext
指定目標應用程式的服務內容。
Type: | SPServiceContextPipeBind |
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 |
-TargetApplication
指定目標應用程式的相關資訊。 例如,TargetApplication 物件包含應用程式名稱、顯示名稱、連絡人資訊、啟用票證旗標和 URL 位址以設定認證的資料值。 TargetApplication 物件的架構定義于公開目標應用程式中繼資料的 ISecureSToreProviderExtended 介面中。
Type: | TargetApplication |
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 |
-TicketRedeemer
指定票證兌換者宣告值。
Type: | SPClaim[] |
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 |