param(
|
[string]$ServiceName = "JhmGatewayService",
|
[string]$NssmPath = "nssm"
|
)
|
|
& $NssmPath stop $ServiceName | Out-Null
|
& $NssmPath remove $ServiceName confirm
|
|
if ($LASTEXITCODE -ne 0) {
|
throw "Failed to remove service via NSSM."
|
}
|
|
Write-Host "Service removed: $ServiceName"
|