added the cleanup switch
This commit is contained in:
@@ -75,9 +75,12 @@
|
|||||||
# → 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
|
||||||
iex (iwr 'https://your.server/ScriptMonkey.ps1' -UseBasicParsing).Content; Invoke-ScriptMonkey -DattoApiUrl
|
iex (iwr 'https://your.server/ScriptMonkey.ps1' -UseBasicParsing).Content; Invoke-ScriptMonkey -DattoApiUrl
|
||||||
@@ -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
|
||||||
# ───────────────────────────────────────────────────────────
|
# ───────────────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user