Helper Commands
Windows
Uninstall Windows Updates:
@ECHO OFF
SET list=3133977 3137061 3138612 3138901 3139923
for %%a in (%list%) do (
%windir%\syswow64\wusa.exe /uninstall /kb:%%a /quiet /norestart /log
)Run-As Session
runas /user:burmat.local\nathan /netonly powershellGet Remote Host Windows Updates
@echo off
SET dFormat=_%date:~-4,4%%date:~-10,2%%date:~-7,2%
SET sCMDparams=qfe get Caption, Description, HotfixID, InstallDate, InstalledBy /format:csv
SET hosts=HOSTNAME1 HOSTNAME2
ECHO %dFormat%
ECHO .
FOR %%f in (%hosts%) DO (
ECHO Processing %%f
ECHO Output file: %%f_%dFormat%.csv
wmic /NODE:%%f /output:%%f_%dFormat%.csv %sCMDparams%
)
ECHO .
ECHO Remember to delete the first blank line
ECHO .
ECHO .
ECHO Finished.
ECHO .Send a Message to Remote Computer
Restart Remote Machine (With Warning)
Windows Firewall
Enable Network Discovery
Enable File and Printer Settings
Allow All Inbound
Allow All Output
PowerShell
Remotely Log User Out
Creating an SMB Share
Sending an Email
Retrieve Exchange Version
Users that have Reversible Encryption Enabled
Base64 Encoding PowerShell
Renaming Files to MD5 Value
Getting PowerShell Versioning
Listing Recycle Bin Contents
Creating a Bunch of Domain Users
Keep a Computer Awake
Enumerate Child Processes
DNS Reverse Lookup for Hostname List
AES Encrypt & Decrypt Text
Loading PowerShell ActiveDirectory Module Manually
PowerShell Terminal Profile
Bash
SMTP
Comment / Uncomment Lines
Loops
Reading a File
Loop an Array
Resolving Hostnames
Rudementary Port Scanner
Network Time Protocol (NTP)
NTP Mode 6 Check:
DNS Host Discovery
Installing Ruby
Certificate Fingerprint
Last updated