Helper Commands
BATCH / CMD
Uninstall Windows Updates:
Run the following (update the list
to contain valid KB numbers) to uninstall updates on a local system:
Get Remote Host Windows Updates
Run the following (update the hosts
list with valid hostnames) to get .CSV output of updates on remote systems:
Send a Message to Remote Computer
Or you can launch it to all users on a given computer if you don't know the username. Enable verbose mode (/V
) and wait for a callback (/W
) to get a callback when the user closes it:
msg * /V /W /SERVER:WKST-123 This is a test message
Restart Remote Machine (With Warning)
This script is better kept out in a public place and called with the a remote command utility to loop through a list of hostnames. You can just replace the %1
to hardcode a host if you want though.
BASH
Comment / Uncomment Lines
When you need to comment out or uncomment out a line, sed makes it pretty easy. Just change the word pattern to something identifiable:
POWERSHELL
Remotely Log User Out
Last updated