< Back

New-OSCustomizationNicMapping

Sun Jan 19, 2020 7:00 pm

NAME New-OSCustomizationNicMapping



SYNOPSIS

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





SYNTAX

New-OSCustomizationNicMapping [[-IpAddress] <String>] [[-SubnetMask] <String>] [[-DefaultGateway] <String>]

[[-Dns] <String[]>] [-AlternateGateway <String>] [-IpMode <OSCustomizationIPMode>] [-NetworkAdapterMac <String[]>]

-OSCustomizationSpec <OSCustomizationSpec> [-Server <VIServer[]>] [-VCApplicationArgument <String>] [-Wins

<String[]>] [-Confirm] [-WhatIf] [<CommonParameters>]



New-OSCustomizationNicMapping [[-IpAddress] <String>] [[-SubnetMask] <String>] [[-DefaultGateway] <String>]

[[-Dns] <String[]>] [-AlternateGateway <String>] [-IpMode <OSCustomizationIPMode>] -OSCustomizationSpec

<OSCustomizationSpec> [-Position <Int32[]>] [-Server <VIServer[]>] [-VCApplicationArgument <String>] [-Wins

<String[]>] [-Confirm] [-WhatIf] [<CommonParameters>]





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.





PARAMETERS

-AlternateGateway <String>

Specifies an alternate gateway.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DefaultGateway <String>

Specifies a default gateway.



Required? false

Position? 3

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Dns <String[]>

Specifies a DNS address. This parameter applies only to Windows operating systems.



Required? false

Position? 4

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IpAddress <String>

Specifies an IP address. Using this parameter automatically sets the IpMode parameter to UseStaticIp.



Required? false

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IpMode <OSCustomizationIPMode>

Specifies the IP configuration mode. The valid values are UseDhcp, PromptUser, UseVCApplication, and

UseStaticIP.



Required? false

Position? named

Default value UseDhcp

Accept pipeline input? False

Accept wildcard characters? false



-NetworkAdapterMac <String[]>

Specifies the MAC addresses of the network adapters to which you want to map the new OS customization

specifications.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-OSCustomizationSpec <OSCustomizationSpec>

Specifies the OS customization specification to which you want to add the NIC setting mapping. Passing

multiple values to this parameter is obsolete.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-Position <Int32[]>

Specifies the position of the NIC to which you want to map the OS customization specification.



Required? false

Position? named

Default value Last

Accept pipeline input? False

Accept wildcard characters? false



-Server <VIServer[]>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-SubnetMask <String>

Specifies a subnet mask.



Required? false

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-VCApplicationArgument <String>

Specifies an optional argument you want to pass to the vCenter Server to obtain an IP address.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Wins <String[]>

Specifies WINS servers. This parameter applies only to Windows operating systems.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-Confirm [<SwitchParameter>]

If 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.



Required? false

Position? named

Default value $true

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

The one or more newly created OSCustomizationNicMapping objects







NOTES









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



New-OSCustomizationNicMapping -OSCustomizationSpec $spec -IpMode UseStaticIP -IPAddress 10.0.0.1 -SubnetMask

255.255.255.0 -DefaultGateway 10.0.0.253 -DnsServer 10.0.0.253



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



RELATED LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... pping.html

Get-OSCustomizationNicMapping

Set-OSCustomizationNicMapping