2021-07-29 12:36:52 -04:00
|
|
|
|
|
|
|
|
## Remove N-Central Patch Management Service Controller
|
2021-07-19 11:11:44 -04:00
|
|
|
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform\PME\unins000.exe" ) {
|
2021-07-09 21:02:44 -04:00
|
|
|
LogMsg "Uninstalling N-Central Patch Management Service Controller"
|
2021-07-09 21:11:54 -04:00
|
|
|
Try { Start-Process "${Env:ProgramFiles(x86)}\MspPlatform\PME\unins000.exe" -ArgumentList "/SILENT" -Wait }
|
|
|
|
|
Catch { LogErr $_.Exception.Message }
|
2021-07-09 21:02:44 -04:00
|
|
|
}
|
|
|
|
|
|
2021-07-19 11:11:44 -04:00
|
|
|
## Remove N-Central File Cache Service Agent
|
2021-07-09 21:02:44 -04:00
|
|
|
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform\FileCacheServiceAgent\unins000.exe" ) {
|
|
|
|
|
LogMsg "Uninstalling N-Central File Cache Service Agent"
|
2021-07-09 21:11:54 -04:00
|
|
|
Try { Start-Process "${Env:ProgramFiles(x86)}\MspPlatform\FileCacheServiceAgent\unins000.exe" -ArgumentList "/SILENT" -Wait }
|
|
|
|
|
Catch { LogErr $_.Exception.Message }
|
2021-07-09 21:06:13 -04:00
|
|
|
}
|
|
|
|
|
|
2021-07-19 11:11:44 -04:00
|
|
|
## Remove N-Central Request Handler Agent
|
2021-07-09 21:06:13 -04:00
|
|
|
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform\RequestHandlerAgent\unins000.exe" ) {
|
|
|
|
|
LogMsg "Uninstalling N-Central Request Handler Agent"
|
2021-07-09 21:11:54 -04:00
|
|
|
Try { Start-Process "${Env:ProgramFiles(x86)}\MspPlatform\RequestHandlerAgent\unins000.exe" -ArgumentList "/SILENT" -Wait }
|
|
|
|
|
Catch { LogErr $_.Exception.Message }
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-19 11:11:44 -04:00
|
|
|
## Remove Windows Software Probe
|
2021-08-05 09:42:15 -04:00
|
|
|
If ( Test-Path "${ProgramFiles(x86)}\N-able Technologies\Windows Software Probe\" ) {
|
2021-07-19 11:11:44 -04:00
|
|
|
$ProductCode = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\N-able Technologies\Windows Software Probe").ProductCode
|
|
|
|
|
LogMsg "Uninstalling Windows Software Probe"
|
|
|
|
|
Try { Start-Process "msiexec.exe" -ArgumentList "/X {${ProductCode}} /qn" -Wait }
|
|
|
|
|
Catch { LogErr $_.Exception.Message }
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-29 19:05:08 -04:00
|
|
|
## Remove Windows Agent
|
2021-08-05 09:42:15 -04:00
|
|
|
If ( Test-Path "${ProgramFiles(x86)}\N-able Technologies\Windows Agent\" ) {
|
|
|
|
|
LogMsg "Uninstalling N-Central Windows Agent"
|
|
|
|
|
Try { Start-Process "msiexec.exe" -ArgumentList "/X{F5873D07-85EE-4010-A461-B60989884B1C} /qn" -Wait }
|
|
|
|
|
Catch { LogErr $_.Exception.Message }
|
|
|
|
|
}
|
2021-07-29 19:05:08 -04:00
|
|
|
|
2021-07-29 12:57:11 -04:00
|
|
|
## Remove NablePatchRepositoryService
|
2021-07-29 13:01:54 -04:00
|
|
|
$ServiceName = "NablePatchRepositoryService"
|
|
|
|
|
$Service = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue
|
2021-07-29 12:57:11 -04:00
|
|
|
If ( $Service.Length -gt 0 ) {
|
2021-07-29 13:01:54 -04:00
|
|
|
Control-Service -Stop -Name $ServiceName
|
|
|
|
|
LogMsg "Deleting the service: ""${ServiceName}"""
|
|
|
|
|
Try { Start-Process "sc" -ArgumentList "delete ${ServiceName}" -Wait }
|
2021-07-29 12:57:11 -04:00
|
|
|
Catch { LogErr $_.Exception.Message }
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-29 13:28:43 -04:00
|
|
|
## 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 }
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-29 16:31:50 -04:00
|
|
|
## Remove Windows Agent Maintenance Service
|
|
|
|
|
$ServiceName = "Windows Agent 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 Agent Service
|
|
|
|
|
$ServiceName = "Windows Agent 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 }
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-19 11:11:44 -04:00
|
|
|
## Remove "MspPlatform" directory
|
2021-07-09 21:11:54 -04:00
|
|
|
If ( Test-Path "${Env:ProgramFiles(x86)}\MspPlatform" ) {
|
|
|
|
|
LogMsg "Forcefully removing ""${Env:ProgramFiles(x86)}\MspPlatform"""
|
|
|
|
|
Try { Remove-Item "${Env:ProgramFiles(x86)}\MspPlatform" -Recurse -Force }
|
|
|
|
|
Catch { LogErr $_.Exception.Message }
|
2021-07-09 21:21:47 -04:00
|
|
|
}
|
|
|
|
|
|
2021-07-19 11:11:44 -04:00
|
|
|
## Remove "N-able Technologies" directory
|
|
|
|
|
If ( Test-Path "${Env:ProgramFiles(x86)}\N-able Technologies" ) {
|
2021-07-09 21:21:47 -04:00
|
|
|
LogMsg "Forcefully removing ""${Env:ProgramFiles(x86)}\N-able Technologies"""
|
|
|
|
|
Try { Remove-Item "${Env:ProgramFiles(x86)}\N-able Technologies" -Recurse -Force }
|
|
|
|
|
Catch { LogErr $_.Exception.Message }
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-19 11:11:44 -04:00
|
|
|
## Remove "N-able Technologies" registry key
|
|
|
|
|
If ( Test-Path "HKLM:SOFTWARE\Wow6432Node\N-able Technologies" ) {
|
|
|
|
|
LogMsg "Forcefully removing ""HKLM:SOFTWARE\Wow6432Node\N-able Technologies"""
|
|
|
|
|
Try { Remove-Item "HKLM:SOFTWARE\Wow6432Node\N-able Technologies" -Recurse -Force }
|
|
|
|
|
Catch { LogErr $_.Exception.Message }
|
|
|
|
|
}
|
2021-07-09 21:21:47 -04:00
|
|
|
If ( Test-Path "HKLM:SOFTWARE\N-able Technologies" ) {
|
|
|
|
|
LogMsg "Forcefully removing ""HKLM:SOFTWARE\N-able Technologies"""
|
|
|
|
|
Try { Remove-Item "HKLM:SOFTWARE\N-able Technologies" -Recurse -Force }
|
|
|
|
|
Catch { LogErr $_.Exception.Message }
|
2021-07-19 11:11:44 -04:00
|
|
|
}
|