Link to home
Start Free TrialLog in
Avatar of David VanZandt
David VanZandtFlag for United States of America

asked on

How to pause a startup script during a VPN event?

Hi all, when I log onto my PC at work, my startup folder includes a PowerShell script. The script simply checks whether certain network drives are mapped; and if not, then map them. When I work from home, however, I have to VPN and manually authenticate before the network drives are revealed to me. I can add a time delay to my script, or wait for a manual key press.

I am thinking that the delay can be automated, possibly with a wait condition. Perhaps a ping to an IP address inside the firewall. If you have any suggestions to improve this, please let me know. One limitation, I do not have admin privileges on the PC.
Avatar of John
Flag of Canada image

Can your VPN client run a script? That would be a good way to manage this. I use NCP Secure Entry and it can do that.
Avatar of David VanZandt


No, but thanks for the suggestion. :)
Put in a WAIT for 15 seconds and that would accommodate the VPN connection.
Pinging is something I do myself for this purpose. It 8s better than just waiting for a fixed time.
Avatar of David VanZandt
David VanZandt
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial