Real Geek Forums  

Go Back   Real Geek Forums > Archives > Operating Systems > Windows XP > Windows XP WMI

Notices

Reply

Permission Denied when trying to access remote computer with VBScr

 

LinkBack Thread Tools Display Modes
Old 09-30-2005, 06:52 PM   #1 (permalink)
Default Permission Denied when trying to access remote computer with VBScr

hello,

i'm writing a script that access WMI on a remote computer to perform certain
actions. i've tried using the GetObject as follows:


Set objWMIService = GetObject _
("winmgmts:{impersonationLevel=impersonate,(Shutdo wn)}\\" & _
strComputerName & "\root\cimv2")

and i've also tried using whe sWbemLocator ConnectServer method as follows:

Set objSWbemLocator = CreateObject("WbemScripting.sWbemLocator")
Set objWMIService = objSWbemLocator.ConnectServer(strComputerName, _
"\root\CIMV2", _
strUser, _
strPassword, _
"MS_409", _
"NTLMDomain:" + strComputerName)

when i use the first method, i get
error code: 800A0046
Error: Permission denied: 'GetObject'
System: the remote server has been paused or is in the process of being
started.

when i use the second method, i get:
error Code: 80070005
Error: Access is denied
Source: SWbemLocator
System: Access is denied

the remote computer is a Windows XP sp2, i'm running a network with a
windows 2003 domain controler. i'm running the script as a domain
administrator.
i have searched all around on a way to fix this. i have followed all
instructions in how to set securiy and impersonation level, and access level,
and still my scripts error out.
i suspect that some recent windows update is blocking access to local wmi
from the network.
all the variables are declared explicitly and are assigned values before
reaching this part of the code.
i have disabled the firewall on the local machines using a gpo, so it's not
a firewall issue.
if i'm locally on the machine, all the scripts run without a problem. it's
only remotely that i have a problem.

thanks and regards,


ricardo
Guest
 
Posts: n/a
Reply With Quote  
Old 09-30-2005, 09:00 PM   #2 (permalink)
Default Re: Permission Denied when trying to access remote computer with VBScr

Since it is working on your local machine and you are getting error for
remote case and you get a 0x80070005 (DCOM ACCESS_DENIED) error
, it suggests that your settings are not properly enabled for remote
connections. Please follow the instruction at this link Connecting to WMI
Through Windows Firewall.

This posting is provided "AS IS" with no warranties, and confers no rights.
Manbinder Pal Singh[ MSFT]
Team - WMI
1. Official WMI FAQ :
http://www.microsoft.com/technet/scr...es/wmifaq.mspx
2. Programmer Focused WMI Newsgroup - microsoft.public.wmi.programmer (
NOTE: this is a replacement to microsoft.public.win32.programmer.wmi )
3. Technet ScriptCenter Resources :
http://www.microsoft.com/technet/scr...r/default.mspx


"ricardo" <ricardo@discussions.microsoft.com> wrote in message
news:324B1204-CC1F-4189-982E-9E4B21F9DE68@microsoft.com...
Quote:
> hello,
>
> i'm writing a script that access WMI on a remote computer to perform
> certain
> actions. i've tried using the GetObject as follows:
>
>
> Set objWMIService = GetObject _
> ("winmgmts:{impersonationLevel=impersonate,(Shutdo wn)}\\" & _
> strComputerName & "\root\cimv2")
>
> and i've also tried using whe sWbemLocator ConnectServer method as
> follows:
>
> Set objSWbemLocator = CreateObject("WbemScripting.sWbemLocator")
> Set objWMIService = objSWbemLocator.ConnectServer(strComputerName, _
> "\root\CIMV2", _
> strUser, _
> strPassword, _
> "MS_409", _
> "NTLMDomain:" + strComputerName)
>
> when i use the first method, i get
> error code: 800A0046
> Error: Permission denied: 'GetObject'
> System: the remote server has been paused or is in the process of being
> started.
>
> when i use the second method, i get:
> error Code: 80070005
> Error: Access is denied
> Source: SWbemLocator
> System: Access is denied
>
> the remote computer is a Windows XP sp2, i'm running a network with a
> windows 2003 domain controler. i'm running the script as a domain
> administrator.
> i have searched all around on a way to fix this. i have followed all
> instructions in how to set securiy and impersonation level, and access
> level,
> and still my scripts error out.
> i suspect that some recent windows update is blocking access to local wmi
> from the network.
> all the variables are declared explicitly and are assigned values before
> reaching this part of the code.
> i have disabled the firewall on the local machines using a gpo, so it's
> not
> a firewall issue.
> if i'm locally on the machine, all the scripts run without a problem. it's
> only remotely that i have a problem.
>
> thanks and regards,
>
>

Manbinder Pal Singh [MSFT]
Guest
 
Posts: n/a
Reply With Quote  
Old 10-10-2005, 06:31 PM   #3 (permalink)
Default Re: Permission Denied when trying to access remote computer with V

