Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


WMI what a pain...

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> WMI what a pain...
  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 what a pain... - 7/25/2007 9:29:23 PM   
  4scriptmoni


Posts: 208
Score: 0
Joined: 5/3/2007
Status: offline
I find myself not trusting so much anymore in WMI, more then once I can NOT get the correct data
thru Perfmon, from scriptomatic I get the wmi class listed but then from my .vbs script I get
no data, and error : 0x80041010 (null) in the line of    > For Each objItem In colItems

I have already ref. here:
http://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspx#EHAAC
But I was unable to get my WMI data.

Maybe someone had similar problems?? Or knows other way to gather perfmon data, SNMP?

thanks in advance,



      






_____________________________

Enterprise Microsoft Scripts
Exchange, Login/Logout Monitor,TS, Monitoring, Security, AD, etc...
http://www.felipeferreira.net
 
 
Post #: 1
 
 RE: WMI what a pain... - 7/25/2007 10:41:46 PM   
  DiGiTAL.SkReAM


Posts: 1184
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
Maybe try doing a On Error Resume Next... I have found that sometimes when there is no data in a particular field, WMI will error out on the query, but if I ignore the errors, it will eventually return data.

Dunno... I hate WMI myself.  Never use it if I don't have to.

_____________________________

"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 4scriptmoni)
 
 
Post #: 2
 
 RE: WMI what a pain... - 7/26/2007 6:57:59 PM   
  ginolard


Posts: 1053
Score: 21
Joined: 8/10/2005
Status: offline
Well, for a start, that class only exists on Servers.  Also, given that it's related to Exchange I suspect it will only work when run on an Exchange server.

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to DiGiTAL.SkReAM)
 
 
Post #: 3
 
 
 
  

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 what a pain... 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