Avatar of David VanZandt
David VanZandt
Flag 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.
PowershellWindows BatchNetworkingPCVPN

Avatar of undefined
Last Comment
Qlemo

8/22/2022 - Mon
John

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.
David VanZandt

ASKER
No, but thanks for the suggestion. :)
John

Put in a WAIT for 15 seconds and that would accommodate the VPN connection.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Qlemo

Pinging is something I do myself for this purpose. It 8s better than just waiting for a fixed time.
ASKER CERTIFIED SOLUTION
David VanZandt

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Qlemo