Scoured the internet for at least 10 minutes.
Have a bunch of laptops that are logging in when outside the "work" network.
I have been getting the question: I have an SSD and tons of ram why does it take 5 minutes to log in at home or outside the internal network?
My best answer is the login is going out looking for the AD server to pull gpupdates and login scripts for mapping and etc. And that is waiting on a time out.
So my question is: Is there a way to disable the lag of logging in due to time out of the mapping script?
Hoping to have a switch that could do a quick look up based on network location (home, Work, Public) and map accordingly.
Windows has a function to detect slow links (defined by the latency).
Group policies, and logins scripts will not be delivered over a 'slow link'. This can be controlled by a group policy.
The other option that may make a big difference is Asynchronous versus Synchronous processing. You can require that all policies and scripts be complete before the desktop environment is presented to the user. On a slower link this means the user will be waiting. So if you are supporting systems over the wan you might want to go for the asynchronous option, so the user can get their environment faster.
See:
Don't use login scripts, they're archaic. everything you want to do can be done with GP-Preferences these days, especially if you're using win7.
I doubt that Login scripts are the issue here. As soon network state is detected (i.e. machine detects that it is not connected to domain), it will skip all the scripts. That detection process itself should not take much anyway.
Is this something you can repro by simply disconnecting network cable?
Do you happen to have full-disc encryption software on your laptops? That would be primary suspect.
Have you actually run a tool like SysInternals' Procmon (enter link description here) with boot option to see what's taking so long?