- You have to run this script as Privileged user or as Administrator
- Your administrator should have allowed remote execution of script on the target machine
This is just a sample of starting Spooler Service on a remote machine
$computername = "XXX3AZYYY"
$c = Get-Credential -Credential "domain\AdminUsername"
$m = Get-WmiObject -Class Win32_Service -ComputerName $computername -Credential $c -Filter "Name='spooler'"
$m.StartService()
No comments:
Post a Comment