PowerShell - Create cred file for Encryption scripts
- Jon Boyette
- Apr 15, 2022
- 1 min read
Saved personally as a CreateCREDfile.ps1, it does just that, prompts for creds to encrypt the password in a .cred to use with scripts
$Hash = @{
'Admin' = Get-Credential -Message 'Please enter administrative credentials'
}
$Hash | Export-Clixml -Path "${env:\userprofile}\Encryptedfilenameofchoice.cred"
Comments