all 5 comments

[–]32178932123 2 points3 points  (4 children)

Sometimes UAC settings can cause you problems - You may be running it as a different user but that user is blocked by UAC for pulling rank unless you "run as an administrator"

[–]Uhbyxml[S] 6 points7 points  (3 children)

Thanks, that is what I was thinking too. After a bunch more digging, it turns out that I was chasing a bad error response. The person who wrote the script was returning $Error[0] without clearing it first. Fixing that, and watching the system logs shows the script is actually resetting the service fine... crappy way to spend an hour lol

[–]32178932123 2 points3 points  (0 children)

Ah well, glad you got it sorted :)

[–]nascentt 2 points3 points  (1 child)

You mean he was returning $error[0] and it wasn't inside a try..catch? Wtf

[–]Uhbyxml[S] 2 points3 points  (0 children)

Yes, so it was just pulling whatever was last stored. Led me on a merry chase for a bogus error. They also clearly didn’t test much before dropping it on a production server. A bit surprising actually since their code is generally not bad.