Previous Topic: dpmhyperv SetClustered Command--Add or Remove a VM from a ClusterNext Topic: dpmhyperv SetVMDisk Command--Assign a Drive or Disk to a Drive Controller


dpmhyperv SetSysPrepProperties Command--Sets Sysprep Properties

The dpmhyperv SetSysPrepProperties command lets you set sysprep properties on a Hyper-V server.

This command has the following format:

dpmhyperv SetSysPrepProperties 
[-ws_user username] 
[-ws_password password] 
[-ws_encrypted_password] 
-hypervHost hostname 
-vm VM_name|-vmguid vm_ID 
[-jobRef job_reference] 
[-computerName computer_name] 
[-ip4addr ip4_address] 
[-ip4dhcp] 
[-ip4dhcpint ip4dhcpint] 
[-ip4mask network_mask] 
[-ip4gw gateway_address] 
[-ip4metric ip_metric] 
[-ip4dns dnsserver_ip] 
[-disableAdmin] 
[-adminPass administrator_password] 
[-autoLogon autologon] 
[-duplicatorString duplicator_string] 
[-timezone timezone] 
[-productKey product_key] 
[-userName user_name] 
[-organization org_name] 
[-domain domain_name] 
[-domainAdmin domain_admin_login] 
[-domainAdminPass domain_admin_password] 
[-workgroup workgroup_name] 
[-adminUser admin_username] 
[-adminUserPass admin_password] 
[-adminGroup admin_groupname] 
[-custom custom] 
[-pre] 
[-post] 
[-locale iso639value]
-ws_user username

(Optional) Specifies the CA Virtual Assurance user name.

-ws_password password

(Optional) Specifies the CA Virtual Assurance user password.

-ws_encrypted_password

(Optional) Indicates whether the CA Virtual Assurance password is encrypted.

-hypervHost hostname

Specifies the name of the Hyper-V host.

-vm vm_name

Specifies the VM name.

-vmguid vm_ID

Specifies the unique GUID of the VM.

-jobRef job_reference

Specifies the job identifier.

-computerName computer_name

(Optional) Specifies the name of the computer.

-ip4addr ip4_address

(Optional) Specifies the static IPv4 address that you want to assign to the VM interface.

-ip4dhcp ip4dhcpInt

(Optional) Specifies the DHCP address.

-ip4mask network_mask

(Optional) Specifies the subnet mask that you want to assign to the VM. Use this option with the -ip4ddr option.

-ip4gw gateway_address

(Optional) Specifies the option to set the gateway for the VM. Use this option with the -ip4ddr option.

-ip4metric ip_metric

(Optional) Specifies the interface metric that you want to set for the VM. Use this option with the -ip4ddr option.

-ip4dns dnsserver_ip

(Optional) Specifies the DNS server for the VM. Use this option with the -ip4ddr option.

-disableAdmin

(Optional) Specifies the option to disable default administrator account for the VM. Support for this parameter requires a Windows image created using Sysprep tool. This option is invalid in the asynchronous mode.

-adminPass administrator_password

(Optional) Specifies the default administrator password for the VM.

-autoLogon autologon

(Optional) Specifies the option to set the number of accounts that automatically log in with the default administrator account after the Sysprep process completes.

-duplicatorString duplicate_string

(Optional) Specifies the name of the system duplicator to set in the VM registry.

-timeZone timezone

(Optional) Specifies the time zone used by the VM that are created using the template.

Default:
-1

-productKey product_key

(Optional) Specifies the Windows product activation key for the VM.

-userName User_name

(Optional) Specifies the user name of the Windows in the VM.

-organization org_name

(Optional) Specifies the user name of the Windows in the VM. This option is invalid in the asynchronous mode.

-domain domain_name

(Optional) Specifies the domain name of the VM.

-domainAdmin domain_admin_login

(Optional) Specifies the domain administrator login.

-domainAdminPass domain_admin_password

(Optional) Specifies the password for the domain administrator account. This option is invalid for the asynchronous mode.

-workgroup workgroup_name

(Optional) Specifies the workgroup of the VM. This option is invalid for the asynchronous mode.

-adminUser admin_username

(Optional) Specifies the user name that is the member of the default Administrators group.

-adminUserPass admin_password

(Optional) Specifies the password of the default Administrators group.

-custom custom

(Optional) Specifies the list of comma-separated custom commands that are executed at the end of the Sysprep process.

-pre

(Optional) Generates an event before the operation is complete.

-post

(Optional) Generates an event after the operation is complete.

-locale iso639value

(Optional) Specifies an IS0 639_3166 combination to override the default English output, for example, fr_FR for French. To use the locale of the command prompt, specify "native".

Example: Set Sysprep Properties on the Hyper-V Server

This example sets the sysprep properties on the host, "hserver."

dpmhyperv SetSysPrepProperties -hypervHost hserver -vm VM_05 -ip4addr 130.119.0.40 -ip4mask 255.255.0.0 -ip4gw 130.119.0.100