This file contains 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
<# | |
Prereqs: | |
User logged on to domainjoined pc. | |
Powershell remoting enabled on controller - default on 2012 or later | |
Service account with permissions to lookup and end session in the Site | |
Script outputs a list of applications that the user had running to a CSV file on the controller - c:\temp\logoff-log.csv. | |
To protect the password of the serviceaccount it would be wise to wrap this into an EXE file. | |
Place the EXE file on the users desktop og start menu, and they can now stop their sessions. |
This file contains 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
gwmi win32_operatingsystem|select psc*,*j*,V*,@{n='BIOSSerial';e={(gwmi win32_bios -cn $_.__SERVER).serialnumber}} |