Documentation Index
Fetch the complete documentation index at: https://tally.wharflab.com/llms.txt
Use this file to discover all available pages before exploring further.
powershell/PSUsePSCredentialType is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.
| Property | Value |
|---|
| Severity | Warning |
| Category | PSScriptAnalyzer |
| Auto-fix | No |
Description
If the cmdlet or function has a Credential parameter, the parameter must accept the
PSCredential type.
How
Change the Credential parameter’s type to be PSCredential.
Examples
Problematic code
function Credential([String]$Credential)
{
...
}
Correct code
function Credential([PSCredential]$Credential)
{
...
}
Source
This rule documentation is adapted from Microsoft’s PSScriptAnalyzer documentation for
UsePSCredentialType,
licensed under CC BY 4.0.