New-VBRUniversalCDPNetworkMappingRule

Short Description

Defines network mapping rules for universal CDP policies.

Applies to

Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

This cmdlet provides parameter sets that allow you to:

  • Define the default target network used for workloads and network adapters for which mapping rules are not defined explicitly.

New-VBRUniversalCDPNetworkMappingRule -IsDefaultNetwork -TargetNetwork <IVBRServerNetworkInfo> [<CommonParameters>]

  • Define a network mapping rule for a workload or network adapter.

New-VBRUniversalCDPNetworkMappingRule -SourceObject <VBRUniversalCDPSourceNetwork> -TargetNetwork <IVBRServerNetworkInfo> [<CommonParameters>]

Detailed Description

This cmdlet defines the VBRUniversalCDPNetworkMappingRule object that contains network mapping rules.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

IsDefaultNetwork

Defines that the cmdlet specifies the default target network. If you provide this parameter, the target network will be used for all workloads and network adapters for which mapping rules are not defined explicitly.

SwitchParameter

True

Named

False

TargetNetwork

Specifies the target network.

Accepts the IVBRServerNetworkInfo object. To get this object, run the Get-VBRViServerNetworkInfo cmdlet.

True

Named

False

SourceObject

Specifies a workload or network adapter for which you want to create the rule.

Accepts the VBRUniversalCDPSourceNetwork object. To get this object, run the Get-VBRDiscoveredComputer or Get-VBRDiscoveredComputerNetwork cmdlet.

True

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

Output Object

The cmdlet returns the VBRUniversalCDPNetworkMappingRule object that defines network mapping rules.

Examples

Example 1. Creating Network Rule for Workload

This example shows how to create a network mapping rule for a workload.

$workloads = Get-VBRDiscoveredComputer

$server = Get-VBRServer -Name "prgtwesx01-virt.tech.local"

$networks = Get-VBRViServerNetworkInfo -Server $server

$rule = New-VBRUniversalCDPNetworkMappingRule -SourceObject $workloads[0] -TargetNetwork $networks[0]

Perform the following steps:

  1. Run the Get-VBRDiscoveredComputer cmdlet. Save the result to the $workloads variable.
  2. Run the Get-VBRServer cmdlet. Specify the Name parameter value. Save the result to the $server variable.
  3. Run the Get-VBRViServerNetworkInfo cmdlet. Set the $server variable as the Server parameter value. Save the result to the $networks variable.
  4. Run the New-VBRUniversalCDPNetworkMappingRule cmdlet. Set the $workloads[0] variable as the SourceObject parameter value. Set the $networks[0] variable as the TargetNetwork parameter value. Save the result to the $rule variable.

Example 2. Creating Default Network Rule

This example shows how to create the default network rule.

$server = Get-VBRServer -Name "prgtwesx01-virt.tech.local"

$networks = Get-VBRViServerNetworkInfo -Server $server

$rule = New-VBRUniversalCDPNetworkMappingRule -IsDefaultNetwork -TargetNetwork $networks[0]

Perform the following steps:

  1. Run the Get-VBRServer cmdlet. Specify the Name parameter value. Save the result to the $server variable.
  2. Run the Get-VBRViServerNetworkInfo cmdlet. Set the $server variable as the Server parameter value. Save the result to the $networks variable.
  3. Run the New-VBRUniversalCDPNetworkMappingRule cmdlet. Specify the IsDefaultNetwork parameter. Set the $networks[0] variable as the TargetNetwork parameter value. Save the result to the $rule variable.

Related Commands

Page updated 10/24/2025

Page content applies to build 13.0.1.180