Get-VPNConnection not showing my VPN

I have created a VPN connection that I can see in windows under the VPN settings page. I can also see the connection from network connections page. When I use Get-VPNConnection through powershell this VPN does not show up. It’s been a bit inconsistent… I’ve tried this on multiple computers and on one it does show, but on another it does not.

My goal is to use get-vpnconnection to query the current VPN and then connect it through powershell, but I can’t do that because get-vpnconnection returns nothing. Any ideas?

Does the VPN connection show up with the “-AllUserConnection” parameter?

Get-VpnConnection -AllUserConnection

Thanks, this did work!

I was just about to mention this, but xCharg beat me to it.

In that case, here is sone additional information, that may be beneficial, at some point, in the future.

If memory serves, the -AllUserConnection Requirement is dependent on what Type of Connection it is and where the Data is stored.

Single User Connections are usually stored under that User’s Profile, in the following location.

C:\Users%USERNAME%\AppData\Roaming\Microsoft\Network\Connections\Pbk\rasphone.pbk

Machine-Wide Connections (Available to All Users) can be found under the “ProgramData” Folder, in the following Location.

C:\ProgramData\Microsoft\Network\Connections\Pbk\rasphone.pbk

If you want to view the VPN Connection Data, stored within either of these “rasphone.pbk” Files, you can open them with Notepad.

Thanks! I’ve been looking for these files on my filesystem and hadn’t been able to find them.