added the -cleanup to the checkbox
This commit is contained in:
@@ -1780,12 +1780,18 @@ function Handle-CleanupSVSMSP {
|
|||||||
param($Context)
|
param($Context)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (Get-Command Cleanup-SVSMSP -ErrorAction Stop) {
|
if (Get-Command Install-SVSMSP -ErrorAction Stop) {
|
||||||
Cleanup-SVSMSP
|
# This will:
|
||||||
Write-LogHybrid "SVSMSP toolkit cleanup complete" Success OffBoard -LogToEvent
|
# - Uninstall SVSMSP
|
||||||
|
# - Unregister SVS_Repo
|
||||||
|
# - Remove SVSMSP from the session
|
||||||
|
# - Delete HKLM:\Software\SVS\Deployment (via Remove-SVSDeploymentRegKey)
|
||||||
|
Install-SVSMSP -Cleanup
|
||||||
|
|
||||||
|
Write-LogHybrid "SVSMSP toolkit cleanup complete (module, repo, registry)." Success OffBoard -LogToEvent
|
||||||
Respond-Text $Context "SVSMSP toolkit cleanup complete."
|
Respond-Text $Context "SVSMSP toolkit cleanup complete."
|
||||||
} else {
|
} else {
|
||||||
throw "Cleanup-SVSMSP cmdlet not found in SVSMSP toolkit."
|
throw "Install-SVSMSP function not found in current session."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
|
|||||||
Reference in New Issue
Block a user