All, the code snippet below is pretty standard and familiar to most of you, for connecting to a local/remote computer:
Set objWMIService=GetObject("winmgmts:\\" & StrServer & "\root\cimv2")
My problem is that if a computer is offline or if I cannot authenticate to it, about 1 min elapses (as it tries to connect or authenticate) before it gives up and moves onto the next machine in my list.
Obviously this slows the whole script down which is a real pain.
My question - is there a way that you can limit the time to make a connection to the remote computer? So if a connection cant be made in say 12 seconds then the script moves onto the next computer in the list?
Any help would be great.
Cheers
Set objWMIService=GetObject("winmgmts:\\" & StrServer & "\root\cimv2")
My problem is that if a computer is offline or if I cannot authenticate to it, about 1 min elapses (as it tries to connect or authenticate) before it gives up and moves onto the next machine in my list.
Obviously this slows the whole script down which is a real pain.
My question - is there a way that you can limit the time to make a connection to the remote computer? So if a connection cant be made in say 12 seconds then the script moves onto the next computer in the list?
Any help would be great.
Cheers