New-SCVMHostNetworkAdapterProfile
New-SCVMHostNetworkAdapterProfile
Creates a host network adapter profile.
Syntax
Parameter Set: PhysicalGenericNicDhcp
New-SCVMHostNetworkAdapterProfile -SetAsGenericNIC -SetAsPhysicalNetworkAdapter -UseDhcpForIPConfiguration [-ConsistentDeviceName <String> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: PhysicalGenericNicStaticIP
New-SCVMHostNetworkAdapterProfile -LogicalNetwork <LogicalNetwork> -SetAsGenericNIC -SetAsPhysicalNetworkAdapter -UseStaticIPForIPConfiguration [-ConsistentDeviceName <String> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: PhysicalManagementNicDhcp
New-SCVMHostNetworkAdapterProfile -SetAsManagementNIC -SetAsPhysicalNetworkAdapter -UseDhcpForIPConfiguration [-ConsistentDeviceName <String> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: PhysicalManagementNicStaticIP
New-SCVMHostNetworkAdapterProfile -LogicalNetwork <LogicalNetwork> -SetAsManagementNIC -SetAsPhysicalNetworkAdapter -UseStaticIPForIPConfiguration [-ConsistentDeviceName <String> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: PhysicalNicLogicalSwitch
New-SCVMHostNetworkAdapterProfile -LogicalSwitch <LogicalSwitch> -SetAsPhysicalNetworkAdapter -UplinkPortProfileSet <UplinkPortProfileSet> [-ConsistentDeviceName <String> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: VirtualGenericNicDhcp
New-SCVMHostNetworkAdapterProfile -LogicalSwitch <LogicalSwitch> -SetAsGenericNIC -SetAsVirtualNetworkAdapter -UseDhcpForIPConfiguration -VMNetwork <VMNetwork> [-JobVariable <String> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: VirtualGenericNicStaticIP
New-SCVMHostNetworkAdapterProfile -LogicalSwitch <LogicalSwitch> -SetAsGenericNIC -SetAsVirtualNetworkAdapter -UseStaticIPForIPConfiguration -VMNetwork <VMNetwork> [-JobVariable <String> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: VirtualManagementNicDhcp
New-SCVMHostNetworkAdapterProfile -LogicalSwitch <LogicalSwitch> -SetAsManagementNIC -SetAsVirtualNetworkAdapter -TransientManagementNetworkAdapter <PhysicalComputerNetworkAdapterProfile> -UseDhcpForIPConfiguration -VMNetwork <VMNetwork> [-JobVariable <String> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: VirtualManagementNicStaticIP
New-SCVMHostNetworkAdapterProfile -LogicalSwitch <LogicalSwitch> -SetAsManagementNIC -SetAsVirtualNetworkAdapter -TransientManagementNetworkAdapter <PhysicalComputerNetworkAdapterProfile> -UseStaticIPForIPConfiguration -VMNetwork <VMNetwork> [-JobVariable <String> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Detailed 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.
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 |
-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 |
-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<PhysicalComputerNetworkAdapterProfile>
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.
- HostNetworkAdapterProfile
Examples
Example Example 1.: Create a generic physical host network adapter profile by using DHCP.:
This command creates a physical host network adapter profile.
The parameters 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.
PS C:\> New-SCVMHostNetworkAdapterProfile -SetAsPhysicalNetworkAdapter -SetAsGenericNIC -UseDhcpForIPConfiguration -ConsistentDeviceName "Physical host network adapter profile 01"
Example Example 2: Create a physical network adapter profile with a logical switch.
The first command gets the logical switch object named LogicalSwitch01, and then stores the object in the $LogSwitch 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 profile using LogicalSwitch01 and UplinkPortProfileSet01.
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"
Example 3: Create a management virtual host network adapter profile by using a static IP address
The first command gets the host network adapter profile object with the ID of 259f47c7-c5a9-429d-a421-d232f9b34991, and then stores the object in the $TransMgmtNIC variable.
The second command gets the logical switch object named LogicalSwitch01, and then stores the object in the $LogSwitch variable.
The third command gets the VM network object named VMNetwork01, and then stores the object in the $VMNetwork variable.
The last command creates a virtual host network adapter profile as a management network adapter using LogicalSwitch01 and VMNetwork01.
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
Related topics
Get-SCVMHostNetworkAdapterProfile