Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

vbscript WMI error

Posted on 2004-04-19
12
Medium Priority
?
807 Views
Last Modified: 2009-12-16
I have setup a script that pulls the logs off of a group of servers.  The script works on all machines that I have run it on execpt for one.
I have tested it on Win2k and XP servers and it works.  
The server that it will not work on is a Win2k Server.  It has windows scripting installed and is the correct version

The line below is what it errors at
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & servername & "\root\cimv2")

the error that I get is
Microsoft VBScript Runtime Error '800a01ad'
ActiveX component can't create object: GetObject

Is there a reason why it will not work on 1 Win2k server when it works on another?

It is to run on a production server so I can't play around with it too much.

Thanks
Karl

0
Comment
Question by:Karls
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
12 Comments
 
LVL 3

Expert Comment

by:Barkis_
ID: 10857401
Is there any firewall installed or does the servicepaks differ?
Are the servers setup the same way?

..try rebooting the server that's giving you a hard time :-)  (kidding)

/Barkis_

0
 
LVL 41

Expert Comment

by:graye
ID: 10859146
... and an obvious thing to look for...  make sure that WMI is installed and running (the services are "Windows Management Instrumentation" and "Windows Management Instrumention Driver Extensions")
0
 

Author Comment

by:Karls
ID: 10864696
Have done some further testing.  
The script works ok if it is run on a workstation in the domain and pulls the info from the server logs but will not run on the server itself.  
There are firewalls but that shouldn't be an issue as it is running on the server.  Would love to reboot the server with an axe :)

WMI is installed and running.  Both Services are running too.

Regards,
Karl
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 41

Expert Comment

by:graye
ID: 10868139
But wait... you have a firewall running on the server itself?

WMI uses the normal RPC portmapper (135 and 445) with SVCHOST.EXE as the endpoint.  You might wanna check to see if those ports are open
0
 

Author Comment

by:Karls
ID: 10873336
The firewall is not on the server itself.  We use dedicated hardware firewalls.  Besides I can run the script on a remote pc to access the server ok.

Karl
0
 
LVL 41

Expert Comment

by:graye
ID: 10873947
WMI maintains a set of logs... it's usually at C:\WINNT\system32\wbem\Logs

There might be some nugget of information in one of those files...
0
 
LVL 3

Expert Comment

by:Barkis_
ID: 10875752
And you say that the script works on other servers....other w2k-servers even?

And you run the script on the different servers as the same user(admin)?

tip: you don't have to add the {impersonatelevel=impersonate}! as long as you don't run the script on a NT server as it is done by default on w2k servers.

/Barkis
0
 

Author Comment

by:Karls
ID: 10875776
Yep, works on other win2k servers.  
same user.  Works if I bind to the server from a workstation.  Just will not run on the server itself.  

Thanks for the tip.

Karl
0
 
LVL 3

Accepted Solution

by:
Barkis_ earned 2000 total points
ID: 10875868
ok, this might be a long shot but  
try running the WMI object browser on the server that's troubeling you.
It may give you an indication wether wmi is set up and is functioning correctly.

/Barkis
0
 
LVL 3

Expert Comment

by:Barkis_
ID: 10875876
wmi object browser is found in the SDK
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question