I don't see the link for "Connecting to WMI Through Windows Firewall."


"Manbinder Pal Singh [MSFT]" wrote:
Quote:
> Since it is working on your local machine and you are getting error for
> remote case and you get a 0x80070005 (DCOM ACCESS_DENIED) error
> , it suggests that your settings are not properly enabled for remote
> connections. Please follow the instruction at this link Connecting to WMI
> Through Windows Firewall.
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Manbinder Pal Singh[ MSFT]
> Team - WMI
> 1. Official WMI FAQ :
> http://www.microsoft.com/technet/scr...es/wmifaq.mspx
> 2. Programmer Focused WMI Newsgroup - microsoft.public.wmi.programmer (
> NOTE: this is a replacement to microsoft.public.win32.programmer.wmi )
> 3. Technet ScriptCenter Resources :
> http://www.microsoft.com/technet/scr...r/default.mspx
>
>
> "ricardo" <ricardo@discussions.microsoft.com> wrote in message
> news:324B1204-CC1F-4189-982E-9E4B21F9DE68@microsoft.com...
Quote:
> > hello,
> >
> > i'm writing a script that access WMI on a remote computer to perform
> > certain
> > actions. i've tried using the GetObject as follows:
> >
> >
> > Set objWMIService = GetObject _
> > ("winmgmts:{impersonationLevel=impersonate,(Shutdo wn)}\\" & _
> > strComputerName & "\root\cimv2")
> >
> > and i've also tried using whe sWbemLocator ConnectServer method as
> > follows:
> >
> > Set objSWbemLocator = CreateObject("WbemScripting.sWbemLocator")
> > Set objWMIService = objSWbemLocator.ConnectServer(strComputerName, _
> > "\root\CIMV2", _
> > strUser, _
> > strPassword, _
> > "MS_409", _
> > "NTLMDomain:" + strComputerName)
> >
> > when i use the first method, i get
> > error code: 800A0046
> > Error: Permission denied: 'GetObject'
> > System: the remote server has been paused or is in the process of being
> > started.
> >
> > when i use the second method, i get:
> > error Code: 80070005
> > Error: Access is denied
> > Source: SWbemLocator
> > System: Access is denied
> >
> > the remote computer is a Windows XP sp2, i'm running a network with a
> > windows 2003 domain controler. i'm running the script as a domain
> > administrator.
> > i have searched all around on a way to fix this. i have followed all
> > instructions in how to set securiy and impersonation level, and access
> > level,
> > and still my scripts error out.
> > i suspect that some recent windows update is blocking access to local wmi
> > from the network.
> > all the variables are declared explicitly and are assigned values before
> > reaching this part of the code.
> > i have disabled the firewall on the local machines using a gpo, so it's
> > not
> > a firewall issue.
> > if i'm locally on the machine, all the scripts run without a problem. it's
> > only remotely that i have a problem.
> >
> > thanks and regards,
> >
> >
>
>
>
Dan Healy
Guest
 
Posts: n/a
Reply With Quote  
Old 10-10-2005, 06:37 PM   #4 (permalink)
Default Re: Permission Denied when trying to access remote computer with V

as i said, the windows firewall is disabled on my DNS domain.
the script runs locally on every machine on my network. it just doesn't run
remotely.


"Manbinder Pal Singh [MSFT]" wrote:
Quote:
> Since it is working on your local machine and you are getting error for
> remote case and you get a 0x80070005 (DCOM ACCESS_DENIED) error
> , it suggests that your settings are not properly enabled for remote
> connections. Please follow the instruction at this link Connecting to WMI
> Through Windows Firewall.
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Manbinder Pal Singh[ MSFT]
> Team - WMI
> 1. Official WMI FAQ :
> http://www.microsoft.com/technet/scr...es/wmifaq.mspx
> 2. Programmer Focused WMI Newsgroup - microsoft.public.wmi.programmer (
> NOTE: this is a replacement to microsoft.public.win32.programmer.wmi )
> 3. Technet ScriptCenter Resources :
> http://www.microsoft.com/technet/scr...r/default.mspx
>
>
> "ricardo" <ricardo@discussions.microsoft.com> wrote in message
> news:324B1204-CC1F-4189-982E-9E4B21F9DE68@microsoft.com...
Quote:
> > hello,
> >
> > i'm writing a script that access WMI on a remote computer to perform
> > certain
> > actions. i've tried using the GetObject as follows:
> >
> >
> > Set objWMIService = GetObject _
> > ("winmgmts:{impersonationLevel=impersonate,(Shutdo wn)}\\" & _
> > strComputerName & "\root\cimv2")
> >
> > and i've also tried using whe sWbemLocator ConnectServer method as
> > follows:
> >
> > Set objSWbemLocator = CreateObject("WbemScripting.sWbemLocator")
> > Set objWMIService = objSWbemLocator.ConnectServer(strComputerName, _
> > "\root\CIMV2", _
> > strUser, _
> > strPassword, _
> > "MS_409", _
> > "NTLMDomain:" + strComputerName)
> >
> > when i use the first method, i get
> > error code: 800A0046
> > Error: Permission denied: 'GetObject'
> > System: the remote server has been paused or is in the process of being
> > started.
> >
> > when i use the second method, i get:
> > error Code: 80070005
> > Error: Access is denied
> > Source: SWbemLocator
> > System: Access is denied
> >
> > the remote computer is a Windows XP sp2, i'm running a network with a
> > windows 2003 domain controler. i'm running the script as a domain
> > administrator.
> > i have searched all around on a way to fix this. i have followed all
> > instructions in how to set securiy and impersonation level, and access
> > level,
> > and still my scripts error out.
> > i suspect that some recent windows update is blocking access to local wmi
> > from the network.
> > all the variables are declared explicitly and are assigned values before
> > reaching this part of the code.
> > i have disabled the firewall on the local machines using a gpo, so it's
> > not
> > a firewall issue.
> > if i'm locally on the machine, all the scripts run without a problem. it's
> > only remotely that i have a problem.
> >
> > thanks and regards,
> >
> >
>
>
>
ricardo
Guest
 
