Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Get-wmiobject, permissions issue...

Reply
 
Old 04-20-2007   #1 (permalink)
Phil N


 
 

Get-wmiobject, permissions issue...

hello everyone! I am having a bit of an issue getting past the wmi
permissions using the following script. if i run as an admin it connects
just fine but if connect as a differnet user it gives me access denied
message *** Get-WmiObject : Access is denied. (Exception from HRESULT:
0x80070005 (E_ACCESSDENIED)) ***

I have granted the user account full permission to control the service but
this is obviously not enough. i tried setting WMI Control permissions on
Root and CIMV2 to full control but still gives the user access denied. i
also granted the user logon as a service right but still no luck. Any
ideas? what am i missing here to be able to give the user account access to
view the service using the below script. I DO NOT what to add the user to
the administrators group. Thanks in advance for the help!


(get-wmiobject win32_service -computername myComputer -credential
domain\me -filter "name='spooler'").state



My System SpecsSystem Spec
Old 04-20-2007   #2 (permalink)
Phil N


 
 

Re: Get-wmiobject, permissions issue...

I have also set security for COM permissions in the dcomcnfg utility to
enable the user remote launch and remote activation but still no luck. now
i get the following error *** Get-WmiObject : Generic failure

any help would be great!

"Phil N" <bigphil@newsgroups.nospam> wrote in message
news:ufSRw74gHHA.1220@TK2MSFTNGP03.phx.gbl...
> hello everyone! I am having a bit of an issue getting past the wmi
> permissions using the following script. if i run as an admin it connects
> just fine but if connect as a differnet user it gives me access denied
> message *** Get-WmiObject : Access is denied. (Exception from HRESULT:
> 0x80070005 (E_ACCESSDENIED)) ***
>
> I have granted the user account full permission to control the service but
> this is obviously not enough. i tried setting WMI Control permissions on
> Root and CIMV2 to full control but still gives the user access denied. i
> also granted the user logon as a service right but still no luck. Any
> ideas? what am i missing here to be able to give the user account access
> to view the service using the below script. I DO NOT what to add the user
> to the administrators group. Thanks in advance for the help!
>
>
> (get-wmiobject win32_service -computername myComputer -credential
> domain\me -filter "name='spooler'").state
>



My System SpecsSystem Spec
Old 04-23-2007   #3 (permalink)
David Sebban [MS]


 
 

Re: Get-wmiobject, permissions issue...

are you running windows vista ?

if yes try to run PoSH elevated (eg right click "run as administrator")
--
David [MS]

"Phil N" <bigphil@newsgroups.nospam> a écrit dans le message de
news:%23KljsT5gHHA.4516@TK2MSFTNGP03.phx.gbl...
>I have also set security for COM permissions in the dcomcnfg utility to
>enable the user remote launch and remote activation but still no luck. now
>i get the following error *** Get-WmiObject : Generic failure
>
> any help would be great!
>
> "Phil N" <bigphil@newsgroups.nospam> wrote in message
> news:ufSRw74gHHA.1220@TK2MSFTNGP03.phx.gbl...
>> hello everyone! I am having a bit of an issue getting past the wmi
>> permissions using the following script. if i run as an admin it connects
>> just fine but if connect as a differnet user it gives me access denied
>> message *** Get-WmiObject : Access is denied. (Exception from HRESULT:
>> 0x80070005 (E_ACCESSDENIED)) ***
>>
>> I have granted the user account full permission to control the service
>> but this is obviously not enough. i tried setting WMI Control
>> permissions on Root and CIMV2 to full control but still gives the user
>> access denied. i also granted the user logon as a service right but still
>> no luck. Any ideas? what am i missing here to be able to give the user
>> account access to view the service using the below script. I DO NOT what
>> to add the user to the administrators group. Thanks in advance for the
>> help!
>>
>>
>> (get-wmiobject win32_service -computername myComputer -credential
>> domain\me -filter "name='spooler'").state
>>

>
>


My System SpecsSystem Spec
Old 04-23-2007   #4 (permalink)
Phil N


 
 

Re: Get-wmiobject, permissions issue...

i am not running windows vista. XP Pro sp2. any ideas?

Phil

"David Sebban [MS]" <dsebban@online.microsoft.com> wrote in message
news:FC41EAFE-C58E-445A-9881-B5A79445C9BE@microsoft.com...
> are you running windows vista ?
>
> if yes try to run PoSH elevated (eg right click "run as administrator")
> --
> David [MS]
>
> "Phil N" <bigphil@newsgroups.nospam> a écrit dans le message de
> news:%23KljsT5gHHA.4516@TK2MSFTNGP03.phx.gbl...
>>I have also set security for COM permissions in the dcomcnfg utility to
>>enable the user remote launch and remote activation but still no luck.
>>now i get the following error *** Get-WmiObject : Generic failure
>>
>> any help would be great!
>>
>> "Phil N" <bigphil@newsgroups.nospam> wrote in message
>> news:ufSRw74gHHA.1220@TK2MSFTNGP03.phx.gbl...
>>> hello everyone! I am having a bit of an issue getting past the wmi
>>> permissions using the following script. if i run as an admin it
>>> connects just fine but if connect as a differnet user it gives me access
>>> denied message *** Get-WmiObject : Access is denied. (Exception from
>>> HRESULT: 0x80070005 (E_ACCESSDENIED)) ***
>>>
>>> I have granted the user account full permission to control the service
>>> but this is obviously not enough. i tried setting WMI Control
>>> permissions on Root and CIMV2 to full control but still gives the user
>>> access denied. i also granted the user logon as a service right but
>>> still no luck. Any ideas? what am i missing here to be able to give
>>> the user account access to view the service using the below script. I
>>> DO NOT what to add the user to the administrators group. Thanks in
>>> advance for the help!
>>>
>>>
>>> (get-wmiobject win32_service -computername myComputer -credential
>>> domain\me -filter "name='spooler'").state
>>>

