added the cleanup switch

This commit is contained in:
2025-06-29 14:01:10 -04:00
parent cf8affac63
commit 80af2d87ae

View File

@@ -75,8 +75,11 @@
# → writes datto_sites.csv # → writes datto_sites.csv
.EXAMPLE .EXAMPLE
Before i built the Invoke-scriptmonkey & ([ScriptBlock]::Create((iwr 'sm.svstools.ca').Content )) -SilentInstall
& ([ScriptBlock]::Create( (iwr 'sm.svstools.ca').Content )) -SilentInstall
.EXAMPLE
& ([ScriptBlock]::Create((iwr 'sm.svstools.com').Content)) -Cleanup
.EXAMPLE .EXAMPLE
not tested but i thin this is how would call it not tested but i thin this is how would call it
@@ -102,6 +105,11 @@
# ───────────────────────────────────────────────────────── # ─────────────────────────────────────────────────────────
# Toolkit-only mode # Toolkit-only mode
[Parameter(Mandatory,ParameterSetName='Toolkit')][switch]$SilentInstall, [Parameter(Mandatory,ParameterSetName='Toolkit')][switch]$SilentInstall,
# ─────────────────────────────────────────────────────────
# remove Toolkit
[Parameter(Mandatory,ParameterSetName='Cleanup')][switch]$Cleanup,
# ───────────────────────────────────────────────────────── # ─────────────────────────────────────────────────────────
# Datto headless mode # Datto headless mode
@@ -138,6 +146,12 @@
return return
} }
'Cleanup' {
Write-LogHybrid "Running Toolkit cleanup mode" Info Startup
Install-SVSMSP -Cleanup
return
}
# ─────────────────────────────────────────────────────────── # ───────────────────────────────────────────────────────────
# 2) If user only wants the site list, do that and exit # 2) If user only wants the site list, do that and exit
# ─────────────────────────────────────────────────────────── # ───────────────────────────────────────────────────────────