New-SCVMHostNetworkAdapterProfile

Creates a host network adapter profile.

Syntax

PhysicalGenericNicDhcp

New-SCVMHostNetworkAdapterProfile
    [-VMMServer <ServerConnection>]
    [-SetAsPhysicalNetworkAdapter]
    [-SetAsGenericNIC]
    [-ConsistentDeviceName <String>]
    [-UseDhcpForIPConfiguration]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

PhysicalManagementNicDhcp

New-SCVMHostNetworkAdapterProfile
    [-VMMServer <ServerConnection>]
    [-SetAsPhysicalNetworkAdapter]
    [-SetAsManagementNIC]
    [-ConsistentDeviceName <String>]
    [-UseDhcpForIPConfiguration]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

PhysicalGenericNicStaticIP

New-SCVMHostNetworkAdapterProfile
    -LogicalNetwork <LogicalNetwork>
    [-VMMServer <ServerConnection>]
    [-SetAsPhysicalNetworkAdapter]
    [-SetAsGenericNIC]
    [-ConsistentDeviceName <String>]
    [-UseStaticIPForIPConfiguration]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

PhysicalNicLogicalSwitch

New-SCVMHostNetworkAdapterProfile
    -LogicalSwitch <LogicalSwitch>
    -UplinkPortProfileSet <UplinkPortProfileSet>
    [-VMMServer <ServerConnection>]
    [-SetAsPhysicalNetworkAdapter]
    [-ConsistentDeviceName <String>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

PhysicalManagementNicStaticIP

New-SCVMHostNetworkAdapterProfile
    -LogicalNetwork <LogicalNetwork>
    [-VMMServer <ServerConnection>]
    [-SetAsPhysicalNetworkAdapter]
    [-SetAsManagementNIC]
    [-ConsistentDeviceName <String>]
    [-UseStaticIPForIPConfiguration]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

VirtualManagementNicStaticIP

New-SCVMHostNetworkAdapterProfile
    -TransientManagementNetworkAdapter <PhysicalComputerNetworkAdapterProfile>
    -LogicalSwitch <LogicalSwitch>
    -VMNetwork <VMNetwork>
    [-VMMServer <ServerConnection>]
    [-SetAsVirtualNetworkAdapter]
    [-SetAsManagementNIC]
    [-UseStaticIPForIPConfiguration]
    [-PortClassification <PortClassification>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

VirtualGenericNicDhcp

New-SCVMHostNetworkAdapterProfile
    -LogicalSwitch <LogicalSwitch>
    -VMNetwork <VMNetwork>
    [-VMMServer <ServerConnection>]
    [-SetAsVirtualNetworkAdapter]
    [-SetAsGenericNIC]
    [-UseDhcpForIPConfiguration]
    [-PortClassification <PortClassification>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

VirtualGenericNicStaticIP

New-SCVMHostNetworkAdapterProfile
    -LogicalSwitch <LogicalSwitch>
    -VMNetwork <VMNetwork>
    [-VMMServer <ServerConnection>]
    [-SetAsVirtualNetworkAdapter]
    [-SetAsGenericNIC]
    [-UseStaticIPForIPConfiguration]
    [-PortClassification <PortClassification>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

VirtualManagementNicDhcp

New-SCVMHostNetworkAdapterProfile
    -TransientManagementNetworkAdapter <PhysicalComputerNetworkAdapterProfile>
    -LogicalSwitch <LogicalSwitch>
    -VMNetwork <VMNetwork>
    [-VMMServer <ServerConnection>]
    [-SetAsVirtualNetworkAdapter]
    [-SetAsManagementNIC]
    [-UseDhcpForIPConfiguration]
    [-PortClassification <PortClassification>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

Description

The New-SCVMHostNetworkAdapterProfile cmdlet creates a network adapter profile.

Note that after you have created a network adapter profile, it cannot be updated. To change a network adapter profile, you must remove the network adapter profile and then re-create it.

Examples

Example 1: Create a generic physical host network adapter profile by using DHCP

PS C:\> New-SCVMHostNetworkAdapterProfile -SetAsPhysicalNetworkAdapter -SetAsGenericNIC -UseDhcpForIPConfiguration -ConsistentDeviceName "Physical host network adapter profile 01"

This command creates a physical host network adapter profile.

The switches used in this command indicate that this is a physical network adapter and that the network adapter is not the management network adapter for the host. Additionally, DHCP is used to obtain an IP address for the network adapter.

Example 2: Create a physical network adapter profile with a logical switch

PS C:\> $LogSwitch = Get-SCLogicalSwitch -Name "LogicalSwitch01"
PS C:\> $UplinkPortProfSet = Get-SCUplinkPortProfileSet -Name "UplinkPortProfileSet01"
PS C:\> New-SCVMHostNetworkAdapterProfile -SetAsPhysicalNetworkAdapter -LogicalSwitch $LogSwitch -UplinkPortProfileSet $UplinkPortProfSet -ConsistentDeviceName "Physical host network adapter profile 02"

The first command gets the logical switch object named LogicalSwitch01 and stores the object in the $LogSwitch 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 profile using LogicalSwitch01 and UplinkPortProfileSet01.

Example 3: Create a management virtual host network adapter profile by using a static IP address

PS C:\> $TransMgmtNIC = Get-SCVMHostNetworkAdapterProfile -ID "259f47c7-c5a9-429d-a421-d232f9b34991"
PS C:\> $LogSwitch = Get-SCLogicalSwitch -Name "LogicalSwitch01"
PS C:\> $VMNetwork = Get-SCVMNetwork -Name "VMNetwork01"
PS C:\> New-SCVMHostNetworkAdapterProfile -SetAsVirtualNetworkAdapter -SetAsManagementNIC -TransientManagementNetworkAdapter $TransMgmtNIC -UseStaticIPForIPConfiguration -LogicalSwitch $LogSwitch -VMNetwork $VMNetwork

The first command gets the host network adapter profile object with the ID of 259f47c7-c5a9-429d-a421-d232f9b34991 and stores the object in the $TransMgmtNIC variable.

The second command gets the logical switch object named LogicalSwitch01 and stores the object in the $LogSwitch variable.

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

The last command creates a virtual host network adapter prfile as a management network adapter using LogicalSwitch01 and VMNetwork01.

Parameters

-ConsistentDeviceName

Specifies a consistent device name for a network adapter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PhysicalGenericNicDhcp
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalManagementNicDhcp
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalGenericNicStaticIP
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalNicLogicalSwitch
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalManagementNicStaticIP
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:LogicalNetwork
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PhysicalGenericNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalManagementNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LogicalSwitch

Specifies a logical switch object.

Parameter properties

Type:LogicalSwitch
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PhysicalNicLogicalSwitch
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualManagementNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualGenericNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualGenericNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualManagementNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PortClassification

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

Parameter properties

Type:PortClassification
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VirtualManagementNicStaticIP
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualGenericNicDhcp
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualGenericNicStaticIP
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualManagementNicDhcp
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SetAsGenericNIC

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PhysicalGenericNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalGenericNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualGenericNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualGenericNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SetAsManagementNIC

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PhysicalManagementNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalManagementNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualManagementNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualManagementNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SetAsPhysicalNetworkAdapter

Indicates that the network adapter is a physical network adapter.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PhysicalGenericNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalManagementNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalGenericNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalNicLogicalSwitch
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalManagementNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SetAsVirtualNetworkAdapter

Indicates that the network adapter is a virtual network adapter.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VirtualManagementNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualGenericNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualGenericNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualManagementNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:PhysicalComputerNetworkAdapterProfile
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VirtualManagementNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualManagementNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UplinkPortProfileSet

Specifies an uplink port profile set object.

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

Parameter properties

Type:UplinkPortProfileSet
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PhysicalNicLogicalSwitch
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UseDhcpForIPConfiguration

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PhysicalGenericNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalManagementNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualGenericNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualManagementNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UseStaticIPForIPConfiguration

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PhysicalGenericNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
PhysicalManagementNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualManagementNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualGenericNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMNetwork

Specifies a VM network object.

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

Parameter properties

Type:VMNetwork
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VirtualManagementNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualGenericNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualGenericNicStaticIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
VirtualManagementNicDhcp
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

HostNetworkAdapterProfile

This cmdlet returns a HostNetworkAdapterProfile object.