IT Related PowerShell and cmd Scripts.
Checks and displays the default Active Directory containers for new users and computers in the current domain.
Troubleshoots Active Directory domain connectivity and DNS issues by displaying network DNS suffixes and running nslookup/nltest commands for AD SRV records and domain controller details.
Retrieves and displays all enabled and disabled users and computers in Active Directory along with their Organizational Units (OUs).
Prompts for a folder containing extracted ADMX files and the Central Store path (e.g. \domain.com\SYSVOL\domain.com\Policies\PolicyDefinitions), verifies changes, backs up the existing PolicyDefinitions to the user's Documents folder, and copies .admx and en-US .adml files.
AutoHotKey script that types clipboard contents as keystrokes when Ctrl+Shift+V is pressed. Useful for pasting into applications that don't support traditional paste operations.
Retrieves the MFA (Multi-Factor Authentication) status of users in Microsoft Entra ID and exports results to a CSV file. Shows which users have MFA registered and what authentication methods they use.
Queries the NIST CVE API to gather information about specified CVE vulnerabilities including severity, CVSS scores, and descriptions. Exports results to CSV format.
WinSCP extension that generates HTTPS URLs for selected files with the /html/ root path removed.
Recursively backs up specified directories to a location with exclusion rules, removes NTFS permissions from copied files, and logs errors to CSV. Designed for pre-reinstall system backups.
Backs up Windows 11 Start Menu pinned items (start.bin and start2.bin files) to preserve Start Menu customizations.
Copies Windows Users folder without file permission structures, excluding AppData folders to make user data migration easier.
Takes ownership and resets permissions recursively on a specified folder, granting full control to the current user and removing all other permissions.
Grants a specified user full control permissions to their personal folder on a file server. Creates the folder if it doesn't exist.
Reads a CSV file containing usernames and grants each user full control permissions to their personal folder on a file server. Batch version of PersonalFolderPermissions.ps1.
Recursively finds all .exe files in the current directory and subdirectories, then adds Windows Firewall rules to block each executable (both inbound and outbound).
Removes Windows Firewall blocking rules for all .exe files in the current directory and subdirectories.
Legacy batch script version that recursively blocks all .exe files in a folder using netsh commands.
Comprehensive system information gathering script that collects hardware info (CPU, RAM, BIOS, disks, GPU), network configuration, OS details, licensing information, and group policy results. Outputs to a compressed .zip file.
Retrieves detailed Windows license and activation information including product key, license status, activation status, and volume licensing details.
Collects a list of installed software from both 32-bit and 64-bit registry locations, including user-specific installs. Exports to CSV with details like version, publisher, install date, and size.
Deletes the 0.0.0.0 route and renews IP configuration to fix internet connectivity issues after disconnecting from VPN.
VBScript to cycle to the next desktop background image in Windows slideshow.
Displays a continuously updating real-time clock in the command prompt window.
Terminates and restarts Windows Explorer to fix shell-related issues.
Searches Windows registry (HKLM and HKCU) for registry key names containing a specified search term. Exports results to CSV with hive and key path information.
Removes KB5063878 update (known to cause drive issues) and blocks it from reinstalling via Windows Update. Checks for Windows Sandbox conflicts before uninstalling.
Logon script that removes Xbox-related packages for the current user when they log in.
Removes provisioned Xbox packages to prevent installation for new users, and removes installed packages for all existing users.
Batch script version of WinFix that runs CHKDSK, DISM component cleanup, DISM image repair, and SFC system file check. Requires administrator privileges.
Non-administrator version of WinFix
Original WinFix script for LinusTechTips forum by 191x7. Performs 4 repair procedures for Windows maintenance.
Microsoft-provided script to extend the Windows Recovery Environment (WinRE) partition when there's insufficient space for updates. Handles partition resizing, backup, and recreation of WinRE partition.
- Most PowerShell scripts require administrator privileges
- Some scripts are designed for specific scenarios (domain environments, pre-reinstall, etc.)
- Always review script parameters and modify file paths as needed for your environment
- Check script headers for detailed usage instructions and requirements
- Various scripts adapted from community sources
- WinFix scripts originally by 191x7 for LinusTechTips forum
- WinRE resize script provided by Microsoft
GNU Affero General Public License v3
These scripts are provided as-is for IT administration purposes. Use at your own risk and always test in a non-production environment first.