This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo OFF | |
| rem End RDP session, and automatically login to previous user | |
| rem | |
| rem This must be ran as an Administrator | |
| tscon 2 /dest:console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $notepad = Start-Process notepad -PassThru | |
| # Do Interesting Things | |
| Stop-Process $notepad.Id |