Skip to content

jwidess/IT-Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IT-Scripts

IT Related PowerShell and cmd Scripts.

Table of Contents


Active Directory

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.


AHK (AutoHotKey)

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.


Entra

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.


Other

CVE

Queries the NIST CVE API to gather information about specified CVE vulnerabilities including severity, CVSS scores, and descriptions. Exports results to CSV format.

WinSCP

WinSCP extension that generates HTTPS URLs for selected files with the /html/ root path removed.

Certificates & Signatures

Verifies an executable or DLL's signature and trust chain (runs signtool and PowerShell Authenticode checks) and inspects Zone.Identifier streams.


Windows

Backup Scripts

Prior to Reinstall Backup

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.

Win 11 Start Menu Pinned Items Backup

Backs up Windows 11 Start Menu pinned items (start.bin and start2.bin files) to preserve Start Menu customizations.

Windows Users Folder Backup

Copies Windows Users folder without file permission structures, excluding AppData folders to make user data migration easier.

File Permissions

Takes ownership and resets permissions recursively on a specified folder, granting full control to the current user and removing all other permissions.

Personal Folders

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.

Firewall

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.

Get Computer Info

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.

Gathers information about physical disks, partitions, and volumes, including SMART status via smartmontools if installed.

Gathers information about the Windows Subsystem for Linux (WSL) installation, including the status of WSL features and installed distributions.

Licensing Info

Retrieves detailed Windows license and activation information including product key, license status, activation status, and volume licensing details.

Display Windows 11 activation status and activate Windows by installing and applying a product key.

List Installed Software

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.

Other Utilities

Deletes the 0.0.0.0 route and renews IP configuration to fix internet connectivity issues after disconnecting from VPN.

Displays a continuously updating real-time clock in the command prompt window.

Registry

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.

Uninstall Scripts

Windows Updates

Removes KB5063878 update (known to cause drive issues) and blocks it from reinstalling via Windows Update. Checks for Windows Sandbox conflicts before uninstalling.

Xbox Removal

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.

WinFix

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.

WinRE Fix (0x80070643)

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.


Usage Notes

  • 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

Credits

  • Various scripts adapted from community sources
  • WinFix scripts originally by 191x7 for LinusTechTips forum
  • WinRE resize script provided by Microsoft

License

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.

About

IT Related Cmd and PowerShell Scripts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •