Ich habe das hier mal für SQL gebraucht, und es funktioniert:
$sqlpw = Read-Host "Enter SQL Password" -AsSecureString #Speichert das eingegebene Passwort als SecureString (kann nicht gelesen werden und wird in der Konsole nicht gepsichert)
$sqlpwsecure = `
[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($sqlpw) #Da System.String nicht sehr sicher ist und öfters Probleme verursacht, wird hier das Passwort verstärkt gesichert.
$HiddenPW = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($sqlpwsecure)
The following is my signature:
Powershell Programmer & Advanced Lua Programmer
Location: Switzerland
Beside that, whenever you see a reply, you think is helpful, click "
Vote As Helpful"! And
whenever you see a reply being an answer to the mainquestion of the thread, click "
Mark As Answer"
(if you opened the thread).
Please contact me, before reporting me, thank you.
[string](0..21|%{[char][int]([int]("{0:d}" -f 0x28)+('577076797174-87661607769657424-8687168065964').substring(($_*2),2))})-replace' '