added the -cleanup to the checkbox
This commit is contained in:
@@ -1780,12 +1780,18 @@ function Handle-CleanupSVSMSP {
|
||||
param($Context)
|
||||
|
||||
try {
|
||||
if (Get-Command Cleanup-SVSMSP -ErrorAction Stop) {
|
||||
Cleanup-SVSMSP
|
||||
Write-LogHybrid "SVSMSP toolkit cleanup complete" Success OffBoard -LogToEvent
|
||||
if (Get-Command Install-SVSMSP -ErrorAction Stop) {
|
||||
# This will:
|
||||
# - 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."
|
||||
} else {
|
||||
throw "Cleanup-SVSMSP cmdlet not found in SVSMSP toolkit."
|
||||
throw "Install-SVSMSP function not found in current session."
|
||||
}
|
||||
}
|
||||
catch {
|
||||
|
||||
Reference in New Issue
Block a user