New-SCVMHostNetworkAdapterConfig

Creates a host network adapter configuration.

Syntax

New-SCVMHostNetworkAdapterConfig [-AdapterName <String>] [-ConsistentDeviceName <String>]
 [-DisableAdapterDNSRegistration <Boolean>] [-JobVariable <String>] [-MACAddress <String>] [-PROTipID <Guid>]
 [-RunAsynchronously] [-SetAsGenericNIC] [-SetAsPhysicalNetworkAdapter] [-UseDhcpForIPConfiguration]
 [-VMMServer <ServerConnection>] [<CommonParameters>]
New-SCVMHostNetworkAdapterConfig [-AdapterName <String>] [-ConsistentDeviceName <String>]
 [-DisableAdapterDNSRegistration <Boolean>] [-IPv4Address <String>] [-IPv4Subnet <String>]
 [-IPv6Address <String>] [-IPv6Subnet <String>] [-JobVariable <String>] -LogicalNetwork <LogicalNetwork>
 [-MACAddress <String>] [-PROTipID <Guid>] [-RunAsynchronously] [-SetAsGenericNIC]
 [-SetAsPhysicalNetworkAdapter] [-UseStaticIPForIPConfiguration] [-VMMServer <ServerConnection>]
 [<CommonParameters>]
New-SCVMHostNetworkAdapterConfig [-AdapterName <String>] [-ConsistentDeviceName <String>]
 [-JobVariable <String>] [-MACAddress <String>] [-PROTipID <Guid>] [-RunAsynchronously] [-SetAsManagementNIC]
 [-SetAsPhysicalNetworkAdapter] [-UseDhcpForIPConfiguration] [-VMMServer <ServerConnection>]
 [<CommonParameters>]
New-SCVMHostNetworkAdapterConfig [-AdapterName <String>] [-ConsistentDeviceName <String>]
 [-IPv4Address <String>] [-IPv4Subnet <String>] [-IPv6Address <String>] [-IPv6Subnet <String>]
 [-JobVariable <String>] -LogicalNetwork <LogicalNetwork> [-MACAddress <String>] [-PROTipID <Guid>]
 [-RunAsynchronously] [-SetAsManagementNIC] [-SetAsPhysicalNetworkAdapter] [-UseStaticIPForIPConfiguration]
 [-VMMServer <ServerConnection>] [<CommonParameters>]
New-SCVMHostNetworkAdapterConfig [-AdapterName <String>] [-JobVariable <String>] -LogicalSwitch <LogicalSwitch>
 [-MACAddress <String>] [-PROTipID <Guid>] [-PortClassification <PortClassification>] [-RunAsynchronously]
 [-SetAsManagementNIC] [-SetAsVirtualNetworkAdapter]
 -TransientManagementNetworkAdapter <PhysicalComputerNetworkAdapterConfig> [-UseDhcpForIPConfiguration]
 [-VMMServer <ServerConnection>] -VMNetwork <VMNetwork> [<CommonParameters>]
New-SCVMHostNetworkAdapterConfig [-AdapterName <String>] [-IPv4Address <String>] [-IPv4Subnet <String>]
 [-IPv6Address <String>] [-IPv6Subnet <String>] [-JobVariable <String>] -LogicalSwitch <LogicalSwitch>
 [-MACAddress <String>] [-PROTipID <Guid>] [-PortClassification <PortClassification>] [-RunAsynchronously]
 [-SetAsManagementNIC] [-SetAsVirtualNetworkAdapter]
 -TransientManagementNetworkAdapter <PhysicalComputerNetworkAdapterConfig> [-UseStaticIPForIPConfiguration]
 [-VMMServer <ServerConnection>] -VMNetwork <VMNetwork> [<CommonParameters>]
New-SCVMHostNetworkAdapterConfig [-AdapterName <String>] [-IPv4Address <String>] [-IPv4Subnet <String>]
 [-IPv6Address <String>] [-IPv6Subnet <String>] [-JobVariable <String>] -LogicalSwitch <LogicalSwitch>
 [-MACAddress <String>] [-PROTipID <Guid>] [-PortClassification <PortClassification>] [-RunAsynchronously]
 [-SetAsGenericNIC] [-SetAsVirtualNetworkAdapter] [-UseStaticIPForIPConfiguration]
 [-VMMServer <ServerConnection>] -VMNetwork <VMNetwork> [<CommonParameters>]
New-SCVMHostNetworkAdapterConfig [-AdapterName <String>] [-JobVariable <String>] -LogicalSwitch <LogicalSwitch>
 [-MACAddress <String>] [-PROTipID <Guid>] [-PortClassification <PortClassification>] [-RunAsynchronously]
 [-SetAsGenericNIC] [-SetAsVirtualNetworkAdapter] [-UseDhcpForIPConfiguration] [-VMMServer <ServerConnection>]
 -VMNetwork <VMNetwork> [<CommonParameters>]
New-SCVMHostNetworkAdapterConfig [-ConsistentDeviceName <String>] [-DisableAdapterDNSRegistration <Boolean>]
 [-JobVariable <String>] -LogicalSwitch <LogicalSwitch> [-MACAddress <String>] [-PROTipID <Guid>]
 [-RunAsynchronously] [-SetAsPhysicalNetworkAdapter] -UplinkPortProfileSet <UplinkPortProfileSet>
 [-VMMServer <ServerConnection>] [<CommonParameters>]

