Share via


New-SCVMHostNetworkAdapterConfig

New-SCVMHostNetworkAdapterConfig

Creates a host network adapter configuration.

Syntax

Parameter Set: PhysicalGenericNicDhcp
New-SCVMHostNetworkAdapterConfig -SetAsGenericNIC -SetAsPhysicalNetworkAdapter -UseDhcpForIPConfiguration [-ConsistentDeviceName <String> ] [-JobVariable <String> ] [-MACAddress <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: PhysicalGenericNicStaticIP
New-SCVMHostNetworkAdapterConfig -LogicalNetwork <LogicalNetwork> -SetAsGenericNIC -SetAsPhysicalNetworkAdapter -UseStaticIPForIPConfiguration [-ConsistentDeviceName <String> ] [-IPv4Address <String> ] [-IPv4Subnet <String> ] [-IPv6Address <String> ] [-IPv6Subnet <String> ] [-JobVariable <String> ] [-MACAddress <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: PhysicalManagementNicDhcp
New-SCVMHostNetworkAdapterConfig -SetAsManagementNIC -SetAsPhysicalNetworkAdapter -UseDhcpForIPConfiguration [-ConsistentDeviceName <String> ] [-JobVariable <String> ] [-MACAddress <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: PhysicalManagementNicStaticIP
New-SCVMHostNetworkAdapterConfig -LogicalNetwork <LogicalNetwork> -SetAsManagementNIC -SetAsPhysicalNetworkAdapter -UseStaticIPForIPConfiguration [-ConsistentDeviceName <String> ] [-IPv4Address <String> ] [-IPv4Subnet <String> ] [-IPv6Address <String> ] [-IPv6Subnet <String> ] [-JobVariable <String> ] [-MACAddress <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: PhysicalNicLogicalSwitch
New-SCVMHostNetworkAdapterConfig -LogicalSwitch <LogicalSwitch> -SetAsPhysicalNetworkAdapter -UplinkPortProfileSet <UplinkPortProfileSet> [-ConsistentDeviceName <String> ] [-JobVariable <String> ] [-MACAddress <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: VirtualGenericNicDhcp
New-SCVMHostNetworkAdapterConfig -LogicalSwitch <LogicalSwitch> -SetAsGenericNIC -SetAsVirtualNetworkAdapter -UseDhcpForIPConfiguration -VMNetwork <VMNetwork> [-JobVariable <String> ] [-MACAddress <String> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: VirtualGenericNicStaticIP
New-SCVMHostNetworkAdapterConfig -LogicalSwitch <LogicalSwitch> -SetAsGenericNIC -SetAsVirtualNetworkAdapter -UseStaticIPForIPConfiguration -VMNetwork <VMNetwork> [-IPv4Address <String> ] [-IPv4Subnet <String> ] [-IPv6Address <String> ] [-IPv6Subnet <String> ] [-JobVariable <String> ] [-MACAddress <String> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: VirtualManagementNicDhcp
New-SCVMHostNetworkAdapterConfig -LogicalSwitch <LogicalSwitch> -SetAsManagementNIC -SetAsVirtualNetworkAdapter -TransientManagementNetworkAdapter <PhysicalComputerNetworkAdapterConfig> -UseDhcpForIPConfiguration -VMNetwork <VMNetwork> [-JobVariable <String> ] [-MACAddress <String> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: VirtualManagementNicStaticIP
New-SCVMHostNetworkAdapterConfig -LogicalSwitch <LogicalSwitch> -SetAsManagementNIC -SetAsVirtualNetworkAdapter -TransientManagementNetworkAdapter <PhysicalComputerNetworkAdapterConfig> -UseStaticIPForIPConfiguration -VMNetwork <VMNetwork> [-IPv4Address <String> ] [-IPv4Subnet <String> ] [-IPv6Address <String> ] [-IPv6Subnet <String> ] [-JobVariable <String> ] [-MACAddress <String> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed Description

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

Parameters

-ConsistentDeviceName<String>

Specifies a consistent device name for a network adapter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IPv4Address<String>

Specifies an IPv4 address.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IPv4Subnet<String>

Specifies an IPv4 subnet.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IPv6Address<String>

Specifies an IPv6 address.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IPv6Subnet<String>

Specifies an IPv6 subnet.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LogicalNetwork<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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LogicalSwitch<LogicalSwitch>

Specifies a logical switch object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MACAddress<String>

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

NOTE: When used with New-SCPXEServer or Set-SCPXEServer, the MACAddress parameter updates the PXE interfaces from which the SCDM PXE Server listens for and responds to PXE requests.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PortClassification<PortClassification>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

Aliases

none

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.

Aliases

none

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.

Aliases

none

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.

Aliases

none

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.

Aliases

none

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TransientManagementNetworkAdapter<PhysicalComputerNetworkAdapterConfig>

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UplinkPortProfileSet<UplinkPortProfileSet>

Specifies an uplink port profile set object.

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

Aliases

none

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.

Aliases

none

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMNetwork<VMNetwork>

Specifies a VM network object.

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • HostNetworkAdapterConfig

Examples

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

The first command gets the logical network object named LogicalNetwork01 and then 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.

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

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

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

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

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

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

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

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

The second command gets the VM network object named VMNetwork01 and then 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.

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

Get-SCLogicalSwitch

Get-SCUplinkPortProfileSet

New-SCPhysicalComputerConfig

Get-SCLogicalNetwork

Get-SCVMNetwork