Monday, June 30, 2014

PowerShell - Write Credentials to File


$FilePath = "C:"
Write-Host "Enter login as domain\id:"
Read-Host | Out-File $FilePath\id.txt

Write-Host "Enter user password:"
Read-Host -AsSecureString | ConvertFrom-SecureString | Out-File $FilePath\securestring.txt

No comments:

Post a Comment