Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 17778

PowerTip: Create a Secure Password with PowerShell

$
0
0

Summary: Use Windows PowerShell to make a plain text entry into a secure password. 

Hey, Scripting Guy! Question Is there a way I can use Windows PowerShell and my working script to make a secure string password without using Read-Host?

Hey, Scripting Guy! Answer Use the ConvertTo-SecureString cmdlet:

$MyBoringPassword=”OhThisCouldBeSecure!ButEverybodyIsReadingThisOnTheInternet!”

To convert this to a SecureString, which is typically needed when you create a new user in Active Directory, execute:

$SecurePassword=CONVERTTO-SecureString –asplaintext –force –string $MyBoringPassword


Viewing all articles
Browse latest Browse all 17778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>