I'm having an issue with the Print Spooler getting hung up on a Hyper-V server that im running and tickets get hung up...Im just trying to streamline this by figuring out how i can just run a powershell script without having to enter any credentials manually. I can get a powershell script to accomplish this but the only one that i have found implements the Get-Credentials and prompts to enter credentials then i get put into a remote Powershell session on the server where i can restart the service from there.
Is there an easier way to accomplish what i am trying to do?
Restart-Service -Name spooler -ComputerName hyperv-server.domain.fqdnorInvoke-Command {Restart-Service -Name spooler} -ComputerName hyperv-server.domain.fqdn, PowerShell will simply default to the callers network identity when no explicit credentials are passed-credential (get-credential)do avoid the prompt, but if you're getting access denied, then there's something else wrong. Are both servers joined to the same domain/forest?