Help Center
Choose product document...
Veeam Backup & Replication 9.5
PowerShell Reference

Get-VBRViServerNetworkInfo

Short Description

Returns virtual networks for a VMware host.

Applies to

Platform: VMware

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

Get-VBRViServerNetworkInfo -Server <CHost> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description

This cmdlet returns the list of all virtual networks to which a selected VMware host is connected.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Server

Specifies the VMware host. The cmdlet will return virtual networks connected to this host.

Accepts CHost or string (host name) type.

True

Named

True (by Value
FromPipeline, ValueFromPipeline
ByPropertyName)

True

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Return Type

VBRViNetworkInfo[]

VBRViDVSNetworkInfo[]

Example 1

This command shows how to look for the networks to which the 'srv01.veeam.local' host is connected using a variable.

  1. Run Get-VBRServer to get the host and save it to the $server variable.
  2. Run Get-VBRViServerNetworkInfo with the $server variable.

PS C:\PS> $server = Get-VBRServer -Type ESX -Name "srv01.veeam.local"

PS C:\PS> Get-VBRViServerNetworkInfo -Server $server

Example 2

This command shows how to look for the networks to which the 'srv01.veeam.local' host is connected using the server name.

PS C:\PS> Get-VBRViServerNetworkInfo -Server "srv01.veeam.local"

Example 3

This example shows how to select one network from the list of network that is connected to the 'srv01.veeam.local' host.

  1. Run Get-VBRViServerNetworkInfo to get the list of all networks connected to the host. Save the result to the '$networks' variable.
  2. Address the index number of the corresponding network in the list. Save the result to the '$targetnetwork' variable.

PS C:\PS> $networks = Get-VBRViServerNetworkInfo -Server "srv01.veeam.local"

PS C:\PS> $targetnetwork = $networks[5]

Example 4

This example shows how to get a network named "VM Network" connected to the 'srv01.veeam.local' host.

Run Get-VBRViServerNetworkInfo to get the list of all networks connected to the host. Pass the result to the Where-Object cmdlet to select the networks with the NetworkName property that equals "VM Network".

PS C:\PS> Get-VBRViServerNetworkInfo -Server "srv01.veeam.local" | Where-Object { $_.NetworkName -eq "VM Network" }

Example 5

This example shows how to get a network named "DPortGroup" located on a distributed virtual switch named "DSwitch" from the list of networks connected to the 'srv01.veeam.local' host.

Run Get-VBRViServerNetworkInfo to get the list of all networks connected to the host.

Use the Where-Object statement to filter the networks by the following properties:

  • Type = "ViDVS"
  • SwitchName = "DSwitch"
  • NetworkName = "DPortGroup"

PS C:\PS> Get-VBRViServerNetworkInfo -Server "srv01.veeam.local" | Where { $_.Type -eq "ViDVS" -and $_.SwitchName -eq "DSwitch" -and $_.NetworkName -eq "DPortGroup" }

Related Commands

Get-VBRServer

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Endpoint Backup Documentation

Veeam Management Pack Documentation