header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Using WMISearcher
Last Post 28 May 2010 01:08 PM by Fallen_Milkman. 0 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Fallen_MilkmanUser is Offline
New Member
New Member
Posts:1
Avatar

--
28 May 2010 01:08 PM
    I have slowly been learning powershell over the past few months to help automate a lot of my tasks. Though it seems to have the same limitations with WMI as VBScript. Many times the script will just hang and not return anything forcing you to kill your script and start over. I read some snippets here and there about [WMISearcher] and being able to add a timeout to your WMI calls, so if it doesn't return in X seconds, it halts the call.

    I am having trouble finding anything past a very high level overview of it. Examples are extremely rare to come by and really haven't provided any insight onto how I can implement it for my use.

    So that said, can anyone provide some examples of how it would be used for a WMI call on a remote machine?

    If it does hit the time out and terminate the WMI connection, what is returned? Is it an error that can be caught?

    An example of what I would like to do with it:

    I have a script that will run through a list of servers in my environment, I want to check a few services through WMI to see if they are installed, and if they are see if they are started. I know how to do this, but the problem I face is that the script just hangs on a lot of my really old W2k boxes and never returns.

    Can anyone help?
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer