As a “Windows Insider” on the Fast Ring, I get new builds of Windows semi-frequently. Love it! Great! Oh wait, now to VPN into the office for that 3am emergency I have to reconfigure my VPN because the installation of the new build hosed it. ARRGGH!
To be clear, it’s NOT because of a fault in Windows per se, it’s a side effect of the constant state of upgrade. Our network requires us to install SonicWALL Mobile Connect to log into our firewall based VPN. It’s a slick little system and not hard to set up, the problem comes when the Windows build elf comes in the middle of the night. This ‘breaks’ the registration of the Windows Store app for MobileConnect, so when you try to fire up a VPN you get an “application not found” error.
The manual process, while not hard , is both annoying and inconsistent. Each time, you have to go into the Settings/Apps & features to find the SonicWALL Mobile Connect app. Then click the Advanced Features link, and hit the RESET button. That’s all straightforward. Here’s where if gets funky.
Sometimes you can immediately connect up a VPN and get to work. Sometimes you need to rebuild the VPN configuration. Sometimes you need to reboot. Sometimes both! That’s frustrating enough to need a solution.
So I did some poking around with PowerShell ( of course) and discovered that essentially the SonicWALL app needed to be “re-registered”. A short script and a desktop shortcut later, and I’ve got a one-click fix!
The full script can be found HERE – It’s pretty straightforward but here are some parts that can stand a bit of explaining.
As I learned when scripting the creation of the VPN’s ,there are some XML variables required by the SonicWALL app.
I’m recreating existing VPN’s so I grab the list using Get-VpnConnection
Then it’s a quick For-Each loop to remove the VPN connections….
Followed by a re-add of the app….
And finally a simple For-Each loop to rebuild the VPNs I deleted earlier…
…. and done!
As I said, it’s not terribly complicated, but it sure is handy. I hope you found this helpful. If not directly then maybe it’s sparking some ideas.