Closed ryanabach closed 4 years ago
I'll do some testing and try to reproduce this as soon as I can. Stay tuned!
Ok, I was able to reproduce the issue. This issue occurs when you attempt to extract ProfileXML from a device tunnel as a standard user. To extract ProfileXML from a device tunnel you must run the script in the context of the local system account. I've added some logic to detect if the script is running in the correct context and abort if it isn't correct. I've also update the comments to reflect this information.
I tried running your script against an AOVPN connection (device tunnel- IKEv2 authenticationl) setup on my Windows 10 machine... and its failing on line 75 "Cannot call a method on a null-valued expression"--- the code implies this is erroring on the creation of the XML file (my VPN connection is configured correctly). What is the correct syntax for this function?