← Back to projects

PowerShell Automation Toolkit

IT Automation Toolkit

A collection of PowerShell utilities developed during my IT internship to reduce repetitive support work and make common troubleshooting tasks easier to run remotely through NinjaOne.

The project focused on production-oriented automation, including readable console output, timestamped logs, optional parameters, execution summaries, and graceful error handling.

PowerShellWindowsNinjaOneAutomation

PowerShell

PS C:\Automation> .\MappedDriveViewer.ps1

2025-07-15 09:42:11 - === Mapped Drive Viewer Started ===
2025-07-15 09:42:11 - Drive: C:, Path: C:\, Status: OK
2025-07-15 09:42:11 - Drive: Z:, Path: \\fileserver\Finance, Status: OK
2025-07-15 09:42:11 - Drive: Y:, Path: \\fileserver\HR, Status: Unavailable
2025-07-15 09:42:11 - === Mapped Drive Viewer Completed Successfully ===

PS C:\Automation> .\OneDriveReset.ps1

[2025-07-18 10:14:57] Stopping OneDrive...
[2025-07-18 10:14:59] Running OneDrive /reset command...
[2025-07-18 10:15:09] Restarting OneDrive...
[2025-07-18 10:15:15] OneDrive restarted successfully.
[2025-07-18 10:15:15] Full OneDrive reset completed.
[2025-07-18 10:15:15] Script execution ended.

PS C:\Automation> █

The Problem

Common IT support tasks often require the same manual steps.

IT technicians frequently repeat troubleshooting procedures across multiple devices, including checking mapped drives, resetting OneDrive, refreshing network settings, and clearing temporary files. Running each step manually can be time-consuming, inconsistent, and difficult to scale across remote endpoints.

The Solution

Reusable command-line utilities designed for remote execution.

I developed PowerShell scripts intended to run as NinjaOne automations. Each script focused on one repeatable support task and returned clear output that a technician could review remotely.

The scripts were designed without GUI dependencies or unapproved external modules, making them more suitable for automated execution across Windows devices.

Shared patterns such as logging, validation, status checks, and exception handling were used to make each utility easier to test, maintain, and troubleshoot.

Featured Scripts

Automation built around everyday support workflows

01

Mapped Drive Viewer

A diagnostic script that lists file-system drives, displays each path, verifies availability, and optionally filters the results by drive letter.

• Lists available drives

• Checks whether each path is reachable

• Supports optional filtering

• Produces timestamped output

• Handles failures with readable messages

$drives = Get-PSDrive -PSProvider FileSystem

if ($DriveLetter) {
    $drives = $drives | Where-Object {
        $_.Name -eq $DriveLetter
    }
}

foreach ($drive in $drives) {
    $status = if (Test-Path $drive.Root) {
        "OK"
    } else {
        "Unavailable"
    }

    Log "Drive: $($drive.Name):, Path: $($drive.Root), Status: $status"
}

02

OneDrive Reset Utility

A support utility that stops OneDrive, runs Microsoft's supported reset command, restarts the application, and checks whether the process returned successfully.

• Stops running OneDrive processes

• Executes the supported reset command

• Restarts the application

• Verifies the running process

• Reports success and failure states

$OneDriveExe = "C:\Program Files\Microsoft OneDrive\OneDrive.exe"

Get-Process OneDrive -ErrorAction SilentlyContinue |
    Stop-Process -Force -ErrorAction SilentlyContinue

Start-Process $OneDriveExe -ArgumentList "/reset"
Start-Sleep -Seconds 10

Start-Process $OneDriveExe

if (Get-Process OneDrive -ErrorAction SilentlyContinue) {
    Log "OneDrive restarted successfully."
}

Original Project Scope

Four utilities designed for the internship toolkit

Utility

Status

Mapped Drive Viewer

Completed

OneDrive Reset Utility

Completed

System Cleanup Utility

Planned scope

Network Refresh

Planned scope

Tools & Technologies

Language

PowerShell

Platform

Windows • NinjaOne • OneDrive

Engineering Practices

CLI automation • Timestamped logging • Error handling • Remote execution

Development

Visual Studio Code • Git • GitHub

What I Learned

This project taught me to design automation for reliability, repeatability, and remote support.

I learned to approach scripting from an operational perspective rather than only focusing on whether a command worked once. Each utility needed clear output, safe failure behavior, reusable structure, and enough validation for another technician to understand what happened. The project also strengthened my PowerShell skills and introduced me to designing automation with remote deployment through NinjaOne in mind.