Windows Vista Forums

WMI Delays
  1. #1


    nightstar Guest

    WMI Delays

    We are creating a script to gather all network shares and share
    information on our domain. It begins by asking the ip range to scan.
    In this IP range you can have all sorts of objects such as printers,
    routers, servers, workstations, etc.



    When the script hits an IP to a printer, router, or workstation/server
    that is shut off, the query delays for a long time (because it cannot
    find WMI). Is there a way around this long delay. I want it to go
    quickly.


      My System SpecsSystem Spec

  2. #2


    Richard Mueller [MVP] Guest

    Re: WMI Delays


    <nightstar@xxxxxx> wrote in message
    news:39788e53-d309-435c-8813-85d4953cfc75@xxxxxx

    > We are creating a script to gather all network shares and share
    > information on our domain. It begins by asking the ip range to scan.
    > In this IP range you can have all sorts of objects such as printers,
    > routers, servers, workstations, etc.
    >
    > When the script hits an IP to a printer, router, or workstation/server
    > that is shut off, the query delays for a long time (because it cannot
    > find WMI). Is there a way around this long delay. I want it to go
    > quickly.
    >
    The recognized solution is to ping the remote devices. In general, you can
    specify the timeout. I have several example functions for this linked here:

    http://www.rlmueller.net/PingComputers.htm

    And here is an example VBScript program to inventory the computers in a
    domain. It pings each before connecting with WMI:

    http://www.rlmueller.net/Inventory.htm

    My examples ping NetBIOS host names, but you can also ping an IP address.

    --
    Richard Mueller
    MVP Directory Services
    Hilltop Lab - http://www.rlmueller.net
    --



      My System SpecsSystem Spec

  3. #3


    nightstar Guest

    Re: WMI Delays

    This kind of helps, and what I am currently doing. But if I get to an
    item, like a switch or printer (that does ping), I then try to connect
    to that IP to retreive info (using WMI) because it pings and these
    delay for a horrible amount of time. Is there a way around this,
    without having to create a list of 900+ items that are scattered
    throughout the network that do ping but are not WMI units.


      My System SpecsSystem Spec

  4. #4


    Richard Mueller [MVP] Guest

    Re: WMI Delays


    <nightstar@xxxxxx> wrote in message
    news:92aaf0ea-9cf3-4949-b6d8-a1eab6be12c5@xxxxxx

    > This kind of helps, and what I am currently doing. But if I get to an
    > item, like a switch or printer (that does ping), I then try to connect
    > to that IP to retreive info (using WMI) because it pings and these
    > delay for a horrible amount of time. Is there a way around this,
    > without having to create a list of 900+ items that are scattered
    > throughout the network that do ping but are not WMI units.
    >
    I don't know of a solution. The same thing happens if a computer does not
    have WMI installed, or does not support the WMI class I am using. There is
    no way to control the long timeout.

    However, you could use ADO to retrieve the NetBIOS names of all computers in
    the domain (or in one or more OU's). Then at least you would know that all
    devices are computers. The Inventory.vbs program I linked earlier actually
    does this. There are also ways to retrieve only DC's:

    http://www.rlmueller.net/Enumerate%20DCs.htm

    or, only servers:

    http://www.rlmueller.net/Enumerate%20Servers.htm

    For more on using ADO in VBScript programs see this link:

    http://www.rlmueller.net/ADOSearchTips.htm

    --
    Richard Mueller
    MVP Directory Services
    Hilltop Lab - http://www.rlmueller.net
    --



      My System SpecsSystem Spec

  5. #5


    nightstar Guest

    Re: WMI Delays

    I was not thinking of that, thanks for that input.

      My System SpecsSystem Spec

  6. #6


    Al Dunbar Guest

    Re: WMI Delays


    "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in
    message news:eXTXOr28IHA.6052@xxxxxx

    >
    > <nightstar@xxxxxx> wrote in message
    > news:92aaf0ea-9cf3-4949-b6d8-a1eab6be12c5@xxxxxx

    >> This kind of helps, and what I am currently doing. But if I get to an
    >> item, like a switch or printer (that does ping), I then try to connect
    >> to that IP to retreive info (using WMI) because it pings and these
    >> delay for a horrible amount of time. Is there a way around this,
    >> without having to create a list of 900+ items that are scattered
    >> throughout the network that do ping but are not WMI units.
    >>
    >
    > I don't know of a solution. The same thing happens if a computer does not
    > have WMI installed, or does not support the WMI class I am using. There is
    > no way to control the long timeout.
    >
    > However, you could use ADO to retrieve the NetBIOS names of all computers
    > in the domain (or in one or more OU's). Then at least you would know that
    > all devices are computers. The Inventory.vbs program I linked earlier
    > actually does this. There are also ways to retrieve only DC's:
    >
    > http://www.rlmueller.net/Enumerate%20DCs.htm
    >
    > or, only servers:
    >
    > http://www.rlmueller.net/Enumerate%20Servers.htm
    >
    > For more on using ADO in VBScript programs see this link:
    >
    > http://www.rlmueller.net/ADOSearchTips.htm

    There is one method I know of that might be of help to the OP, but it might
    be less convenient to use if the target domain systems must be identified by
    their IP, subnet by subnet.

    The command 'net view' will create a list of all computers in the domain
    that are currently known to the browse master. This will include all
    computer that have been operational and connected within the last 10 or 15
    minutes (I think). This will include machines recently turned off, and will
    exclude machines recently turned on. It will also exclude non-computer
    devices occupying IP address space.

    I find I get a very high hit rate out of this if I avoid times when machines
    are more likely to be getting turned on or off, such as the end of shifts,
    meal breaks, and etc. I don't even bother pinging each candidate to see if
    it is still there, as that generates a second or two extra per system, which
    can be significant in a large network.

    /Al



      My System SpecsSystem Spec

WMI Delays problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse Delays airplanes18 General Discussion 3 05 Sep 2009
Solved Typing Delays tigerafrica General Discussion 11 03 Aug 2009
Anyone else experiencing major delays? Josh Einstein PowerShell 4 02 Mar 2009
Refreshing Metadata Delays Blue Max Vista mail 5 19 Oct 2007
delays in vista Andy Vista General 2 15 Jun 2007