Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


WMI Connections Problem

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,36433
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> WMI Connections Problem
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 WMI Connections Problem - 7/23/2006 6:47:14 PM   
  takeda kozo

 

Posts: 83
Score: 0
Joined: 11/9/2005
Status: offline
Hi All, just a general question regarding WMI connections to remote computers

I am running a script which will connect to the remote registry and retrieve certain keys. The script works fine if run in small blocks ..... but if i try to run more than 2000 machines then I start to encounter WMI connection errors (the errors occur roughly after a thousand or so machines have been reported on.......)

The error code i get is:  462

Just curious if this is a commen problem ? and if there is a way around it ? (apart from breaking up the list of hostnames to check)

Thanks

---------------
 
 
Post #: 1
 
 RE: WMI Connections Problem - 7/24/2006 12:59:46 AM   
  DiGiTAL.SkReAM


Posts: 1194
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
I don't know what your script looks like, but I would suspect a loop that is overloading a variable or an object.
Maybe if you post your script we could provide more help?


_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to takeda kozo)
 
 
Post #: 2
 
 RE: WMI Connections Problem - 7/24/2006 12:49:21 PM   
  takeda kozo

 

Posts: 83
Score: 0
Joined: 11/9/2005
Status: offline
Thanks for the tip. I've set my Objects (eg: oWMIService = Nothing / oReg = Nothing) at the ends of my loops

I will re-run and see how it goes

If still fails I will past my script. Thanks for the advice mate


- TK

(in reply to DiGiTAL.SkReAM)
 
 
Post #: 3
 
 RE: WMI Connections Problem - 7/24/2006 8:09:37 PM   
  takeda kozo

 

Posts: 83
Score: 0
Joined: 11/9/2005
Status: offline
OK, It still fails :(

In case i haven't mentioned, the purpose of this script is to check remote hosts to test & report on the following:

1) SMS Site Code
2) SMS Client Version
3) Check to see if our business critical hotfixes are installed

I have a little over 2000 hostnames in the list (machines.txt file). Everything runs ok until around the 1400 mark, and then I get literally back to back errors:

Error Number: 462
Error Description: The remote server machine does not exist or is unavailable

When watching the Wscript.exe file in task manager, it starts off with roughly 9MB of memory allocated. It takes roughly 2 hours to get to the 1400 mark, but by this stage the allocated memory is around the 44MB mark

I assume that the error could be resource related, but I have enough RAM to cover it (512MB) and in reality, 44MB isn't all that big

There are two scripts. The main one, and also a small "connectivity test" script. I had the problem where I would try and connect to a remote machines WMI and it would just hang.....so this secondary script is basically a test of the WMI connectivity before continuing with the main functions

One more thing. If you see anything I could have done better (more efficiently) or things that I should not be doing then please let me know. I am still very new to scripting, so this could be a good chance for me to learn from some of the more experienced people on this forum

Thank you


- TK


++++++++++++++++++++++++++++++++++++
Script 1 (main)
++++++++++++++++++++++++++++++++++++


      

++++++++++++++++++++++++++++++++++++
Script 2 (WMI Connectivity Check)
++++++++++++++++++++++++++++++++++++

      



ANY IDEA'S ???

- TK

< Message edited by Country73 -- 7/25/2006 3:08:35 AM >

(in reply to takeda kozo)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> WMI Connections Problem Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts