added several services to delete

This commit is contained in:
2021-07-29 13:28:43 -04:00
parent e8812e22ff
commit c482e0bbc2
+30
View File
@@ -38,6 +38,36 @@ If ( $Service.Length -gt 0 ) {
Catch { LogErr $_.Exception.Message }
}
## Remove Windows Software Probe Maintenance Service
$ServiceName = "Windows Software Probe Maintenance Service"
$Service = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue
If ( $Service.Length -gt 0 ) {
Control-Service -Stop -Name $ServiceName
LogMsg "Deleting the service: ""${ServiceName}"""
Try { Start-Process "sc" -ArgumentList "delete ${ServiceName}" -Wait }
Catch { LogErr $_.Exception.Message }
}
## Remove Windows Software Probe Syslog Service
$ServiceName = "Windows Software Probe Syslog Service"
$Service = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue
If ( $Service.Length -gt 0 ) {
Control-Service -Stop -Name $ServiceName
LogMsg "Deleting the service: ""${ServiceName}"""
Try { Start-Process "sc" -ArgumentList "delete ${ServiceName}" -Wait }
Catch { LogErr $_.Exception.Message }
}
## Remove Windows Software Probe Service
$ServiceName = "Windows Software Probe Service"
$Service = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue
If ( $Service.Length -gt 0 ) {
Control-Service -Stop -Name $ServiceName
LogMsg "Deleting the service: ""${ServiceName}"""
Try { Start-Process "sc" -ArgumentList "delete ${ServiceName}" -Wait }
Catch { LogErr $_.Exception.Message }
}
## Remove "MspPlatform" directory
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform" ) {
LogMsg "Forcefully removing ""${Env:ProgramFiles(x86)}\MspPlatform"""