PowerTip: Using Credentials in PowerShell

Summary: Learn how to find Windows PowerShell cmdlets and providers that support credentials.

Hey, Scripting Guy! Question How can I find which Windows PowerShell cmdlets support the credential parameter?

Hey, Scripting Guy! Answer Use the Get-Command cmdlet with a command such as:

Get-Command -ParameterName credential

Hey, Scripting Guy! Question How can I find which Windows PowerShell providers support credentials?

Hey, Scripting Guy! Answer Use the Get-PSProvider cmdlet and pipe the results to Where-Object. Then look for credential in the capabilities property. An example for doing this in Windows PowerShell 3.0 is shown here.

Get-PSProvider | where -Property capabilities -Value credential -Match