Description

The New-SCVMHostNetworkAdapterConfig cmdlet creates a host network adapter configuration that is used during the host operating system deployment process.

Examples

Example 1: Create a management physical host network adapter configuration by using a static IP address

PS C:\> $LogicalNetwork = Get-SCLogicalNetwork -Name "LogicalNetwork01"
PS C:\> New-SCVMHostNetworkAdapterConfig -SetAsPhysicalNetworkAdapter -SetAsManagementNIC -UseStaticIPForIPConfiguration -LogicalNetwork $LogicalNetwork -MacAddress "00-1D-D8-B7-1C-00" -IPv4Subnet "10.0.0.1/24"

The first command gets the logical network object named LogicalNetwork01 and stores the object in the $LogicalNetwork variable.

The second command creates a physical host network adapter configuration, setting it as the management network adapter and uses a static IP address during IP configuration. The configuration includes LogicalNetwork01, the provided MAC address, and specified subnet.

Example 2: Create a physical host network adapter configuration that uses a logical switch

PS C:\> $LogicalSwitch = Get-SCLogicalSwitch -Name "LogicalSwitch01"
PS C:\> $UplinkPortProfSet = Get-SCUplinkPortProfileSet -Name "UplinkPortProfileSet01"
PS C:\> New-SCVMHostNetworkAdapterConfig -SetAsPhysicalNetworkAdapter -LogicalSwitch $LogicalSwitch -UplinkPortProfileSet $UplinkPortProfSet

The first command gets the logical switch object named LogicalSwitch01 and stores the object in the $LogicalSwitch variable.

The second command gets the uplink port profile set object named UplinkPortProfileSet01 and stores the object in the $UplinkPortProfSet variable.

The last command creates a physical host network adapter configuration with LogicalSwitch01 and UplinkPortProfileSet01.

Example 3: Create a generic virtual host network adapter configuration by using DHCP

PS C:\> $LogicalSwitch = Get-SCLogicalSwitch -Name "LogicalSwitch01"
PS C:\> $VMNetwork = Get-SCVMNetwork -Name "VMNetwork01"
PS C:\> New-SCVMHostNetworkAdapterConfig -SetAsVirtualNetworkAdapter -SetAsGenericNIC -UseDhcpForIPConfiguration -LogicalSwitch $LogicalSwitch -VMNetwork $VMNetwork

The first command gets the logical switch object named LogicalSwitch01 and stores the object in the $LogicalSwitch variable.

The second command gets the VM network object named VMNetwork01 and stores the object in the $VMNetwork variable.

The last command creates a generic virtual host network configuration with LogicalSwtich01 and VMNetwork01 that uses DHCP to obtain an IP address.

Parameters

-AdapterName

Specifies the name of the network adapter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ConsistentDeviceName

Specifies a consistent device name for a network adapter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableAdapterDNSRegistration

Indicates whether to disable DNS registration for the network adapter.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv4Address

Specifies an IPv4 address.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv4Subnet

Specifies an IPv4 subnet.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv6Address

Specifies an IPv6 address.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv6Subnet

Specifies an IPv6 subnet.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LogicalNetwork

Specifies a logical network. A logical network is a named grouping of IP subnets and VLANs that is used to organize and simplify network assignments.

Type:LogicalNetwork
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LogicalSwitch

Specifies a logical switch object.

Type:LogicalSwitch
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MACAddress

Specifies the Media Access Control (MAC) address, or a set of MAC addresses, for a physical or virtual network adapter on a computer. Valid values are: one or more MAC addresses.

Example format for a single MAC address:

-MACAddress "00-15-5D-B4-DC-00"

Example format for a set of MAC addresses:

-MACAddress "00-15-5D-B4-DC-00", "00-1A-A0-E3-75-29"

Example format for a set of MAC addresses:

$Macs = "00-15-5D-B4-DC-00", "00-1A-A0-E3-75-29"

Set-SCPXEServer -MACAddress $Macs

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PortClassification

Specifies the port classification of the switch to which the virtual network adapter connects.

Type:PortClassification
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SetAsGenericNIC

Indicates that the network adapter is not the management network adapter for the host.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SetAsManagementNIC

Indicates that the network adapter is the management network adapter for the host.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SetAsPhysicalNetworkAdapter

Indicates that the network adapter is a physical network adapter.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SetAsVirtualNetworkAdapter

Indicates that the network adapter is a virtual network adapter.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TransientManagementNetworkAdapter

Specifies the physical network adapter that the management virtual network adapter binds to during the initial operating system deployment phase. This property is used temporarily before the host is deployed.

Type:PhysicalComputerNetworkAdapterConfig
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UplinkPortProfileSet

Specifies an uplink port profile set object.

To obtain an uplink port profile set object, use the Get-SCUplinkPortProfileSet cmdlet.

Type:UplinkPortProfileSet
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UseDhcpForIPConfiguration

Indicates that the IP address for the network adapter is obtained by using DHCP.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UseStaticIPForIPConfiguration

Indicates that the network adapter is configured with a static IP address.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMNetwork

Specifies a VM network object.

To get a VM network object, use the Get-SCVMNetwork cmdlet.

Type:VMNetwork
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

HostNetworkAdapterConfig

This cmdlet returns a **HostNetworkAdapterConfig** object.