New-SPSecureStoreApplicationField

 

适用于: SharePoint Server 2010

上一次修改主题: 2015-03-09

创建新的安全存储应用程序字段对象。

Syntax

New-SPSecureStoreApplicationField -Masked <SwitchParameter> -Name <String> -Type <UserName | Password | Pin | Key | Generic | WindowsUserName | WindowsPassword> [-AssignmentCollection <SPAssignmentCollection>]

详细说明

New-SPSecureStoreApplicationField cmdlet 为目标应用程序创建新的安全存储应用程序字段对象。

Parameters

参数 是否必需 类型 说明

Masked

必需

System.Management.Automation.SwitchParameter

屏蔽在字段中键入的可见字符。

Name

必需

System.String

指定新的目标应用程序字段的名称。

Type

必需

Microsoft.BusinessData.Infrastructure.SecureStore.SecureStoreCredentialType

指定添加到目标应用程序的凭据字段的类型。

键入的值必须是下列值之一:UserNamePasswordPinKeyGenericWindowsUserNameWindowsPassword

AssignmentCollection

可选

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

管理对象以便正确进行处理。使用 SPWebSPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。在使用 SPWebSPSiteSPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。

备注

在使用 Global 参数时,所有对象均包含在全局存储中。如果未立即使用对象,或未通过使用 Stop-SPAssignment 命令来处理对象,则可能会发生内存不足的情况。

输入类型

返回类型

Example

------------------示例------------------

New-SPSecureStoreApplicationField -Name "UserName" -Type WindowsUserName -Masked:$false

此示例使用名称 UserName 创建一个 WindowsUserName 类型的新凭据字段,并将屏蔽属性(该属性为 true 时将在用户键入字符时隐藏这些字符)设置为 false。此 cmdlet 通常和 New-SPSecureStoreApplication cmdlet 配合使用。

See Also

Reference

New-SPSecureStoreTargetApplication
New-SPSecureStoreApplication