PS1 Restart service as specified user
I’m trying to create a PS1 script to restart a service in a computer, where the user has no admin right, so i’m trying to execute as de admin user, now i’m trying first to open Notepad, but when I execute this script:
How to loop through checking when a service is created
I can’t get Start-Job/Wait-Job working, my script ignores it for some reason and moves on to starting the service immediately, which always throws an error because the service doesn’t exist yet.