Get-SCVirtualNetworkAdapter

Get-SCVirtualNetworkAdapter

Gets VMM virtual network adapter objects.

構文

Parameter Set: All
Get-SCVirtualNetworkAdapter -All [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-ParentTypeVMOrHost] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: HardwareProfile
Get-SCVirtualNetworkAdapter -HardwareProfile <HardwareProfile> [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [ <CommonParameters>]

Parameter Set: ID
Get-SCVirtualNetworkAdapter [-ID] <Guid> [[-Name] <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [ <CommonParameters>]

Parameter Set: Template
Get-SCVirtualNetworkAdapter -VMTemplate <Template> [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [ <CommonParameters>]

Parameter Set: VM
Get-SCVirtualNetworkAdapter -VM <VM> [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [ <CommonParameters>]

Parameter Set: VMHost
Get-SCVirtualNetworkAdapter -VMHost <Host> [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [ <CommonParameters>]

詳細説明

The Get-SCVirtualNetworkAdapter cmdlet gets one or more virtual network adapter objects from a virtual machine object, a virtual machine template object, or a hardware profile object in a Virtual Machine Manager (VMM) environment.

パラメーター

-All

Indicates that this cmdlet retrieves a full list of all subordinate objects independent of the parent object. For example, the command Get-SCVirtualDiskDrive -All retrieves all virtual disk drive objects regardless of the virtual machine object or template object that each virtual disk drive object is associated with.

エイリアス

none

必須?

true

位置は?

named

既定値

none

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

True (ByValue)

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

false

-HardwareProfile<HardwareProfile>

Specifies a hardware profile object.

エイリアス

none

必須?

true

位置は?

named

既定値

none

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

True (ByValue)

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

false

-ID<Guid>

Specifies the numerical identifier as a globally unique identifier (GUID) for a specific object.

エイリアス

none

必須?

true

位置は?

1

既定値

none

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

True (ByValue)

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

false

-Name<String>

Specifies the name of a network object

エイリアス

none

必須?

false

位置は?

2

既定値

none

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

True (ByValue)

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

false

-OnBehalfOfUser<System.String>

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-OnBehalfOfUserRole<Microsoft.SystemCenter.VirtualMachineManager.UserRole>

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-ParentTypeVMOrHost

Indicates that the parent type is a virtual machine or a host.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

True (ByValue)

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

false

-VM<VM>

Specifies a virtual machine object.

エイリアス

none

必須?

true

位置は?

named

既定値

none

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

True (ByValue)

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

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

-VMMServer<ServerConnection>

Specifies a VMM server object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

True (ByValue)

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

false

-VMTemplate<Template>

Specifies a VMM template object used to create virtual machines.

エイリアス

Template

必須?

true

位置は?

named

既定値

none

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

True (ByValue)

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

false

<CommonParameters>

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

入力

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

出力

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

  • VirtualNetworkAdapter

  • Requires a VMM virtual machine object, virtual machine template object, or hardware profile object, which can be retrieved by using the Get-SCVirtualMachine, Get-SCVMTemplate, or Get-SCHardwareProfile cmdlets, respectively.

Example Example 1: Get virtual network adapters from a virtual machine.

The first command gets the virtual machine object named VM01, and then stores the object in the $VM variable.

The second command gets all virtual network adapter objects on VM01 and displays information about the adapters.

PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> Get-SCVirtualNetworkAdapter -VM $VM

Example Example 2: Get virtual network adapters from a virtual machine template.

The first command gets all virtual machine template objects from the VMM library, selects the template object named VMTemplate01, and then stores the object in the $VMTemplate variable.

The last command gets all virtual network adapter objects VMTemplate01 and displays information about these adapters.

PS C:\> $VMTemplate = Get-SCVMTemplate | where { $_.Name -eq "VMTemplate01" }
PS C:\> Get-SCVirtualNetworkAdapter -Template $VMTemplate

Example 3: Get virtual network adapters from a hardware profile

The first command gets all hardware profile objects in the VMM library, selects the profile object named NewHWProfile01, and then stores the object in the $HWProfile variable.

The second command gets all virtual network adapter objects NewHWProfile01 and displays information about these adapters.

PS C:\> $HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "NewHWProfile01" }
PS C:\> Get-SCVirtualNetworkAdapter -HardwareProfile $HWProfile

関連トピック

Get-SCHardwareProfile

Get-SCVirtualDiskDrive

Get-SCVirtualMachine

Get-SCVMTemplate

Remove-SCVirtualNetworkAdapter

Set-SCVirtualNetworkAdapter