Get-SCVirtualNetwork

Get-SCVirtualNetwork

Gets virtual network objects configured on a VMM host.

構文

Parameter Set: NoFilter
Get-SCVirtualNetwork [[-Name] <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: Cluster
Get-SCVirtualNetwork [[-Name] <String> ] -VMHostCluster <HostCluster> [ <CommonParameters>]

Parameter Set: FilterByVMHost
Get-SCVirtualNetwork [[-Name] <String> ] -VMHost <Host> [ <CommonParameters>]

詳細説明

The Get-SCVirtualNetwork cmdlet gets one or more virtual network objects configured on a host managed by Virtual Machine Manager (VMM).

For information about virtual networks in VMM, type Get-Help New-SCVirtualNetwork -detailed.

パラメーター

-Name<String>

Specifies the name of a VMM object.

エイリアス

none

必須?

false

位置は?

1

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMHost<Host>

Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.

For more information about each type of host, type Get-Help Add-SCVMHost -detailed. See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-VMHostCluster<HostCluster>

Specifies a VMM host cluster object.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • VirtualNetwork

Example 1: Get all virtual networks in the VMM database

The first command gets all virtual network objects on all hosts managed by VMM, and then stores the virtual network objects in $VirtualNetworks.

The second command displays a subset of information about each virtual network object in $VirtualNetworks: the name of each virtual network, the physical host on which each virtual network is configured, and the physical network adapters configured on the host for each virtual network.

PS C:\> $VirtualNetworks = Get-SCVirtualNetwork
PS C:\> $VirtualNetworks | Format-List Name,VMHost,VMHostNetworkadapters

Example Example 2: Get all virtual networks on a specific host.

The first command gets the host object named VMHost01, and then stores the object in the $VMHost variable.

The second command gets all virtual network objects on VMHost01 and displays information about each virtual network.

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01.Contoso.com"
PS C:\> Get-SCVirtualNetwork -VMHost $VMHost

Example 3: Get a virtual network by name from a specific host

The first command gets the host object named VMHost02, and then stores the object in the $VMHost variable.

The second command gets the virtual network object named InternalVNet01 from VMHost02, and then stores the object in the $VN variable.

The last command displays information about the virtual network stored in $VN.

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost02.Contoso.com"
PS C:\> $VN = Get-SCVirtualNetwork -VMHost $VMHost -Name "InternalVNet01"
PS C:\> $VN

関連トピック

New-SCVirtualNetwork

Remove-SCVirtualNetwork

Set-SCVirtualNetwork

Get-SCVMHost