Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WMI Permission Denied

Status
Not open for further replies.

twooly

MIS
Feb 22, 2004
122
US
I am trying to write a simple script to get some information from a remote computer. But when I run it I get:

Permission denied: 'GetObject' (Line 9)

I am an administrator on the box. The box is a NT4 Server. and scripting host 5.6 is installed on the NT4 box. Any thoughts?

Thanks

--Todd


Dim strComputer
Dim objWMIService
Dim propValue
Dim colItems

strComputer = "SERVER"
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct",,48)
For Each objItem in colItems
WScript.Echo "Caption: " & objItem.Caption
WScript.Echo "Description: " & objItem.Description
WScript.Echo "IdentifyingNumber: " & objItem.IdentifyingNumber
WScript.Echo "Name: " & objItem.Name
WScript.Echo "SKUNumber: " & objItem.SKUNumber
WScript.Echo "UUID: " & objItem.UUID
WScript.Echo "Vendor: " & objItem.Vendor
WScript.Echo "Version: " & objItem.Version
Next
 
Hello twooly,

You have to install wmi express on nt4 box. Have you not? If not, download and install the wbem for nt4 from ms.

regards - tsuji
 
twooly,

"Express" is not a technical term, meaning "wmi express" is not meant to be some application, just a bad way of putting thing in words on the part. Install wmicore is fine enough.

- tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top