mirror of
https://github.com/paradizelost/Powershell-Public.git
synced 2024-11-25 02:04:43 -06:00
fix password entry
This commit is contained in:
parent
e0bb9b9ad1
commit
e7b016871d
@ -51,11 +51,20 @@ function Global:connect-server(){
|
|||||||
[void][WinAP]::SetForegroundWindow($process.MainWindowHandle)
|
[void][WinAP]::SetForegroundWindow($process.MainWindowHandle)
|
||||||
[void][Winap]::ShowWindow($process.MainWindowHandle, 5)
|
[void][Winap]::ShowWindow($process.MainWindowHandle, 5)
|
||||||
[void][Winap]::ShowWindow($process.MainWindowHandle, 5)
|
[void][Winap]::ShowWindow($process.MainWindowHandle, 5)
|
||||||
start-sleep 2
|
start-sleep 3
|
||||||
#write-output $cred.getnetworkcredential().password
|
#write-output $cred.getnetworkcredential().password
|
||||||
[System.Windows.Forms.SendKeys]::SendWait("$($cred.username){TAB}")
|
foreach ($char in ("$($cred.username)").ToCharArray()) {
|
||||||
start-sleep .5
|
[System.Windows.Forms.SendKeys]::SendWait($char)
|
||||||
[System.Windows.Forms.SendKeys]::SendWait("$($cred.getnetworkcredential().password){enter}")
|
start-sleep -Milliseconds 30
|
||||||
|
}
|
||||||
|
[System.Windows.Forms.SendKeys]::SendWait("{TAB}")
|
||||||
|
start-sleep -Milliseconds 30
|
||||||
|
foreach ($char in ("$($cred.getnetworkcredential().password)").ToCharArray()) {
|
||||||
|
[System.Windows.Forms.SendKeys]::SendWait($char)
|
||||||
|
start-sleep -Milliseconds 30
|
||||||
|
}
|
||||||
|
start-sleep 1
|
||||||
|
#[System.Windows.Forms.SendKeys]::SendWait("{enter}")
|
||||||
}
|
}
|
||||||
function Show-Form() {
|
function Show-Form() {
|
||||||
Add-Type -AssemblyName System.Windows.Forms
|
Add-Type -AssemblyName System.Windows.Forms
|
||||||
|
Loading…
Reference in New Issue
Block a user