# IT Helpdesk Automation System
A PowerShell automation system that handles common IT helpdesk tasks
automatically. Built to demonstrate real world scripting skills including
modular design, error handling, logging, and system administration.
---
## What It Does
- Automatically onboards new employees from a CSV file
- Creates user accounts and personal folders
- Assigns users to department groups
- Runs a full system health check
- Generates a daily summary report
- Cleans up log files older than 7 days
- Logs every action with timestamps
---
## Project Structure
HelpdeskAutomation/
│
├── Main.ps1 # Master script - run this to start everything
├── Config.ps1 # All settings and paths in one place
├── Modules/
│ ├── Onboarding.ps1 # Handles new user creation from CSV
│ ├── HealthCheck.ps1 # Collects system health data
│ ├── Cleanup.ps1 # Removes log files older than 7 days
│ └── Reporting.ps1 # Generates the daily summary report
├── Data/
│ └── newusers.csv # Add new employees here before running
├── Logs/
│ └── master.log # Every action is logged here
└── Reports/
  └── daily\_report.txt # Daily summary report saved here
---
## Requirements
- Windows 10 or Windows Server
- PowerShell 5.1 or higher
- Administrator privileges
---
## How To Run
**1. Check your PowerShell version:**
$PSVersionTable
**2. Set execution policy:**
Set-ExecutionPolicy RemoteSigned -Force
**3. Add employees to the CSV:**
Data/newusers.csv
Format:
FullName,Username,Department
John Smith,JohnSmith,IT
Jane Doe,JaneDoe,HR
**4. Run the main script as Administrator:**
\& "C:\\Scripts\\HelpdeskAutomation\\Main.ps1"
**5. Check your results:**
\# View the daily report
Get-Content "C:\\Scripts\\HelpdeskAutomation\\Reports\\daily\_report.txt"
\# View the full log
Get-Content "C:\\Scripts\\HelpdeskAutomation\\Logs\\master.log"
---
## Modules Explained
**Config.ps1**
Central configuration file. All paths, settings and group names are
defined here so you only need to change one file to update the whole system.
**Onboarding.ps1**
Reads newusers.csv and automatically creates a local user account,
personal folder and welcome file for each employee. Assigns them to
their department group and logs every action.
**HealthCheck.ps1**
Collects system information including top CPU processes, stopped services,
disk space and system uptime. Saves a timestamped report to the Reports folder.
**Cleanup.ps1**
Scans the Logs and Reports folders and deletes any files older than 7 days.
Retention period is configurable in Config.ps1.
**Reporting.ps1**
Reads the master log and generates a daily summary showing total successes,
errors and warnings. Saves the full report to Reports/daily_report.txt.
---
## Skills Demonstrated
- Modular script design
- Error handling with Try/Catch/Finally
- CSV importing and processing
- Local user and group management
- System health monitoring
- Automated log cleanup
- Timestamped logging
- Scheduled task creation
- PowerShell functions and dot sourcing
---
## Cleanup
To remove everything created by this script:
Remove-Item "C:\\Scripts\\HelpdeskAutomation" -Recurse -Force
Remove-LocalUser -Name "AliceWilson" -ErrorAction SilentlyContinue
Remove-LocalUser -Name "BobMartin" -ErrorAction SilentlyContinue
Remove-LocalUser -Name "CarolWhite" -ErrorAction SilentlyContinue
Remove-LocalUser -Name "DaveBlack" -ErrorAction SilentlyContinue
Remove-LocalUser -Name "EmmaBrown" -ErrorAction SilentlyContinue
Write-Host "Cleanup complete!" -ForegroundColor Green