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

-OSCustomizationSpec  <OSCustomizationSpec[]>
[-Description  <String>]
[-DnsServer  <String[]>]
[-DnsSuffix  <String[]>]
[-Domain  <String>]
[-Name  <String>]
[-NamingPrefix  <String>]
[-NamingScheme  <String>]
[-NewSpec  <OSCustomizationSpec>]
[-Server  <VIServer[]>]
[-Type  <OSCustomizationSpecType>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
OSCustomizationSpec
OSCustomizationSpec[] named
  • wildcards
  • pipeline
  • Specifies the specification you want to modify.
    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
    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.

    -OSCustomizationSpec  <OSCustomizationSpec[]>
    [-AdminPassword  <String>]
    [-AutoLogonCount  <Int32>]
    [-ChangeSID  <Boolean>]
    [-DeleteAccounts  <Boolean>]
    [-Description  <String>]
    [-DnsServer  <String[]>]
    [-DnsSuffix  <String[]>]
    [-Domain  <String>]
    [-DomainCredentials  <PSCredential>]
    [-DomainPassword  <String>]
    [-DomainUsername  <String>]
    [-FullName  <String>]
    [-GuiRunOnce  <String[]>]
    [-LicenseMaxConnections  <Int32>]
    [-LicenseMode  <LicenseMode>]
    [-Name  <String>]
    [-NamingPrefix  <String>]
    [-NamingScheme  <String>]
    [-NewSpec  <OSCustomizationSpec>]
    [-OrgName  <String>]
    [-ProductKey  <String>]
    [-Server  <VIServer[]>]
    [-TimeZone  <String>]
    [-Type  <OSCustomizationSpecType>]
    [-Workgroup  <String>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    required
    OSCustomizationSpec
    OSCustomizationSpec[] named
  • wildcards
  • pipeline
  • Specifies the specification you want to modify.
    optional
    AdminPassword
    String named Specifies the new OS administrator's password. This parameter applies only to Windows operating systems.
    optional
    AutoLogonCount
    Int32 named Specifies the number of times the virtual machine should automatically login as an administrator. The valid values are in the range between 0 and Int32.MaxValue. Specifying 0 disables auto log-on. This parameter applies only to Windows operating systems.
    optional
    ChangeSID
    Boolean named Indicates that the customization should modify the system security identifier (SID). This parameter applies only to Windows operating systems.
    optional
    DeleteAccounts
    Boolean named Indicates that you want to delete all user accounts. This parameter applies only to Windows operating systems.
    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
    DomainCredentials
    PSCredential named Specifies credentials for authentication with the specified domain. This parameter applies only to Windows operating systems.
    optional
    DomainPassword
    String named Specifies a password for authentication with the specified domain. This parameter applies only to Windows operating systems.
    optional
    DomainUsername
    String named Specifies a username for authentication with the specified domain. This parameter applies only to Windows operating systems.
    optional
    FullName
    String named Specifies the administrator's full name. This parameter applies only to Windows operating systems.
    optional
    GuiRunOnce
    String[] named Provides a list of commands to run after first user login. This parameter applies only to Windows operating systems.
    optional
    LicenseMaxConnections
    Int32 named Specifies the maximum connections for server license mode. Use this parameter only if the LicenseMode parameter is set to Perserver. This parameter applies only to Windows operating systems.
    optional
    LicenseMode
    LicenseMode named Specifies the license mode of the Windows 2000/2003 guest operating system. The valid values are Perseat, Perserver, and NotSpecified. If Perserver is set, use the LicenseMaxConnection parameter to define the maximum number of connections. This parameter applies only to Windows operating systems.
    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
    OrgName
    String named Specifies the name of the organization to which the administrator belongs.
    optional
    ProductKey
    String named Specifies the MS product key. If the guest OS version is earlier than Vista, this parameter is required in order to make the customization unattended. For Windows Vista and later, the OS customization is unattended no matter if the ProductKey parameter is set.
    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
    TimeZone
    String named Specifies the name or ID of the time zone for a Windows guest OS only. Using wildcards is supported. The following time zones are available:
    optional
    Type
    OSCustomizationSpecType named Sets the type of the OS customization specification. The valid values are Persistent and NonPersistent.
    optional
    Workgroup
    String named Specifies the workgroup. This parameter applies only to Windows operating systems.

    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

    Feedback

    Was this page helpful?