added placeholder and paramset for deleting a service in Control-Service function
added service removal in Uninstall-NCentralComponents.ps1
This commit is contained in:
@@ -28,6 +28,15 @@ If ( Test-Path "${ProgramFiles(x86)}\N-able Technologies\Windows Software Probe\
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
}
|
||||
|
||||
## Remove NablePatchRepositoryService
|
||||
$Service = Get-Service -Name NablePatchRepositoryService -ErrorAction SilentlyContinue
|
||||
If ( $Service.Length -gt 0 ) {
|
||||
Control-Service -Stop -Name $Service.ServiceName
|
||||
LogMsg "Deleting the service: ""NablePatchRepositoryService"""
|
||||
Try { $Service | Remove-Service }
|
||||
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