>>
>>

>



My System SpecsSystem Spec
Old 04-24-2007   #5 (permalink)
David Sebban [MS]


 
 

Re: Get-wmiobject, permissions issue...

Well,
there are some WMI classes that you cannot access when you are not running
as admin, and I don't think that ou can work around this.

--
David [MS]

"Phil N" <bigphil@newsgroups.nospam> a écrit dans le message de
news:eQJ5FlchHHA.5048@TK2MSFTNGP03.phx.gbl...
>i am not running windows vista. XP Pro sp2. any ideas?
>
> Phil
>
> "David Sebban [MS]" <dsebban@online.microsoft.com> wrote in message
> news:FC41EAFE-C58E-445A-9881-B5A79445C9BE@microsoft.com...
>> are you running windows vista ?
>>
>> if yes try to run PoSH elevated (eg right click "run as administrator")
>> --
>> David [MS]
>>
>> "Phil N" <bigphil@newsgroups.nospam> a écrit dans le message de
>> news:%23KljsT5gHHA.4516@TK2MSFTNGP03.phx.gbl...
>>>I have also set security for COM permissions in the dcomcnfg utility to
>>>enable the user remote launch and remote activation but still no luck.
>>>now i get the following error *** Get-WmiObject : Generic failure
>>>
>>> any help would be great!
>>>
>>> "Phil N" <bigphil@newsgroups.nospam> wrote in message
>>> news:ufSRw74gHHA.1220@TK2MSFTNGP03.phx.gbl...
>>>> hello everyone! I am having a bit of an issue getting past the wmi
>>>> permissions using the following script. if i run as an admin it
>>>> connects just fine but if connect as a differnet user it gives me
>>>> access denied message *** Get-WmiObject : Access is denied. (Exception
>>>> from HRESULT: 0x80070005 (E_ACCESSDENIED)) ***
>>>>
>>>> I have granted the user account full permission to control the service
>>>> but this is obviously not enough. i tried setting WMI Control
>>>> permissions on Root and CIMV2 to full control but still gives the user
>>>> access denied. i also granted the user logon as a service right but
>>>> still no luck. Any ideas? what am i missing here to be able to give
>>>> the user account access to view the service using the below script. I
>>>> DO NOT what to add the user to the administrators group. Thanks in
>>>> advance for the help!
>>>>
>>>>
>>>> (get-wmiobject win32_service -computername myComputer -credential
>>>> domain\me -filter "name='spooler'").state
>>>>
>>>
>>>

>>

>
>


My System SpecsSystem Spec
Old 04-26-2007   #6 (permalink)
Don Jones [MVP]


 
 

Re: Get-wmiobject, permissions issue...

It's probably permissions on the WMI repository - I know you said you
changed them, but they're all black magic as far as I'm concerned. I know
I've also run across classes that refuse to be accessed remotely by anyone
but the admin - possibly because WMI has to access *underlying* information
which only admin has access to? After all, WMI doesn't contain the *data,*
but just instructions for *where to get the data.*

--
Don Jones
Windows PowerShell MVP
Founder: www.ScriptingAnswers.com
Co-Author: "Windows PowerShell: TFM"

"Phil N" <bigphil@newsgroups.nospam> wrote in message
news:ufSRw74gHHA.1220@TK2MSFTNGP03.phx.gbl...
> hello everyone! I am having a bit of an issue getting past the wmi
> permissions using the following script. if i run as an admin it connects
> just fine but if connect as a differnet user it gives me access denied
> message *** Get-WmiObject : Access is denied. (Exception from HRESULT:
> 0x80070005 (E_ACCESSDENIED)) ***
>
> I have granted the user account full permission to control the service but
> this is obviously not enough. i tried setting WMI Control permissions on
> Root and CIMV2 to full control but still gives the user access denied. i
> also granted the user logon as a service right but still no luck. Any
> ideas? what am i missing here to be able to give the user account access
> to view the service using the below script. I DO NOT what to add the user
> to the administrators group. Thanks in advance for the help!
>
>
> (get-wmiobject win32_service -computername myComputer -credential
> domain\me -filter "name='spooler'").state
>


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Permissions issue Vista security
Permissions Issue Vista security
filepath/permissions issue? Vista Games
Permissions issue? Vista security
Strange Permissions Issue Vista account administration


Vista Forums 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 Ltd

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