---
title: "$PSCredential"
---
Returns a PSCredential object that can be passed to PowerShell scripts.
$PSCredential(UserName, [Password])
Name | Description |
---|---|
☆ UserName | The user name of the PSCredential object, or a UsernamePassword credential. |
Password | The password of the PSCredential object. |
# convert user and password to a PSCredential object
PSCall MyPowerShellScript
(
Credentials: $PSCredential(user, password)
);