Posts: n/a
Reply With Quote  
Old 10-10-2005, 06:37 PM   #5 (permalink)
Default RE: Permission Denied when trying to access remote computer with VBScr

I am having a simular problem with a remote script.
I am using the following to access the Services on a remote 2000 Server.
The server is not part of a domain. The script work fine from an XP
workstation, Another standalone 2000 Server, and a 2003 AD controller. It
will not work from a 2003 server that is in a workgroup.
I get:

Error: Access is denied
Code: 80070005
Source: swbbemlocator

'//////////////////////////////////////////////////////////////////////////////
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = objSWbemLocator.ConnectServer(strComputer,
"root\cimv2", strUser, strPassword)
objSWbemServices.Security_.authenticationLevel =
WbemAuthenticationLevelPktPrivacy

Set objSWbemObject = objSWbemServices.Get(strService)

Wscript.Echo "Name: " & objSWbemObject.Name & vbCrLf & _
"Display Name: " & objSWbemObject.DisplayName & vbCrLf & _
"Start Mode: " & objSWbemObject.StartMode & vbCrLf & _
"Pre-State: " & objSWbemObject.Stat
'//////////////////////////////////////////////////////////////////////////////



"ricardo" wrote:
Quote:
> hello,
>
> i'm writing a script that access WMI on a remote computer to perform certain
> actions. i've tried using the GetObject as follows:
>
>
> Set objWMIService = GetObject _
> ("winmgmts:{impersonationLevel=impersonate,(Shutdo wn)}\\" & _
> strComputerName & "\root\cimv2")
>
> and i've also tried using whe sWbemLocator ConnectServer method as follows:
>
> Set objSWbemLocator = CreateObject("WbemScripting.sWbemLocator")
> Set objWMIService = objSWbemLocator.ConnectServer(strComputerName, _
> "\root\CIMV2", _
> strUser, _
> strPassword, _
> "MS_409", _
> "NTLMDomain:" + strComputerName)
>
> when i use the first method, i get
> error code: 800A0046
> Error: Permission denied: 'GetObject'
> System: the remote server has been paused or is in the process of being
> started.
>
> when i use the second method, i get:
> error Code: 80070005
> Error: Access is denied
> Source: SWbemLocator
> System: Access is denied
>
> the remote computer is a Windows XP sp2, i'm running a network with a
> windows 2003 domain controler. i'm running the script as a domain
> administrator.
> i have searched all around on a way to fix this. i have followed all
> instructions in how to set securiy and impersonation level, and access level,
> and still my scripts error out.
> i suspect that some recent windows update is blocking access to local wmi
> from the network.
> all the variables are declared explicitly and are assigned values before
> reaching this part of the code.
> i have disabled the firewall on the local machines using a gpo, so it's not
> a firewall issue.
> if i'm locally on the machine, all the scripts run without a problem. it's
> only remotely that i have a problem.
>
> thanks and regards,
>
>
Dan Healy
Guest
 
Posts: n/a
Reply With Quote  
Reply

Tags
None

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
WMI remote Access denied Marc Windows XP WMI 9 06-28-2005 02:10 AM
'Permission denied' message when offering Remote Assistance Marc Devriendt Windows XP Help & Support 0 10-18-2003 04:12 PM
Remote Assistance - Access Denied Rocky Lane Windows XP Help & Support 0 10-15-2003 06:47 PM
Access denied no permission Don Starr Windows XP Accessibility 1 07-30-2003 09:58 PM
Remote Assistance - Permission Denied Mahadev Alladi[MS] Windows XP Work Remotely 1 07-11-2003 10:25 AM


All times are GMT. The time now is 02:27 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright © 2005 - 2007 RealGeek.com. All rights reserved.

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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90