PowerCLI Reference

Set-OSCustomizationNicMapping

Synopsis

This cmdlet modifies the provided OS customization NIC mappings.

Syntax

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

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

Related Commands

Online Version
Get-OSCustomizationNicMapping
New-OSCustomizationNicMapping
Remove-OSCustomizationNicMapping

Detailed Description

This cmdlet modifies the provided OS customization NIC mappings. If the parent spec of the provided NIC mapping is a server-side spec, it is updated on the server. If the parent spec is client-side, the reference that is kept in the memory is updated, but the variable that is passed to the cmdlet is not modified.

Parameters

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
NetworkAdapterMacStringSpecifies the MAC address of the network adapter to which you want to map the OS customization specification.falseFalse
OSCustomizationNicMappingOSCustomizationNicMapping[]Specifies the OS customization NIC mapping you want to configure.trueTrue (ByValue)
PositionInt32Specifies the position of the mapping you want to modify.falseFalse
ServerVIServer[]Specifies the vCenter Server systems 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
VCApplicationArgumentStringSpecifies a new argument you want to pass to VCApplication in order 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

Zero or more modified OSCustomizationNicMapping objects

Notes

Examples

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

Get-OSCustomizationSpec Spec | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -IpAddress 10.0.0.2

Modifies the IP address of the specified NIC mapping that uses static IP mode.

-------------------------- Example 2 --------------------------

Get-OSCustomizationSpec Spec | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -VcApplicationArgument "subnet2"

Modifies the VCApplication argument of the specified NIC mapping.

-------------------------- Example 3 --------------------------

Get-OSCustomizationSpec Spec | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -IpMode UseStaticIp -IpAddress 10.10.0.1 -SubnetMask 255.255.255.0 -DefaultGateway 10.10.0.1 -AlternateGateway 10.10.0.1 -Dns 10.10.150.1 -PrimaryWins 10.10.150.2

Modifies the attributes of a NIC mapping.

-------------------------- Example 4 --------------------------

Set-OSCustomizationNicMapping -OSCustomizationNicMapping $nicMapping1, $nicMapping2 -IPMode UseVCApplication -VcApplicationArgument "subnet2"

Modifies the specified NIC mapping using VCApplication.


Copyright © VMware, Inc. All rights reserved.