Wednesday, December 10, 2025

How to send Ctrl + F4 key in Powershell

 Start-Sleep -Seconds 5


$wshell = New-Object -ComObject WScript.Shell

$wshell.SendKeys("^{F4}")

No comments:

Post a Comment