| description | Use PSCredential type. |
|---|---|
| ms.custom | PSSA v1.21.0 |
| ms.date | 06/28/2023 |
| ms.topic | reference |
| title | 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)
{
...
}