PowerCLI Reference



This cmdlet adds NIC settings mappings to the specified OS customization specifications.


New-OSCustomizationNicMapping -OSCustomizationSpec <OSCustomizationSpec> [-Server <VIServer[]>] [-IpMode <OSCustomizationIPMode>] [-VCApplicationArgument <String>] [[-IpAddress] <String>] [[-SubnetMask] <String>] [[-DefaultGateway] <String>] [-AlternateGateway <String>] [[-Dns] <String[]>] [-Wins <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-OSCustomizationNicMapping -OSCustomizationSpec <OSCustomizationSpec> [-NetworkAdapterMac <String[]>] [-Server <VIServer[]>] [-IpMode <OSCustomizationIPMode>] [-VCApplicationArgument <String>] [[-IpAddress] <String>] [[-SubnetMask] <String>] [[-DefaultGateway] <String>] [-AlternateGateway <String>] [[-Dns] <String[]>] [-Wins <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-OSCustomizationNicMapping -OSCustomizationSpec <OSCustomizationSpec> [-Position <Int32[]>] [-Server <VIServer[]>] [-IpMode <OSCustomizationIPMode>] [-VCApplicationArgument <String>] [[-IpAddress] <String>] [[-SubnetMask] <String>] [[-DefaultGateway] <String>] [-AlternateGateway <String>] [[-Dns] <String[]>] [-Wins <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet adds NIC settings mappings to the specified OS customization specifications. If the given specification is server-side, it is updated on the server. If it is client-side, the reference that is kept in-memory is updated but the variable that is passed to the cmdlet is not modified.


NameTypeDescriptionRequired?Pipeline InputDefault Value
IpAddressStringSpecifies an IP address. Using this parameter automatically sets the IpMode parameter to UseStaticIp.falsefalse
SubnetMaskStringSpecifies a subnet mask.falsefalse
DefaultGatewayStringSpecifies a default gateway.falsefalse
DnsString[]Specifies a DNS address. This parameter applies only to Windows operating systems.falsefalse
AlternateGatewayStringSpecifies an alternate gateway.falsefalse
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse
IpModeOSCustomizationIPModeSpecifies the IP configuration mode. The valid values are UseDhcp, PromptUser, UseVCApplication, and UseStaticIP.falsefalse
NetworkAdapterMacString[]Specifies the MAC addresses of the network adapters to which you want to map the new OS customization specifications.falsefalse
OSCustomizationSpecOSCustomizationSpecSpecifies the OS customization specification to which you want to add the NIC setting mapping. Passing multiple values to this parameter is obsolete.truetrue (ByValue)
PositionInt32[]Specifies the position of the NIC to which you want to map the OS customization specification.falsefalse
ServerVIServer[]Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
VCApplicationArgumentStringSpecifies an optional argument you want to pass to the vCenter Server to obtain an IP address.falsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
WinsString[]Specifies WINS servers. This parameter applies only to Windows operating systems.falsefalse

Return Type

The one or more newly created OSCustomizationNicMapping objects



-------------- Example 1 --------------

New-OSCustomizationNicMapping -OSCustomizationSpec $spec -IpMode UseStaticIP -IPAddress -SubnetMask -DefaultGateway -DnsServer

Creates a new NIC mapping for the OS customization spec stored in $spec.

Copyright © VMware, Inc. All rights reserved.