2,187
edits
(→Credentials: Added "ConvertTo-SecureString") |
m (→Get-Credential: Updated with SyntaxHighlight) |
||
Line 56: | Line 56: | ||
When running commands that require a connection to a remote machine its useful to be able to store a user/pass combination so that you aren't repeatedly prompted every time you run a command. Create a credential object, then supply that in place of a username in a command | When running commands that require a connection to a remote machine its useful to be able to store a user/pass combination so that you aren't repeatedly prompted every time you run a command. Create a credential object, then supply that in place of a username in a command | ||
< | <source lang="powershell"> | ||
PS H:\> $cred = Get-Credential | PS H:\> $cred = Get-Credential | ||
Line 70: | Line 70: | ||
SerialNumber : 69712-640-3560061-45009 | SerialNumber : 69712-640-3560061-45009 | ||
Version : 5.2.3790 | Version : 5.2.3790 | ||
</ | </source> | ||
=== ConvertTo-SecureString === | === ConvertTo-SecureString === |