if (-not $sname) is never going to be True; $sname is a string you’ve defined. I assume you meant to do if (-not $svc) in that conditional.
↧
if (-not $sname) is never going to be True; $sname is a string you’ve defined. I assume you meant to do if (-not $svc) in that conditional.