Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 2.32 KB

File metadata and controls

32 lines (20 loc) · 2.32 KB
description Credential Attribute Declaration
ms.date 09/13/2016
title Credential Attribute Declaration

Credential Attribute Declaration

The Credential attribute is an optional attribute that can be used with credential parameters of type System.Management.Automation.PSCredential so that a string can also be passed as an argument to the parameter. When this attribute is added to a parameter declaration, Windows PowerShell converts the string input into a System.Management.Automation.PSCredential object. For example, the Get-Credential cmdlet uses this attribute to have Windows PowerShell generate the System.Management.Automation.PSCredential object that is returned by the cmdlet.

Syntax

[Credential]

Remarks

See Also

Parameter Aliases

Parameter Attribute Declaration

Writing a Windows PowerShell Cmdlet