added placeholder and paramset for deleting a service in Control-Service function

added service removal in Uninstall-NCentralComponents.ps1
This commit is contained in:
2021-07-29 12:57:11 -04:00
parent b8abdf765f
commit 786ca1f983
2 changed files with 17 additions and 1 deletions
+9
View File
@@ -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"""