Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problem : objLocator.ConnectServer returns Access is denied

752 views
Skip to first unread message

Rudif

unread,
May 11, 2007, 7:32:00 AM5/11/07
to
Hello MVPs and all

On launching the vbs script shown below on my computer, I get this error

H:\Sandbox\WMI\vbs\GetBIOSVer-4.vbs(11, 1) SWbemLocator: Access is denied.

My computer is on a domain, while "targetcomputer" is in a workgroup.
"targetcomputeruser" is a local user on "targetcomputer", member of
Administrators group.
Both computers run XP SP2.

Is it possible at all to obtain WMI access in this situation (domain ->
workgroup)?
If yes, what do I need to configure on computers and/or modify in my script ?

I searched msdn and forums and other WMI-related websites for advice, but
what I could find and try did not solve my problem.

I ran WMIDiag.vbs on the target computer and it declared 'Success'.

TIA
Rudif

'----------------------------------------------------------

computer = "targetcomputer"
user = "targetcomputeruser"
password = "targetcomputeruserpwd"

'GetBIOSVer.vbs
'Retrieves the BIOS information from remote computer
Dim ojLocator, objbWMI, colBIOS, clsBIOS
Set objLocator=CreateObject("WbemScripting.SWbemLocator")
Set objWMI=objLocator.ConnectServer(computer, "root\cimv2", user, password)
objWMI.Security_.ImpersonationLevel=3 'Impersonate
Set colBIOS=objWMI.InstancesOf("Win32_BIOS")
For Each clsBIOS in colBIOS
Wscript.Echo "Name: " & clsBIOS.Name
WScript.Echo "SMBIOSBIOSVersion: " & clsBIOS.SMBIOSBIOSVersion
WScript.Echo "SMBIOSMajorVersion: " & clsBIOS.SMBIOSMajorVersion
WScript.Echo "SMBIOSMinorVersion: " & clsBIOS.SMBIOSMinorVersion
Next
'----------------------------------------------------------


Colin Bowern

unread,
May 15, 2007, 11:37:31 AM5/15/07
to
Start here:

Connecting to WMI on a Remote Computer
http://msdn2.microsoft.com/en-us/library/aa389290.aspx

and let us know if you continue to have problems. It sounds like you are
missing an access control entry in the WMI security for the user you are
using. There is a specific ACE for "Remote Enable" which likely needs to be
set.

Cheers,
Colin


"Rudif" <ru...@discussions.microsoft.com> wrote in message
news:7CE91B94-25A4-4961...@microsoft.com...

markd...@gmail.com

unread,
Aug 28, 2012, 11:57:08 AM8/28/12
to
Were you ever able to figure this issue out? I'm in the EXACT same boat and have been beating my head into a wall for a couple weeks now trying to figure it out.
0 new messages