added several services to delete
This commit is contained in:
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user