Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - WMI Delays

Reply
 
Old 07-31-2008   #1 (permalink)
nightstar


 
 

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
Old 07-31-2008   #2 (permalink)
Richard Mueller [MVP]


 
 

Re: WMI Delays


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

> 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
Old 07-31-2008   #3 (permalink)
nightstar


 
 

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
Old 07-31-2008   #4 (permalink)
Richard Mueller [MVP]


 
 

Re: WMI Delays


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

> 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
Old 07-31-2008   #5 (permalink)
nightstar


 
 

Re: WMI Delays

I was not thinking of that, thanks for that input.
My System SpecsSystem Spec
Old 07-31-2008   #6 (permalink)
Al Dunbar


 
 

Re: WMI Delays


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

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

>> 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
Reply

Thread Tools


Similar Threads
Thread Forum
Mouse Delays General Discussion
Solved Typing Delays General Discussion
Anyone else experiencing major delays? PowerShell
Delays when using a PC not connected to Domain Vista performance & maintenance
delays in vista Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46