Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PowerShell Sysadmin Scripts

Ten years of working PowerShell from enterprise desktop engineering in healthcare IT — Active Directory, VMware Horizon/vSphere, Epic Hyperspace, and general Windows endpoint management.

What this is

An archive, not a product. These are the scripts that actually ran: the ones written because a manual task came up for the third time and automating it was faster than doing it again. They span roughly 2015 to 2025, and the quality varies accordingly — early ones are terse and hardcoded, later ones use [CmdletBinding()], parameter validation, and comment-based help.

I've kept them as they were rather than cleaning them up. The trajectory is the point.

For what current work looks like, see the module repos: DE.Tools (VDI gold-image lifecycle, with Pester tests), DE.SecretManagement (Delinea Secret Server API client), and Desktop Engineering Scripts.

Organization

Folder Contents
AD Stuff/ Active Directory automation — disabling stale users and computers, bulk OU moves, group membership reporting, O365 license auditing, kiosk and service account provisioning
VMware/ vSphere / Horizon / App Volumes — VM provisioning from config files, gold-image cloning and replication, instant-clone refresh, pool recompose, snapshot cleanup, profile permissions
Hyperspace/ Epic Hyperspace helpers — shortcut deployment and rewriting (from before the Version Independent Launcher existed), installed-version checks, and a login-and-cache routine that pre-warms virtual desktops
Misc/ Printer mapping, drive mapping, silent app installers and update checks, credential file creation, hardware hash collection, log parsing

VMware/Dev/ and VMware/Old/ are exactly what they sound like — work in progress and superseded versions, kept because the older approaches show how the Horizon tooling evolved (linked-clone recompose → instant clones → the current module).

A few worth looking at

  • VMware/New-VMFromConfig.ps1 — builds a VM from a .psd1 config file rather than a wall of parameters, so a build spec is reviewable and version-controllable
  • VMware/Start-VRPGoldClone.ps1 — cross-site gold image replication; the direct ancestor of Start-GMClone in the DE.Tools module
  • AD Stuff/Disable-Computers.ps1 / Disable-Users.ps1 — stale-object cleanup with last-logon thresholds, the kind of hygiene that never happens unless it's scheduled
  • Hyperspace/Start-HyperspaceCaching.ps1 — logs into the EMR on a fresh virtual desktop to warm its cache, cutting first-launch time for clinical staff
  • Misc/Set-SoftIDPrinter.ps1 — location-aware printer mapping driven by a per-site config file, in an environment where "which printer is nearest" changes per workstation

Caveats

Read before running anything here:

  • Placeholders. Hostnames, domains, account names, and share paths have been replaced with generic values (FILESRV01, corp.example.org, adminuser). Nothing here points at real infrastructure, and nothing will work unless you adapt it first.
  • No secret stores. Several scripts reference credential files, KeePass vaults, or a secrets manager by path. Those are not in this repo. Supply your own.
  • Quality varies deliberately. Some scripts have no parameters, no error handling, and hardcoded paths. Those are the old ones. They're here for the record, not as a recommendation.
  • Destructive operations. Several scripts disable accounts, delete snapshots, or remove VMs. Not all of them support -WhatIf. Read before you run.

License

MIT — see LICENSE.

About

Ten years of working PowerShell from enterprise desktop engineering - Active Directory, VMware Horizon/vSphere, Epic Hyperspace, and Windows endpoint management.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages