Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Powershell to pass CTRL+ALT+DEL command

$
0
0

How to get PowerShell you pass a CTRL+ALT+DEL command to get a change password prompt

If that is not possible then looking at how we can create a GUI popup box

$newPassword = (Read-Host -Prompt "Provide New Password" -AsSecureString);
Set-ADAccountPassword -Identity Bobby -NewPassword $newPassword -Reset

add-type -AssemblyName microsoft.VisualBasic
add-type -AssemblyName System.Windows.Forms
[System.Windows.Forms.SendKeys]::SendWait("^%{DELETE}")


Viewing all articles
Browse latest Browse all 6937

Trending Articles