Created
September 21, 2020 17:15
-
-
Save PrateekKumarSingh/39e0e6396c4be0cddd3be2224272ded9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
using System.Management.Automation; | |
namespace ReadSecurely | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// this doesn't works | |
PowerShell ps = PowerShell.Create(); | |
var pass = ps.AddCommand("Read-Host").AddParameter("AsSecureString").Invoke(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment