New-AzVirtualNetworkTap

Creates a VirtualNetworkTap resource.

Syntax

New-AzVirtualNetworkTap
   -ResourceGroupName <String>
   -Name <String>
   [-DestinationPort <Int32>]
   [-Location <String>]
   [-Tag <Hashtable>]
   [-DestinationNetworkInterfaceIPConfiguration <PSNetworkInterfaceIPConfiguration>]
   [-DestinationLoadBalancerFrontEndIPConfiguration <PSFrontendIPConfiguration>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzVirtualNetworkTap
   -ResourceGroupName <String>
   -Name <String>
   [-DestinationPort <Int32>]
   [-Location <String>]
   [-Tag <Hashtable>]
   [-DestinationNetworkInterfaceIPConfigurationId <String>]
   [-DestinationLoadBalancerFrontEndIPConfigurationId <String>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzVirtualNetworkTap cmdlet creates an Azure virtual network tap resource.

Examples

Example 1: Create an Azure virtual network tap

PS C:\>New-AzVirtualNetworkTap -Name "VirtualNetworkTap1" -ResourceGroupName "ResourceGroup1" -Location "centralus" -DestinationPort 8888 -DestinationNetworkInterfaceIPConfiguration $destinationNic.IpConfigurations[0]

This command creates a virtual network tap named "VirtualNetworkTap1" which has destination VM configuration details (DestinationIpConfiguration, DestinationPort). All the source tap configured VM's traffic will be routed to this Destination IP + Port.

Example 2: Create an Azure virtual network tap using LoadBalancer IP

# Create LoadBalancer
PS C:\>$frontend = New-AzLoadBalancerFrontendIpConfig -Name $frontendName -PublicIpAddress $publicip
PS C:\>New-AzVirtualNetworkTap -Name "VirtualNetworkTap1" -ResourceGroupName "ResourceGroup1" -Location "centralus" -DestinationLoadBalancerFrontEndIPConfiguration $frontend

This command creates a virtual network tap named "VirtualNetworkTap1" which has destination VM configuration details (FrontEndIpConfiguration). All the source tap configured VM's traffic will be routed to this LoadBalancer IpConfiguration. Default Destination Port is 4789.

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DestinationLoadBalancerFrontEndIPConfiguration

The reference of the destination load balancer front end IP configuration resource.

Type:PSFrontendIPConfiguration
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DestinationLoadBalancerFrontEndIPConfigurationId

The reference of the destination load balancer front end IP configuration resource.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DestinationNetworkInterfaceIPConfiguration

The reference of the destination network interface IP configuration resource.

Type:PSNetworkInterfaceIPConfiguration
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DestinationNetworkInterfaceIPConfigurationId

The reference of the destination network interface IP configuration resource.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DestinationPort

The Destination Port of the packet collector

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Force

Do not ask for confirmation if you want to overwrite a resource

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Location

The location.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

The name of the tap.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

The resource group name of the virtual network tap.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Tag

A hashtable which represents resource tags.

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Int32

Hashtable

PSNetworkInterfaceIPConfiguration

PSFrontendIPConfiguration

Outputs

Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkTap