Set-OSCustomizationNicMapping
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.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
OSCustomizationNicMapping | OSCustomizationNicMapping[] | named |
|
Specifies the OS customization NIC mapping you want to configure. |
optional | SubnetMask | String | 1 |
|
Specifies a subnet mask. |
optional | DefaultGateway | String | 2 |
|
Specifies a default gateway. |
optional | Dns | String[] | 3 |
|
Specifies a DNS address. This parameter applies only to Windows operating systems. |
optional | AlternateGateway | String | named |
|
Specifies an alternate gateway. |
optional | IpAddress | String | named |
|
Specifies an IP address. Using this parameter automatically sets the IpMode parameter to UseStaticIp. |
optional | IpMode | OSCustomizationIPMode | named |
|
Specifies the IP configuration mode. The valid values are UseDhcp, PromptUser, UseVCApplication, and UseStaticIP. |
optional | Ipv6Address | String | named |
|
Specifies an IPv6 address. |
optional | Ipv6AlternateGateway | String | named |
|
Specifies an alternate IPv6 gateway. |
optional | Ipv6Gateway | String | named |
|
Specifies the default IPv6 gateway. |
optional | Ipv6Mode | OSCustomizationIPMode | named |
|
Specifies the IPv6 configuration mode. The valid values are UseDhcp, PromptUser, UseVCApplication, UseStaticIP, UseStatelessIpv6 and UseAutoIpv6. |
optional | Ipv6Prefix | Int32 | named |
|
Specifies the IPv6 prefix. |
optional | Ipv6VcApplicationArgument | String | named |
|
Specifies a new argument to pass to a vCenter Server application to obtain an IPv6 address. |
optional | NetworkAdapterMac | String | named |
|
Specifies the MAC address of the network adapter to which you want to map the OS customization specification. |
optional | ProgressAction | ActionPreference | named |
|
|
optional | Server | VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null 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. |
optional | VCApplicationArgument | String | named |
|
Specifies a new argument you want to pass to VCApplication in order to obtain an IP address. |
optional | Wins | String[] | named |
|
Specifies WINS servers. This parameter applies only to Windows operating systems. |
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
OSCustomizationNicMapping | OSCustomizationNicMapping[] | named |
|
Specifies the OS customization NIC mapping you want to configure. |
optional | SubnetMask | String | 1 |
|
Specifies a subnet mask. |
optional | DefaultGateway | String | 2 |
|
Specifies a default gateway. |
optional | Dns | String[] | 3 |
|
Specifies a DNS address. This parameter applies only to Windows operating systems. |
optional | AlternateGateway | String | named |
|
Specifies an alternate gateway. |
optional | IpAddress | String | named |
|
Specifies an IP address. Using this parameter automatically sets the IpMode parameter to UseStaticIp. |
optional | IpMode | OSCustomizationIPMode | named |
|
Specifies the IP configuration mode. The valid values are UseDhcp, PromptUser, UseVCApplication, and UseStaticIP. |
optional | Ipv6Address | String | named |
|
Specifies an IPv6 address. |
optional | Ipv6AlternateGateway | String | named |
|
Specifies an alternate IPv6 gateway. |
optional | Ipv6Gateway | String | named |
|
Specifies the default IPv6 gateway. |
optional | Ipv6Mode | OSCustomizationIPMode | named |
|
Specifies the IPv6 configuration mode. The valid values are UseDhcp, PromptUser, UseVCApplication, UseStaticIP, UseStatelessIpv6 and UseAutoIpv6. |
optional | Ipv6Prefix | Int32 | named |
|
Specifies the IPv6 prefix. |
optional | Ipv6VcApplicationArgument | String | named |
|
Specifies a new argument to pass to a vCenter Server application to obtain an IPv6 address. |
optional | Position | Int32 | named |
|
Specifies the position of the mapping you want to modify. |
optional | ProgressAction | ActionPreference | named |
|
|
optional | Server | VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null 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. |
optional | VCApplicationArgument | String | named |
|
Specifies a new argument you want to pass to VCApplication in order to obtain an IP address. |
optional | Wins | String[] | named |
|
Specifies WINS servers. This parameter applies only to Windows operating systems. |
Output
VMware.VimAutomation.ViCore.Types.V1.OSCustomization.OSCustomizationNicMappingExamples
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.
Related Commands
OSCustomizationNicMapping
This cmdlet retrieves the configured NIC setting mappings for the specified OS customization specification.
This cmdlet adds NIC settings mappings to the specified OS customization specifications.
This cmdlet removes the specified OS customization NIC mappings.
This cmdlet modifies the provided OS customization NIC mappings.
OSCustomizationSpec
This cmdlet retrieves the OS customization specifications available on a vCenter Server system.
This cmdlet creates a new OS customization specification.
This cmdlet removes the specified OS customization specifications.
This cmdlet modifies the specified OS customization specification.