Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Get-AzVirtualNetworkPeering
- Module:
- Az.Network Module
Gets the virtual network peering.
Syntax
Default (Default)
Get-AzVirtualNetworkPeering
-VirtualNetworkName <String>
-ResourceGroupName <String>
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzVirtualNetworkPeering cmdlet gets the virtual network peering.
Examples
Example 1: Get a peering between two virtual networks
# Get virtual network peering named myVnet1TomyVnet2 located in myVirtualNetwork in the resource group named myResourceGroup.
Get-AzVirtualNetworkPeering -Name "myVnet1TomyVnet2" -VirtualNetworkName "myVnet" -ResourceGroupName "myResourceGroup"
Example 2: Get all peerings in virtual network
# Get all virtual network peerings located in myVirtualNetwork in the resource group named myResourceGroup.
Get-AzVirtualNetworkPeering -Name "myVnet1To*" -VirtualNetworkName "myVnet" -ResourceGroupName "myResourceGroup"
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-Name
Specifies the virtual network peering name.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | True |
| DontShow: | False |
Parameter sets
-ResourceGroupName
Specifies the resource group name that the virtual network peering belongs to.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-VirtualNetworkName
Specifies the virtual network name that this cmdlet gets.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
String
Outputs
PSVirtualNetworkPeering
Related Links
Azure PowerShell
Feedback
Was this page helpful?
