This is an archive version of the document. To get the most up-to-date information, see the current version.

Get-VBRHvServerNetworkInfo

Short Description

Returns virtual networks for a Hyper-V host.

Applies to

Platform: Hyper-V

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

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

Detailed Description

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

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Server

Specifies the Hyper-V host. The cmdlet will return virtual networks connected to this host.

Accepts server object or string (host name) types.

True

Named

True (ByValue,
ByProperty
Name)

True

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Return Type

VBRHvServerNetworkInfo

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-VBRHvServerNetworkInfo with the $server variable.

$server = Get-VBRServer -Type HvServer -Name "srv01.veeam.local"

Get-VBRHvServerNetworkInfo -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.

Get-VBRHvServerNetworkInfo -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-VBRHvServerNetworkInfo 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.

$networks = Get-VBRHvServerNetworkInfo -Server "srv01.veeam.local"

$targetnetwork = $networks[5]

Example 4

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

Run Get-VBRHvServerNetworkInfo 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 "Lab Isolated Network".

Get-VBRHvServerNetworkInfo -Server "srv01.veeam.local" | Where-Object { $_.NetworkName -eq "Lab Isolated Network" }

Related Commands

Get-VBRServer