Created
June 5, 2018 14:51
-
-
Save xabim/61bc5319237400371b53a3e425121d6a to your computer and use it in GitHub Desktop.
Encrypt a plain text with certificate in powershell with CMS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Cert = Get-ChildItem Cert:\LocalMachine\My | Where-Object {$_.Subject -like "CN=Script Automa*"} | |
$Password = 'Password' | |
Protect-CmsMessage -To $Cert -Content $Password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment