description | ms.date | ms.topic | title |
---|---|---|---|
Use PSCredential type. |
06/28/2023 |
reference |
UsePSCredentialType |
Severity Level: Warning
If the cmdlet or function has a Credential parameter, the parameter must accept the PSCredential type.
Change the Credential parameter's type to be PSCredential.
function Credential([String]$Credential)
{
...
}
function Credential([PSCredential]$Credential)
{
...
}