New-SPSecureStoreApplication
適用版本: SharePoint Server 2010
上次修改主題的時間: 2015-03-09
會建立新的安全認證儲存應用程式。
Syntax
New-SPSecureStoreApplication -Fields <TargetApplicationField[]> -ServiceContext <SPServiceContextPipeBind> -TargetApplication <TargetApplication> [-Administrator <SPClaim[]>] [-AssignmentCollection <SPAssignmentCollection>] [-CredentialsOwnerGroup <SPClaim[]>] [-TicketRedeemer <SPClaim[]>]
詳細描述
New-SPSecureStoreApplication Cmdlet 會建立新的安全認證儲存應用程式。
Parameters
參數 | 必要 | 類型 | 描述 |
---|---|---|---|
ServiceContext |
必要 |
Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind |
指定目標應用程式的服務內容。 |
TargetApplication |
必要 |
Microsoft.Office.SecureStoreService.Server.TargetApplication |
指定目標應用程式的相關資訊。例如,TargetApplication 物件會包含應用程式名稱、顯示名稱、連絡人資訊、啟用票證標幟及 URL 位址的資料值,以設定認證。TargetApplication 物件的結構描述會定義於 ISecureSToreProviderExtended 介面中,該介面會公開目標應用程式中繼資料。 |
Administrator |
選用 |
Microsoft.SharePoint.SPClaim[] |
指定新安全認證儲存應用程式的管理員。 |
AssignmentCollection |
選用 |
Microsoft.SharePoint.PowerShell.SPAssignmentCollection |
為能適當處置物件而管理物件。使用 SPWeb 或 SPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。使用 SPWeb、SPSite 或 SPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。 注意 使用 Global 參數時,所有物件會包含在全域儲存區內。若未立即使用物件,或未使用 Stop-SPAssignment 命令處置物件,將會發生記憶體不足的狀況。 |
CredentialsOwnerGroup |
選用 |
Microsoft.SharePoint.SPClaim[] |
指定擁有群組認證之群組的宣告物件。 |
Fields |
選用 |
Microsoft.Office.SecureStoreService.Server.TargetApplicationField[] |
指定應用程式的欄位資訊。預設欄位是使用者名稱和密碼。 |
TicketRedeemer |
選用 |
Microsoft.SharePoint.SPClaim[] |
指定票證贖回者宣告值。 |
輸入類型
傳回類型
Example
------------------範例------------------
$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 $claimUser
此範例會建立新的群組目標應用程式 ContosoTargetApplication
,然後針對該目標應用程式建立新的應用程式。這個新的應用程式會包含兩個欄位,分別是:類型為 WindowsUserName
的 UserName
,以及類型為 WindowsPassword
的 Password
。在 CONTOSO
網域上識別碼為 janedoe
的使用者會設定為目標應用程式管理員。
See Also
Reference
Get-SPSecureStoreApplication
Set-SPSecureStoreApplication
Remove-SPSecureStoreApplication