Cleanup All User Chrome Cache
This script will clean all Chrome cache for all users on a Windows 7 or newer system. # Define the base directory for user profiles$usersPath = "C:\Users"$totalBeforeCleanup =…
This script will clean all Chrome cache for all users on a Windows 7 or newer system. # Define the base directory for user profiles$usersPath = "C:\Users"$totalBeforeCleanup =…
Get current RDS-CAL details via PowerShell. Run this from your 2008 RDS Licensing server. # Filename of the export $filename = RDS-CAL-Report.csv # Import RDS PowerShell Module import-module…
A quick Powershell script I hacked together that will enumerate all Active Directory users, and build an XML file for an application I wrote that generates user reports…
This script will cleanup all users temporary files in their AppData\Local\Temp for Windows 7 and newer. # Define the base directory for user profiles$usersPath = "C:\Users"$totalBeforeCleanup = 0$totalAfterCleanup…
A quick PowerShell script hacked together to scan Active Directory computer objects that are Server 2008+ and check for MS17-010 patches.
Input line: Thu 2017-03-30 00:00:07: user@domain.com (John Doe) checked mail from 127.0.0.1 using IMAP, 0 msgs collected, 21 remaining Powershell script: $rxp = "([a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)|(d{1,3}.d{1,3}.d{1,3}.d{1,3})|(POP|IMAP)|(^[A-Z][a-z]+sd{4}-d{2}-d{2}sd{2}:d{2}:d{2})" gc ".*.log" | select-string…
I have my own security software I use on Windows Server operating systems and take out Windows Defender. Normally, I can do this through Feature removal, but the…
To join my Windows Server 2016 Nano server to my test domain I used the djoin.exe (Domain Join) command. From a domain controller, or server already joined to my…
I was trying to build a Nano Server image (2016 Tech Preview 5) and kept getting the following error: Turns out that is because the documentation is not…
Continuing with learning some Powershell, I cooked this up which will connect to the vCenter server and get all the VM's and list the name, operating system and…
Clear Powershell’s last 10 commands: clear-history -count 10 -newest After executing that, use get-history to see what’s left… Clear the console buffer by scripting F7+2: [system.reflection.assembly]::loadwithpartialname("System.Windows.Forms") [System.Windows.Forms.SendKeys]::Sendwait('%{F7 2}')…
Runas does not accept a password on the command line, nor can you pipe it to it on STDIN. It requires keyboard input. However, to make life easier,…
Identification of Cryptolocker Location of CryptoLocker binaries: %AppData%<random>.exe %LocalAppData%<random>.exe If the malware has executed, one or more of the following registry keys will be present: HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun CryptoLocker HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun…
I'm preparing for a project that involves upgrading an existing Microsoft Exchange 2003 infrastructure to Exchange 2013.
This is a Powershell cmdlet that will import a directory of .PST to the Mailbox alias defined by the .PST name.