Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

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

Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.