Wednesday, April 8, 2009

Store a secure password in a file with Powershell

## ===================
## This is a one-liner to ask for a password a store it safely in a
securepass.txt file
read-host -prompt "Enter password to be encrypted in securepass.txt "
-assecurestring | convertfrom-securestring | out-file securepass.txt
## ===================

No comments:

Post a Comment