Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CredentialAttribute Class

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)

'Usage
Dim instance As CredentialAttribute

[AttributeUsageAttribute(AttributeTargets::Property|AttributeTargets::Field, AllowMultiple=false)] 
public ref class CredentialAttribute sealed : public ArgumentTransformationAttribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple=false) */ 
public final class CredentialAttribute extends ArgumentTransformationAttribute
AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple=false) 
public final class CredentialAttribute extends ArgumentTransformationAttribute

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.

 

Target Platforms


Show:
© 2015 Microsoft