I have created a script that starts / restarts two particular services on remote computers. It works fine if I am running the script (I am DomainAdmin), however, a plain vanilla user runs it and they receive a Permission Denied : 'GetObject' error. The code os 800A0046. The line it references is
Set objWMIService = GetObject("winmgmts:" & strSVR & "rootcimv2")
Now, I do know that for the user (if they are not local admin) needs to be granted permission to stop/restart services. I have used the SUBINACL and successfully granted the users the right to the particualr services. But I am not sure what permissions I need to grant to allow the user to run this line of code. Thanks
WinMgmts Permission
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
WinMgmts Permission
I have created a script that starts / restarts two particular services on remote computers. It works fine if I am running the script (I am DomainAdmin), however, a plain vanilla user runs it and they receive a Permission Denied : 'GetObject' error. The code os 800A0046. The line it references is
Set objWMIService = GetObject("winmgmts:" & strSVR & "rootcimv2")
Now, I do know that for the user (if they are not local admin) needs to be granted permission to stop/restart services. I have used the SUBINACL and successfully granted the users the right to the particualr services. But I am not sure what permissions I need to grant to allow the user to run this line of code. Thanks
Set objWMIService = GetObject("winmgmts:" & strSVR & "rootcimv2")
Now, I do know that for the user (if they are not local admin) needs to be granted permission to stop/restart services. I have used the SUBINACL and successfully granted the users the right to the particualr services. But I am not sure what permissions I need to grant to allow the user to run this line of code. Thanks
WinMgmts Permission
The SC command can run remotely.
Not a good idea to elevate standard users and give them elevated remote permissions. This can lead to serious trouble.
SC should work as long as the user has permission on the remote object and machine.
Not a good idea to elevate standard users and give them elevated remote permissions. This can lead to serious trouble.
SC should work as long as the user has permission on the remote object and machine.