StumpedTechy
MIS
Okay I need to come up with a real time way to check to see if a machine is connected to a very complex domain.
Currently I was thinking of using -
Set objADSystemInfo = CreateObject("ADSystemInfo")
strDomain = objADSystemInfo.DomainDNSName
wscript.Echo strDomain
The problem is this takes about 2-5 minutes to time out and return an error if the PC is removed from the network. I need a solution that is a little more "real-time".
I don't want to use a IfAlive function where it pings a machine because I want to ensure this is not dependant upon another machine to be up and running. E.G we have multiple Domain servers so if I point it to a Domain server they retire this will screw up for everyone that gets this script.
Is there a better more accurate way of seeing real time if the machine is on the network or not? I know the machines will still be on their own internal network so I can't check NIC connection states.
The situation is this - We have users that VPN in and their shutdowns run over 7 minutes + due to login scripts that are trying to run off network connections they no longer have. I want use a local VBS shutdown script to see if the computer is not connected to the domain (the part I am trying to accomplish here) and hence remove the AD startup and shutdown scripts from running (by doing some registry modifications).
Currently I was thinking of using -
Set objADSystemInfo = CreateObject("ADSystemInfo")
strDomain = objADSystemInfo.DomainDNSName
wscript.Echo strDomain
The problem is this takes about 2-5 minutes to time out and return an error if the PC is removed from the network. I need a solution that is a little more "real-time".
I don't want to use a IfAlive function where it pings a machine because I want to ensure this is not dependant upon another machine to be up and running. E.G we have multiple Domain servers so if I point it to a Domain server they retire this will screw up for everyone that gets this script.
Is there a better more accurate way of seeing real time if the machine is on the network or not? I know the machines will still be on their own internal network so I can't check NIC connection states.
The situation is this - We have users that VPN in and their shutdowns run over 7 minutes + due to login scripts that are trying to run off network connections they no longer have. I want use a local VBS shutdown script to see if the computer is not connected to the domain (the part I am trying to accomplish here) and hence remove the AD startup and shutdown scripts from running (by doing some registry modifications).