AutomationIn Progress

PowerShell IT Administration & Automation Scripts

PowerShell automation scripts for bulk Active Directory user onboarding via CSV, system inventory reporting, and automated maintenance tasks.

PowerShell 7Active Directory ModuleCSV ParsingTask SchedulerWindows Administration

Overview

A collection of administrative PowerShell scripts designed to reduce manual workload and eliminate human error in routine IT tasks.

Project Objective & Scope

To automate user onboarding/offboarding workflows, expiring password alerts, and regular health auditing.

Lab Environment & Hardware/Software

Development Environment: Windows 11 / PowerShell 7 & VS Code
Target Environment: Windows Server 2022 Active Directory
Modules: ActiveDirectory, Microsoft.PowerShell.Management

Implementation & Configuration Steps

1. CSV-driven Bulk User Onboarding

Script parses employee CSV data, provisions AD user accounts inside target OUs, and enforces password change on first logon.

2. Stale Account Auditing Script

Queries AD for accounts inactive for over 90 days and exports structured compliance reports in CSV and HTML.

3. Disk Space & Service Health Monitor

Checks key Windows services and disk utilization thresholds, logging alerts when limits are exceeded.

Troubleshooting & Problems Encountered

Problem Encountered

Special character encoding issues when importing international character sets from CSV.

Diagnostic Investigation

Identified character encoding mismatch during Import-Csv execution.

Resolution & Verification

Enforced UTF-8 encoding in Import-Csv and implemented regex character sanitization for SAMAccountNames.

What I Learned & Key Takeaways

  • Mastered object-oriented pipeline passing in PowerShell.
  • Applied structured error handling (Try/Catch) and verbose transcript logging for robust operational scripts.