Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Trying to understand Remote WMI permissions

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 09-25-2007   #1 (permalink)
Janssen
Guest


 

Trying to understand Remote WMI permissions

Hello. I've been tasked with querying, starting, and stopping services on a
remote machine using a machine-specific local account on the remote machine.
I've decided than an easy way to do this would be to use Powershell:

$cred = get-cred (to be stored later on in an encrypted text file)
gwmi win32_service -cred $cred -comp computer | ? {$_.Name -like "Myservice"}

However, I'm having trouble figuring out what permissions are needed to make
a remote WMI call in Powershell. When I add the said account to the
computer's administrator group, it works. But when the account is in the
user group, the gwmi call fails with access denied. I don't want to make
that account an admin account. I only want it to be able to start, stop, and
query services, which I've delegated through a GPO.

I've tried opening the WMI Control in Computer Management, and as a test,
granted the account write/execute/remote enable/etc. at the root level, and
propagated the changes down, but that doesn't work, so I'm thinking there
must be some other permission required in order for gwmi to work remotely for
a non-admin account. Any ideas as to what I'm missing? I know the question
isn't SPECIFICALLY a Powershell question, but I'm not sure where else I'd
post the question.

Thanks in advance,

Janssen Jones

My System SpecsSystem Spec
Old 09-25-2007   #2 (permalink)
Marco Shaw
Guest


 

Re: Trying to understand Remote WMI permissions

Janssen wrote:
Quote:

> Hello. I've been tasked with querying, starting, and stopping services on a
> remote machine using a machine-specific local account on the remote machine.
> I've decided than an easy way to do this would be to use Powershell:
>
> $cred = get-cred (to be stored later on in an encrypted text file)
> gwmi win32_service -cred $cred -comp computer | ? {$_.Name -like "Myservice"}
>
> However, I'm having trouble figuring out what permissions are needed to make
> a remote WMI call in Powershell. When I add the said account to the
> computer's administrator group, it works. But when the account is in the
> user group, the gwmi call fails with access denied. I don't want to make
> that account an admin account. I only want it to be able to start, stop, and
> query services, which I've delegated through a GPO.
>
> I've tried opening the WMI Control in Computer Management, and as a test,
> granted the account write/execute/remote enable/etc. at the root level, and
> propagated the changes down, but that doesn't work, so I'm thinking there
> must be some other permission required in order for gwmi to work remotely for
> a non-admin account. Any ideas as to what I'm missing? I know the question
> isn't SPECIFICALLY a Powershell question, but I'm not sure where else I'd
> post the question.
>
> Thanks in advance,
>
> Janssen Jones
Just in case... Read this since you're asking about WMI and credentials:
http://www.scriptinganswers.com/foru...s.asp?TID=1041

Marco

--
----------------
PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
I don't understand Jill Vista mail 2 07-21-2008 12:54 AM
Remote registry key permissions UC PowerShell 2 06-23-2008 06:43 AM
WMI remote permissions error ebgreen PowerShell 6 09-20-2007 09:00 AM
Can Someone Help me Understand? argyliz Vista mail 3 07-16-2007 07:47 PM
Vista Permissions Questions (including Remote Desktop) JeffO Vista General 4 02-21-2007 10:01 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51