Get-VPNConnection not showing all vpn connections

By Andrei Ungureanu - Last updated: Monday, October 26, 2015 - Save & Share - Leave a Comment

Incepand cu Windows 10 am inceput sa gestionez conexiunile VPN folosind Powershell. Asta si datorita interfetei duale si a faptului ca anumite setari chiar nu se mai pot face din interfata.

Dar o ciudatenie m-a pus pe ganduri. Aveam conexiuni VPN facute din GUI pe care pur si simplu nu le vedeam prin Get-VPNConnection.

image

Chestia e ca mai trebuie sa mai pui un parametru la comanda ca sa fii sigur ca iti va arata tot.

image

Iata si definitia parametrului –AllUserConnection dupa cum zice Technet-ul:

-AllUserConnection

Indicates that the VPN connection is retrieved from the global phone book.

Deci ca sa fiu 100% corect, ca sa vezi tot trebuie sa listezi tot ce este in Global Phone Book + ce se afla in User Phone Book, adica odata sa rulezi comanda si cu si fara –AllUserConnection.

Iar exemplele din help cred ca reprezinta cea mai buna explicatie:

Example 1: Get all available VPN connections

This command returns a list of all available VPN connections in the user’s local phone book.

Windows PowerShell

PS C:\> Get-VpnConnection
Example 2: Get all available VPN connections from the global phonebook

This command retrieves all the available VPN connections from the global phone book.

Windows PowerShell

PS C:\> Get-VpnConnection -AllUserConnection
Example 3: Get a specific VPN connection from the global phone book

This command retrieves the VPN connection named Test3 from the global phone book.

Windows PowerShell

PS C:\> Get-VpnConnection -Name "Test3" –AllUserConnection
Example 4: Get multiple VPN connections

This command retrieves multiple specified VPN connections from the global phone book.

Windows PowerShell

PS C:\> Get-VpnConnection -Name "Test3",  "Test4",  "test5" –AllUserConnection

Nota: Ca o conexiune VPN sa ajunga in acel Global Phone Book e nevoie ca la momentul adaugarii sa folosim parametrul –AllUserConnection la comanda Add-VPNConnection sau sa punem bifa “Allow other people to use this connection” cand folosim interfata grafica.

image

Posted in Windows Client • Tags: Top Of Page

Write a comment