< Back
Get-VPNStatus
Post
NAME Get-VPNStatus
SYNOPSIS
Gets the current status of a VPN Session or a Provider.
SYNTAX
Get-VPNStatus [-VPNSession] <PSObject> [<CommonParameters>]
Get-VPNStatus [-Provider] <String> [<CommonParameters>]
DESCRIPTION
Gets the current status of a VPN Session or a Provider.
PARAMETERS
-VPNSession <PSObject>
The VPN session object returned by Connect-VPN.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Provider <String>
The VPN Provider to use.
One of: AnyConnect
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String
The current status of the VPN Session of the Provider.
With AnyConnect, the values are typically: Connected, Disconnected, Unknown.
NOTES
Only Cisco AnyConnect VPNs are supported as of now.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$session = Connect-VPN -Provider AnyConnect -ComputerName vpn.acme.com -Credentials (Get-Credential
ACME\\gildas)
Get-VPNStatus $session
Connected
Description
-----------
Gets the connection of a session
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-VPNStatus -Provider AnyConnect
Disconnected
Description
-----------
Gets the status of Cisco AnyConnect VPN
RELATED LINKS
https://github.com/gildas/posh-vpn
SYNOPSIS
Gets the current status of a VPN Session or a Provider.
SYNTAX
Get-VPNStatus [-VPNSession] <PSObject> [<CommonParameters>]
Get-VPNStatus [-Provider] <String> [<CommonParameters>]
DESCRIPTION
Gets the current status of a VPN Session or a Provider.
PARAMETERS
-VPNSession <PSObject>
The VPN session object returned by Connect-VPN.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Provider <String>
The VPN Provider to use.
One of: AnyConnect
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String
The current status of the VPN Session of the Provider.
With AnyConnect, the values are typically: Connected, Disconnected, Unknown.
NOTES
Only Cisco AnyConnect VPNs are supported as of now.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$session = Connect-VPN -Provider AnyConnect -ComputerName vpn.acme.com -Credentials (Get-Credential
ACME\\gildas)
Get-VPNStatus $session
Connected
Description
-----------
Gets the connection of a session
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-VPNStatus -Provider AnyConnect
Disconnected
Description
-----------
Gets the status of Cisco AnyConnect VPN
RELATED LINKS
https://github.com/gildas/posh-vpn