A collection of 25 production-ready PowerShell scripts for Windows system administrators β covering diagnostics, monitoring, security, maintenance, and automation.
- Overview
- Requirements
- Getting Started
- Scripts
- Usage Examples
- Safety & Best Practices
- Logging
- Contributing
- License
SysAdmin-PS-Toolkit is a complete library of PowerShell scripts designed to streamline common IT administration tasks on Windows environments. Each script is:
- β
Self-documented with
.SYNOPSIS,.DESCRIPTION, and.EXAMPLEheaders - β
Built with
try/catcherror handling throughout - β Safe by default β destructive scripts run in preview mode unless explicitly confirmed
- β Logging-enabled for auditing and troubleshooting
- β Runnable standalone β no external dependencies or modules required
| Requirement | Details |
|---|---|
| PowerShell | Version 5.1 or higher ($PSVersionTable.PSVersion) |
| OS | Windows 10 / Windows 11 / Windows Server 2016+ |
| Privileges | Most scripts run as standard user; some require Administrator (noted per script) |
1. Clone the repository
git clone https://github.com/YOUR-USERNAME/SysAdmin-PS-Toolkit.git
cd SysAdmin-PS-Toolkit2. Allow script execution (if not already set)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser3. Run any script
.\SystemInventory.ps14. Get help for any script
Get-Help .\SystemInventory.ps1 -Full| Script | Description | Admin Required |
|---|---|---|
SystemInventory.ps1 |
Gathers hardware specs, OS version, installed software, and network configuration into a full inventory report | |
DiskSpaceReporter.ps1 |
Checks available disk space on all drives, identifies largest files and folders, flags low-space warnings | β |
NetworkDiagnostics.ps1 |
Tests connectivity, DNS resolution, ping tests, and verifies full IP configuration | β |
EventLogAnalyzer.ps1 |
Pulls and summarizes Error/Critical events from System, Application, and Security logs | |
PerformanceMonitor.ps1 |
Samples CPU, memory, and disk I/O metrics over a configurable period; identifies top resource-consuming processes | β |
SystemReportGenerator.ps1 |
One-click comprehensive system report combining inventory, disk, events, performance, and software into a single output |
| Script | Description | Admin Required |
|---|---|---|
PasswordResetUtility.ps1 |
Interactive menu for changing passwords (with strength validation), unlocking accounts, and viewing account status | |
PasswordPolicyEnforcer.ps1 |
Audits and enforces local password policy settings β complexity, length, expiry, lockout thresholds | β Always |
USBDeviceBlocker.ps1 |
Enables or disables USB storage device access via registry and Group Policy. Preview mode by default | β Always |
FirewallConfigurator.ps1 |
Manages Windows Firewall rules β add, remove, enable/disable, and export firewall config | β Always |
AntivirusStatusChecker.ps1 |
Reports Windows Defender / AV status, last scan time, definition age, and real-time protection state | β Recommended |
Get-LocalAdminReport.ps1 |
Audits local Administrators group membership across remote computers β detects unauthorized local admins | β Always |
| Script | Description | Admin Required |
|---|---|---|
NetworkDriveConnector.ps1 |
Maps predefined network drives with credential fallback, checks VPN status, and tests share reachability | β |
PrinterInstaller.ps1 |
Installs network printers by IP or hostname, sets default printer, and removes stale printer entries | β Always |
| Script | Description | Admin Required |
|---|---|---|
ProfileCleanup.ps1 |
Removes temp files, browser caches, prefetch, and Recycle Bin contents. Runs in preview mode by default | |
TempFileCleaner.ps1 |
Cleans Windows temp folders, WinSxS backup files, and CBS logs to reclaim disk space | β Always |
DeviceDriverUpdater.ps1 |
Scans for outdated or missing drivers using Windows Update and PnP utilities | β Always |
Watch-DiskSpace.ps1 |
Continuous disk space monitor with configurable warning and critical thresholds β live color-coded dashboard | β |
| Script | Description | Admin Required |
|---|---|---|
WindowsUpdateChecker.ps1 |
Scans for pending Windows Updates using the WUA API, lists severity and KB numbers, optionally triggers downloads | |
SoftwareInventory.ps1 |
Lists all installed applications (64-bit, 32-bit, AppX) with versions and publishers; supports approved-list compliance checks | β |
ApplicationInstaller.ps1 |
Installs applications silently via Winget or direct installer β supports bulk install from a config list | β Always |
SoftwareUninstaller.ps1 |
Uninstalls applications by name with confirmation β supports wildcard matching and bulk removal | β Always |
| Script | Description | Admin Required |
|---|---|---|
Invoke-RemoteCommand.ps1 |
Run any PowerShell command or script file on one or multiple remote machines in parallel via WinRM | β Always |
Get-ScheduledTaskReport.ps1 |
Audits scheduled tasks across local/remote machines β flags non-Microsoft and suspicious tasks | β Always |
New-LocalUserProvision.ps1 |
Creates and configures local user accounts on remote machines β supports bulk CSV provisioning | β Always |
Legend: β = Always required Β
β οΈ = Recommended Β β = Not required
# Full system inventory with CSV export
.\SystemInventory.ps1 -OutputPath "C:\Reports" -ExportCSV
# Find top 30 largest files on D: drive
.\DiskSpaceReporter.ps1 -DriveLetter D -TopN 30
# Run network diagnostics against custom targets
.\NetworkDiagnostics.ps1 -PingTargets "192.168.1.1","10.0.0.1","google.com"
# Analyze last 48 hours of event logs
.\EventLogAnalyzer.ps1 -HoursBack 48 -MaxEvents 1000
# Monitor performance for 2 minutes
.\PerformanceMonitor.ps1 -DurationSeconds 120 -IntervalSeconds 10
# Preview what ProfileCleanup would delete (no files removed)
.\ProfileCleanup.ps1
# Actually run the cleanup
.\ProfileCleanup.ps1 -Execute
# Audit local admins across an OU
.\Get-LocalAdminReport.ps1 -OUPath "OU=Workstations,DC=corp,DC=local" -FlagDomainUsers
# Run a command on multiple remote machines in parallel
.\Invoke-RemoteCommand.ps1 -ComputerName "PC01","PC02","PC03" -Command "Get-Service Spooler"
# Audit scheduled tasks and flag suspicious ones
.\Get-ScheduledTaskReport.ps1 -ComputerName "Server01" -FlagSuspicious -NonMicrosoftOnly
# Live disk space monitor with custom thresholds
.\Watch-DiskSpace.ps1 -ComputerName "FileServer" -WarnPercent 25 -CritPercent 10 -IntervalSec 120
# One-time disk snapshot
.\Watch-DiskSpace.ps1 -Snapshot -OutputPath "C:\Reports"
# Create a local kiosk account on a remote machine
.\New-LocalUserProvision.ps1 -ComputerName "Kiosk01" -Username "kiosk" -FullName "Kiosk Account" -AddToGroup "Users"
# Bulk provision local accounts from CSV
.\New-LocalUserProvision.ps1 -CSVPath "C:\LocalUsers.csv"
# Software inventory with approved apps check
.\SoftwareInventory.ps1 -IncludeStoreApps -ApprovedListPath "C:\Config\approved_apps.txt"- Preview before executing β Scripts like
ProfileCleanup.ps1andUSBDeviceBlocker.ps1default to dry-run mode. Always review output before passing-Execute. - Test in a non-production environment first β Validate scripts on a test machine before wide deployment.
- Run with least privilege β Only elevate to Administrator when a script explicitly requires it.
- Review configurable sections β Scripts like
NetworkDriveConnector.ps1contain a# CONFIGURE YOUR DRIVES HEREblock that must be updated for your environment. - WinRM required for remote scripts β
Invoke-RemoteCommand.ps1,Get-LocalAdminReport.ps1,Get-ScheduledTaskReport.ps1, andNew-LocalUserProvision.ps1require WinRM enabled on targets (Enable-PSRemoting).
Scripts that perform sensitive or destructive actions write audit logs automatically:
| Script | Log File |
|---|---|
PasswordResetUtility.ps1 |
PasswordReset_Audit.log |
NetworkDriveConnector.ps1 |
NetworkDrives_Audit.log |
ProfileCleanup.ps1 |
ProfileCleanup_<timestamp>.txt |
Get-LocalAdminReport.ps1 |
LocalAdminReport_<timestamp>.log |
Invoke-RemoteCommand.ps1 |
RemoteCommand_<timestamp>.log |
New-LocalUserProvision.ps1 |
LocalUserProvision_<timestamp>.log |
Watch-DiskSpace.ps1 |
DiskSpaceAlerts_<date>.log |
All report-generating scripts save timestamped .txt and/or .csv files to your Desktop by default, or to any path specified with -OutputPath.
Contributions are welcome! To add or improve a script:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-script-name - Follow the existing script structure (header comments, error handling, logging)
- Submit a pull request with a clear description of what the script does
Please ensure all scripts follow these standards:
- Full comment-based help block (
.SYNOPSIS,.DESCRIPTION,.PARAMETER,.EXAMPLE,.NOTES) try/catchfor all major operations- Confirmation prompt before any destructive action
- Tested on Windows 10 and Windows 11
This project is licensed under the MIT License.
Made for IT teams who'd rather automate than repeat themselves.