<# .SYNOPSIS One-line description of what this runbook script does. .DESCRIPTION Longer context: symptom it addresses, what it changes, whether it reboots. .NOTES Convention for scripts in this repo — designed to run via: irm https://gitea.ivangodwin.com/ops/rb/raw/branch/main/scripts/.ps1 | iex Because `irm | iex` runs in the caller's session: - No param() block — you can't pass args through the pipe. Prompt with Read-Host instead. - #Requires is NOT enforced under iex — check for admin manually below. - Keep it self-contained: no external module installs, no dot-sourcing. PUBLIC REPO: placeholders only. Never hard-code a client, host, user, or secret. Prompt for them at run time. #> $ErrorActionPreference = 'Stop' # --- Admin check (do not rely on #Requires under iex) --- $isAdmin = ([Security.Principal.WindowsPrincipal] ` [Security.Principal.WindowsIdentity]::GetCurrent() ).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) if (-not $isAdmin) { Write-Warning 'This script needs an elevated PowerShell session. Re-run as Administrator.' return } Write-Host '==