command line interface - Expect and Spawn with PowerShell -
is there way expect , spawn powershell. have parse cli program powershell asking password there way input password via powershell. in perl or python in bash can use expect/spawn there solution in powershell ?
you can use read-host prompt user input. see here more information.
$pass = read-host 'what password?' -assecurestring $decodedpass = [system.runtime.interopservices.marshal]::ptrtostringauto([system.runtime.interopservices.marshal]::securestringtobstr($pass))
i'm sure want spawn, can execute other scripts or executables calling them
.\myotherscript.ps1
Comments
Post a Comment