Table of Contents
Section: GPO & PS
Can't Add MSI to Software in GPO
Preconfig an MSI from params with ORCA
PowerShell - Get GPO Details as HTML
PS: Get GPO OU Report
PS: Get OU's for a Policy (Export to CSV)
PS: Get Security Filtering Groups for a Policy
PS: Get members of a group
Recursively Compress Folders with the Folders name as the zip
GPO won't work/apply
GPO Point and Print
Subject Alternate Name
PowerPlan GPO's (Win10 especially)
How long has a process been running
Migrate GPO from One domain to another
PowerShell Export GPOs to a Folder
Section: Systems
Uninstall Hotfix Command Line Automation
Mozilla.cfg - Harden FireFox Proxy/Network settings
dsquery examples
Event Log Query from Command Line
Import picture into AD with PS
Set proxy globally on PC
Get Software, Version, and install date for Servers
Get Hotfixes and Patches on Servers
View Installed Updates Console
Other ways of getting installed updates
Stop Pending Windows Updates
Disable Get Windows Updates from Internet
Create a directory/symbolic link to a UNC path
Enable RDP through Windows Firewall
NetSH Turn off Chimney, AutoTune, and RSS
Network security: LAN Manager authentication level
Security - Disable Time Stamps
Fix folders that say My Documents instead of Usernames
Active Desktop Recovery Fix
Use NTLM instead of Kerberos
WMI causes Hour Delays!
Security Database...Workstation...Trust Relationship
The trust relationship between this workstation and the primary domain failed
VMware: Cannot open disk due to Snapshot issue
Need Sources Server 2012
BackGround Colors/Winlogin
Make monitor turn off/sleep
Disable and Remove Win10 Upgrade Icon
Active Directory One Liners
You were not connected because a duplicate name exists on the network, Go to System in Control Panel
Enable Admin Account
Remove OneDrive From Explorer
sc to Remove a Rouge/Error Service
UAC - Turn on and Off through PS
Procmon - Remotely
Create an empty file at a specific length
DFS Migration Procedure
ReInit Offline Cache DFS
The symbolic link cannot be followed because its type is disabled
Install IIS Role Services (features) using PowerShell
Dumpster in AD/Restore/Undelete
Windows 10, “the connection cannot proceed because authentication is not enabled”
Migrating A Cluster SQL Instance To A Standalone SQL Instance On A Virtual Machine
Easy Way to Change Permissions on the Windows Server Scheduled Tasks Folder (C:\Windows\Tasks)
Add "Restore Ownership to TrustedInstaller" Option in Files and Folders Context Menu in Windows
Shell: folders
Delete Long File Paths when all else fails
Delete Empty Folders using RoboCopy
Registry - Change/Query Default Internet Browser
Registry Is a terminal server? RDS?
MSDOS hide drives (but can still be accessed)
Windows could not connect to the Group Policy Client service (non-Admin accounts)
How to disable driver signature enforcement in windows 10 permanently
Windows 10/11 God Mode
UserAccountControl Attribute/Flag Values
Event ID: 4101 - Same unique identity as the local MS DTC
MS Microsoft EXE won't install - force it
Copy OU structure from one domain to another (PS1)
Disable UAC for Software with Unknown Publisher - Windows 10
Broken START menu
Sign PowerShell CmdLet
Windows 10 Resource Kit
X.500 OID Generation VB Script
Export File Shares and their permissions
Install .NET 3.5 with Source
Keystore in Windows Credential Manager
Uninstall IE10
Cannot install Features DISM
Change System Font
Section: VB.NET
VB.Net: Impersonation Code
VB.Net: Impersonation in a threaded Class with Param
VB: Transparency
Picturebox from the Internet
PSExec as a Resource
Time within Timespan, Range
Excel and for VSTO
DirectorySearcher - FindEntry
SQL Scrubber
ListView Click Cell Editor
ListViewExt - Keep current item highlighted when lost focus
To and From Epoch Time
ilMerge Example
Fix Missing Windows in Taskbar
Section: Scripting & Batch
Quickly script out file extension at command line
Find Newest file using MSDOS
Get Windows' version in DOS batch file
Rename Folder Structure (Shuffle letters) in VBS
Batch Search for Desktop Icons
RegEx in Editor - Change HTML Tag
Event Log for Today Script
Reboot in 5 mins Script
Copy Directory Structure w/o Files
Avamar - Scripts
Find all files in a Folder structure that modified Today
COMMAND Prompt AutoRun, DOSKey, Macros
Set Default Printer
RDS Change Icon
Run Explorer as Another User
Get Profile Sizes for Specific folders
Top Level Folders DOS
Remove Quotes from a String
Monitor Folder and email when greater than specified number of files
Section: Automation
AcroRd32 - Flatten PDF
FastGlacer (AWS) Command Line
VCAL file (*.ics) - Sample
Section: Office
Delete All Shapes in VBA
Sorting Outlook Emails into Subfolders
Slow Addin Fix for Outlook 2013 and 2016
Office Activations with KMS
Enabling Standard User Activation
Send email from MS Access (get rid of the Prompt)
Section: SQL's
MySQL backup DB's script
MySQL Create user with limited permissions
sp_Who2: A little more flexible
List SQL DB's quick
SQL Backdoor - Gaing Access
SQL Backdoor - Run Explorer and/or cmd.exe inside a shell
SQL Log File Sizes - Quick
Linked Server Anonymous
SQL Random Select Rows from Multiple Columns
Create Random Data from a DB table
SQL Email Alert Example
Destination directory for SQL Server 2012 is greyed out
Backdoor into PostgreSQL
Section: Exchange Server
CmdLet: Export/Import Mailbox (via pst)
Mail Enable User Cmdlet Examples
Resource Calendar Permissions - Exchange
Exchange Message Tracking
Out of Office for user(s) Powershell
Turn off Out of Office with Powershell
Add Proxy Address with Powershell
Exchange Inbox Rules
Exchange 2010 mails bounce back with Mailbox disabled
Room Mailbox - enable view of subject and body
Snapin for Public Folder Management
Add permissions recursively to Public Folders
Import IIS Relay IP's
Shared Mailbox (convert to)
Shared Mailbox (create)
Section: Citrix
IMA service won't start
Down Session
Connection Established...Not working
Chrome as Published App in Citrix
Error 1056: Virtual Driver name not found in MODULE.INI
The network connection to your application was interrupted
Citrix Get Application Details
Re-License Terminal Service
Recreate the default RDP Listener
Configure Licensing through PS
Netscaler Backup
NetScaler - Get the MAC address for licensing
TSAdmin on 2012
TSConfig on 2012
Mouse acts up when in a RDP session
Hang on Please wait for Local Session Manager
Grep NetScaler Logs
sh connectiontable
show persistentSessions
NetScaler backup ns.conf
Section: VMWare
.ova image created with Virtual Box, failed to import in VMware
Enable Copy and Paste in Console - VMWare
Trick to get Paravirtual Driver to be available
Protect Folder With Htpasswd In Apache
Disable Apache Cache
Link to folder share in Apache
renamed from eth0:
SSL Cert in Apache
SSL CSR with OpenSSL and Response
How to work with certs in Apache
Remove password from a PFX file
Get all Trusted Root Certs ,trusted
Validate cert chain of website
PFX to PEM, quickly
DER to CRT/PEM (to base64), quickly
"The password you entered is incorrect" when importing .pfx files to Windows certificate store
Apache ReWrite to SSL
Grab all subject alt name from a cert
# Get all certs in a chain
List Cert details
Let's Encrypt Install in Linux
Let's Encrypt Generate a manual certificate
Let's Encrypt Renew
mail from CmdLine Linux
apt-get Cheat Sheet
How to use a WiFi interface
Disable WiFi on RPi
Installation of Flash Plugin - Debian
Lockdown IP tables
nameserver settings
netplan - ubuntu
linux how many pci slots are free
When rebooting a system xrdp fails to start automatically.
Internet Speed Test with CLI
SpeedTest - more accurate
Disable/Enable Services at Boot time
Gnome hangs with ldap authentication
Mount Drives with Current User (easier)
PHP Settings - Force Update
Clean out system journal (linux)
Increase drive space in CentOS (or "Linux LVM" volumes)
Add disk space to any Linux drive Online
Delete Files Older Than x Days on Linux
VirtualBox (vbox) List Running VMs from console
Code to help out links to folders
.nanorc Nano
mp3wrap - combining mp3 files
Display running IP(s) on the Console Login Screen
Switching boot target to text
List RAM and CPU info
Load testing Apache2
Turn off power saving
DD a disk duplicate a disk
IsMounted + crontab +
Ubuntu Documentation
SSSD and Active Directory (Example 1)
Prerequisites, Assumptions, and Requirements
Software Installation
Kerberos Configuration
Samba Configuration
SSSD Configuration
Verify nsswitch.conf Configuration
Modify /etc/hosts
Join the Active Directory
Test Authentication
Home directories with pam_mkhomedir (optional)
Desktop Ubuntu Authentication
Joining Ubuntu to an Active Directory Domain (Example 2)
Clients and Servers
Before We Begin
Joining the domain
Login as Windows user
Join to Domain - Easier - (Example 3)
Work - CentOS Server Build (CNN project)
Wordpress Stuff
Title: Protect Your Admin folder in WordPress by Limiting Access in .htaccess
Title: Directory listing of Info Site's data
WordPress - Make is so users can update automatically
Block wp-admin from all IPs - Only allow certain IPs
Desktop Build outs
Lockdown as prescribed by the pen test results we've received
Shortcut to bring up the mouse cursor theme
RightFax, adding a FAX contact to a Distribtution List
Merge PDFs into a single file using pdfunite (Example)
Exchange and RDP Cannot Change Password after Update
WCF Activation for IIS
IIS: Allow Custom Errors when Delegated
IIS: FTP ditties
Dumb down IE version for IIS
Move IIS default location (IIS7+)
URL Rewrite (IIS) to SSL
URL Rewrite (IIS) - Redirect to FQDN
Internet Explorer
Browser Emulation
RunDLL Emtpy IE cache and other settings
CSS Font Def - Standard
Desktop Configurations
Create Shortcut from Command Line
Shortcut to show Installed updates
System Up/Boot time from Command line
wikiHow to Activate Windows XP Without a Genuine Product Key
Windows XP Activation Loop (Can't log-on to Windows desktop)
ADFS Customizations
Add Supported Agent Strings (for SSO)
Get Metadata
Set Certificate - Service Communication
Set Certificate - ADFS SSL
DUO on Linux where you have the box joined to the domain
Increase DUO timeouts for idle and Active sessions