Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Prompt for a password with a mask using Powershell

$
0
0

Here’s some code that I absolutely know I’m going to need again in the future, what better place to put it than on my blog!

If you need to prompt the user for a password when using Powershell then you want to make sure that the value types in isn’t visible on the screen. That’s quite easy using the –AsSecureString parameter of the Read-Host cmdlet however its not quite so easy to retrieve the supplied value. The following code shows how to do it:

Read More


Viewing all articles
Browse latest Browse all 6937

Trending Articles