CredentialAttribute Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Defines the attribute used to generate a PSCredential object. Typically this attribute is used by parameters of type PSCredential so that a string can also be passed as an argument to the parameter.

Namespace:   System.Management.Automation
Assembly:  System.Management.Automation (in System.Management.Automation.dll)


<AttributeUsageAttribute(AttributeTargets.Property Or AttributeTargets.Field,
	AllowMultiple := False)>
Public NotInheritable Class CredentialAttribute
	Inherits ArgumentTransformationAttribute

NameDescription
System_CAPS_pubmethodCredentialAttribute()

Initializes a new instance of the CredentialAttribute class.

NameDescription
System_CAPS_pubpropertyTransformNullOptionalParameters

Describes if the parameter is not mandatory, and the agument is null.(Overrides ArgumentTransformationAttribute.TransformNullOptionalParameters.)

System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethodMatch(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodTransform(EngineIntrinsics, Object)

Transforms the input data into a PSCredential object.(Overrides ArgumentTransformationAttribute.Transform(EngineIntrinsics, Object).)

When this attribute is declared, Windows PowerShell uses the current host to determine whether any prompts are displayed to the user. For example, the default host provides a prompt for the user name and the password when this attribute is declared. For more information about using this attribute, see Credential Attribute Declaration.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: