Set-OSCustomizationSpec Command | Vmware PowerCLI Reference

Set-OSCustomizationSpec

This cmdlet modifies the specified OS customization specification. The specification to be updated is identified by one or both of the Name and Spec parameters. If a Windows specification is to be updated, one of the Domain and Workgroup parameters must be provided. If a Linux specification is to be updated, the Domain parameter must be provided.

Syntax

Set-OSCustomizationSpec
-OSCustomizationSpec < OSCustomizationSpec[] >
[-CustomizationScript < String > ]
[-Description < String > ]
[-DnsServer < String[] > ]
[-DnsSuffix < String[] > ]
[-Domain < String > ]
[-Name < String > ]
[-NamingPrefix < String > ]
[-NamingScheme < String > ]
[-NewSpec < OSCustomizationSpec > ]
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
OSCustomizationSpec OSCustomizationSpec[] named
  • pipeline
  • wildcards
Specifies the specification you want to modify.
optional CustomizationScript String named
Specifies a bash script that runs before and after the customization of the guest operating system. You can use this parameter only for Linux-based operating systems. Use the bash script itself and not the path to it.
optional Description String named
Provides a new description for the specification.
optional DnsServer String[] named
Specifies the DNS server. This parameter applies only to Linux operating systems.
optional DnsSuffix String[] named
Specifies the DNS suffix. This parameter applies only to Linux operating systems.
optional Domain String named
Specifies the domain name.
optional Name String named
Specifies a new name for the OS customization specification.
optional NamingPrefix String named
The behavior of this parameter is related to the customization scheme. If a Custom customization scheme is specified, NamingPrefix is an optional argument that is passed to the utility for this IP address. The value of this field is defined by the user in the script. If a Fixed customization scheme is specified, NamingPrefix should indicate the name of the virtual machine. If a Prefix customization scheme is set, NamingPrefix indicates the prefix to which a unique number is appended.
optional NamingScheme String named
Specifies the naming scheme for the virtual machine. The valid values are Custom, Fixed, Prefix, and Vm.
optional NewSpec OSCustomizationSpec named
  • wildcards
If no other parameters are provided, this parameter specifies a specification from which to retrieve information for the updated specification.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • wildcards
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 Type OSCustomizationSpecType named
Sets the type of the OS customization specification. The valid values are Persistent and NonPersistent.

Output

VMware.VimAutomation.ViCore.Types.V1.OSCustomization.OSCustomizationSpec

Examples

Example 1

Set-OSCustomizationSpec Spec -Description 'This is a test OS customization specification.'

Updates the description of the Spec OS customization specification.

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.