Advertisement
Cogger

Speciality-Loop.ps1

Dec 5th, 2022
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. cmdkey /list | ForEach-Object {
  2. if ($_ -like "*didlogical*") {
  3. cmdkey /del:($_ -replace '^[^=]+',"" -replace "=","")
  4. }
  5. }
  6.  
  7. sleep 3
  8.  
  9. Start-Process microsoft-edge:
  10. sleep 3
  11. $wshell = New-Object -ComObject wscript.shell;
  12. $wshell.AppActivate('New tab - Work - Microsoft​ Edge')
  13. Start-Sleep -s 1
  14. # Hit the up arrow key
  15. $wshell.SendKeys('{F10}')
  16. Start-Sleep -s 1
  17. $wshell.SendKeys('{LEFT}')
  18. Start-Sleep -s 1
  19. $wshell.SendKeys('~')
  20. Start-Sleep -s 1
  21. $wshell.SendKeys('~')
  22. Start-Sleep -s 3
  23. $wshell.SendKeys('{TAB}')
  24. Start-Sleep -s 1
  25. $wshell.SendKeys('{TAB}')
  26. Start-Sleep -s 1
  27. $wshell.SendKeys('~')
  28. Start-Sleep -s 1
  29. $wshell.SendKeys('~')
  30. Start-Sleep -s 1
  31.  
  32. sleep 3
  33. Get-Process -Name MsEdge | Stop-Process
  34.  
  35. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement