powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Set-OSCustomizationNicMapping



NAME
Set-OSCustomizationNicMapping

SYNOPSIS
Modifies the provided OS customization NIC mappings.

SYNTAX
Set-OSCustomizationNicMapping -OSCustomizationNicMapping [-Position ] [-Server
] [-IpMode ] [-VCApplicationArgument ] [[-IpAddress] ] [[-Subne
tMask] ] [[-DefaultGateway] ] [-AlternateGateway ] [[-Dns] ] [-Wins ] [
-WhatIf] [-Confirm] []

Set-OSCustomizationNicMapping -OSCustomizationNicMapping [-NetworkAdapterMac
] [-Server ] [-IpMode ] [-VCApplicationArgument ] [[-IpAddress]
] [[-SubnetMask] ] [[-DefaultGateway] ] [-AlternateGateway ] [[-Dns] ] [-Wins ring[]>] [-WhatIf] [-Confirm] []


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


PARAMETERS
-OSCustomizationNicMapping
Specify the OS customization NIC mapping you want to configure.

Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-Position
Specify the position of the mapping you want to modify.

Required? false
Position? named
Default value last
Accept pipeline input? false
Accept wildcard characters? false

-Server
Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the co
mmand runs on the default servers. For more information about default servers, see the description of Connect-V
IServer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-IpMode
Specify 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

-VCApplicationArgument
Specify a new argument you want to pass to VCApplication in order to obtain an IP address.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-IpAddress
Specify an IP address. Using this parameter automatically sets the IpMode parameter to UseStaticIp.

Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-SubnetMask
Specify a subnet mask.

Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false

-DefaultGateway
Specify a default gateway.

Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false

-AlternateGateway
Specify an alternate gateway.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Dns
Specify a DNS address. This parameter applies only to Windows operating systems.

Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Wins
Specify WINS servers. This parameter applies only to Windows operating systems.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm
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

-NetworkAdapterMac
Specify the MAC address of the network adapter to which you want to map the OS customization specification.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
OSCustomizationNicMapping


NOTES




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

C:\PS>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 --------------

C:\PS>Get-OSCustomizationSpec Spec | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -VcApplicationAr
gument "subnet2"


Modifies the VCApplication argument of the specified NIC mapping.





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

C:\PS>Get-OSCustomizationSpec Spec | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -IpMode UseStati
cIp -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 --------------

C:\PS>Set-OSCustomizationNicMapping -OSCustomizationNicMapping $nicMapping1, $nicMapping2 -IPMode UseVCApplication
-VcApplicationArgument "subnet2"


Modifies the specified NIC mapping using VCApplication.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Set-OSCustomizationNicMapping.htm
l
Get-OSCustomizationNicMapping
New-OSCustomizationNicMapping
Remove-OSCustomizationNicMapping