Azure VPN Client stores the VPN profiles in another non-system phonebook, and by default, rasdial looks in the system phone book. The phonebook is just a text file on your system that you can take a look at, located at something like $env:LOCALAPPDATA\Packages\Microsoft.AzureVpn_*\LocalState\rasphone.pbk
. Then, you can run rasdial $connectionName /phonebook:$phonebookPath
.
If you parse1 the phonebook file, you can get a list of all configured VPNs, and rasdial
2 by itself will tell you the currently connected VPN, and the /disconnect
switch (no phonebook needed) will disconnect it. That should give you all the primitives you need to fully script against the client!