vSphere PowerCLI Reference



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

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
IpAddressStringSpecify an IP address. Using this parameter automatically sets the IpMode parameter to UseStaticIp.falsefalse
SubnetMaskStringSpecify a subnet mask.falsefalse
DefaultGatewayStringSpecify a default gateway.falsefalse
DnsString[]Specify a DNS address.falsefalse
AlternateGatewayStringSpecify 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$true
IpModeOSCustomizationIPModeSpecify the IP configuration mode. The valid values are UseDhcp, PromptUser, UseVCApplication, and UseStaticIP.falsefalseUseDhcp
NetworkAdapterMacString[]Specify the MAC addresses of the network adapters to which you want to map the new OS customization specifications.falsefalse
OSCustomizationSpecOSCustomizationSpec[]Specify the OS customization specification to which you want to add the Nic setting mapping.truetrue (ByValue)
PositionInt32[]Specify the position of the NIC to which you want to map the OS customization specification.falsefalselast
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
VCApplicationArgumentStringSpecify an optional argument you want to pass to the vCenter Server to obtain an IP address.falsefalse
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
WinsString[]Specify WINS servers.falsefalse

Return Type




-------------- 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 © 1998 - 2011 VMware, Inc. All rights reserved.