Skip to content

About

A random collection of scripts I've done.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

# Useful-Scripts

A collection of PowerShell scripts, modules, and small Fluent-UI (WPF) GUI tools for day-to-day Windows sysadmin work — remote drive/printer inventory, Oracle client cleanup, and managing [PSAppDeployToolkit (PSADT)](https://psappdeploytoolkit.com/) deployments and licenses across a fleet of machines.

## Requirements

- Windows with **Windows PowerShell 5.1** (the GUI tools use WPF, which requires Windows PowerShell, not PowerShell 7+)

- Admin rights on target machines for anything that touches HKEY_USERS, uninstalls software, or deploys packages

- **PSRemoting (WinRM)** enabled for the remote/multi-computer tools

- The bundled Fluence.Wpf.dll (and its dependency DLLs) must stay alongside any .ps1/.exe that uses the Fluent UI — each GUI tool folder already ships its own copy

## Repository layout

| Path | What it is |

|---|---|

| Gather Mapped Drives and Printers.ps1 | Standalone script — prompts for a comma-separated list of computer names, remotely collects each logged-on user's mapped drives and printers, and exports the results to a timestamped CSV |

| GetMappedDrivesAndPrinters.psm1 | Module version of the same logic, exposing Get-MappedDrivesAndPrinters -ComputerName <name(s)> for use in your own scripts |

| MappedDrivesandPrinters/ | Fluent-UI (WPF) desktop app wrapping the drive/printer lookup — pick a computer, browse its user profiles, and generate a batch file that remaps drives/printers for that user. Ships as both source (MappedDrivesandPrinters.ps1) and a built .exe |

| Uninstall all Oracle Clients.ps1 | Self-elevating script that scans the registry (HKLM:\\Software\\Oracle and its WOW6432Node) for installed Oracle clients and runs each one's deinstall.bat, logging progress to C:\\OracleDeinstallLog\_<date>.log |

| Oracle\_Uninstaller\_PSADT/ | The Oracle-client removal packaged as a full **PSAppDeployToolkit v4** deployment (icons, config, PSADT runtime, and localized strings included). Run\_This\_Instead.bat is meant to be dropped next to Invoke-AppDeployToolkit.exe on a network share — it copies the package to a local C:\\PSADT folder first (while still running under the user's normal session/network auth) and only elevates the local copy, avoiding the UNC-path-under-elevation problem |

| PSADT\_Update\_Checker.psm1 | Get-AppDeployToolkitVersions -RootPath <path> — recursively scans a deployment share for Invoke-AppDeployToolkit.ps1 files, extracts each package's DeployAppScriptVersion, and exports a CSV report |

| Update-PSADTScriptv4.psm1 | Update-PSADTScript — migrates a folder of legacy PSADT scripts onto a new v4 template, copying template files and porting over the old deploy logic |

| PSADT Tool/ | A toolbox for running and tracking PSADT deployments across a fleet:
• New-PSADTCatalog.ps1 — scans a deployment share (handles flat, nested, or mixed folder layouts) and builds a JSON catalog of every available PSADT package (v3 and v4), parsing app vendor/name/version/arch from each script's AST
• ConvertTo-PSADTCatalogCsv.ps1 — flattens that catalog JSON into a CSV for viewing in Excel
• Invoke-PSADTRemote-UI.ps1 / .exe — Fluent-UI GUI that reads the catalog and deploys a selected PSADT package to remote computers with live progress
• Uninstall-ADT-App-Report.ps1 — scans PSADT packages for their Uninstall-ADTApplication calls and reports usage to CSV (update the default -RootPath for your environment) |

| SAS-Upgrade-Tool/ | Fluent-UI GUI (Invoke-SASSIDRemote-UI.ps1 / .exe) for pushing an updated SAS 9.4 SID (license) file to a remote machine and activating it via Renew SAS Software in quiet mode. It auto-locates SASHome, SASRenew.exe, and setinit.log on the target, and uses setinit.log itself as the source of truth for both the pre-flight architecture/version check and post-run verification |

## Usage notes

- Scripts with a Save-File dialog (e.g. Gather Mapped Drives and Printers.ps1) are interactive and expect to be run at a desktop, not headless.

- The catalog-driven tools (PSADT Tool/) are meant to be used together: run New-PSADTCatalog.ps1 against your deployment share whenever packages change, then point Invoke-PSADTRemote-UI.ps1 at the resulting PSADTCatalog.json.

- A few scripts (e.g. Uninstall-ADT-App-Report.ps1) have an environment-specific default path baked in — check the param() block and adjust before running elsewhere.

- Modules (.psm1) can be imported directly with Import-Module .\\ModuleName.psm1, or dot-sourced as needed.

About

A random collection of scripts I've done.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages