![]() NAME New-Template SYNOPSIS Creates a new virtual machine template. SYNTAX New-Template [-VM] -WhatIf] [-Confirm] [ New-Template [[-Name] rmat New-Template [[-Name] DESCRIPTION Creates a new template based on the specified virtual machine. On VirtualCenter 2.0 and VirtualCenter 2.5, the virt ual machine must be powered off before creating a template based on it. On VirtualCenter 2.5 Update 2, the virtual machine can be powered off or powered on, but not suspended. You can also create a new template by cloning an exist ing one. PARAMETERS -VM Specify the virtual machine from which you want to create the new template. Required? true Position? 2 Default value Accept pipeline input? true (ByValue) Accept wildcard characters? true -Name Specify a name for the new template. Required? true Position? 1 Default value Accept pipeline input? false Accept wildcard characters? false -Location Specify the location where you want to place the new template. Required? true Position? 3 Default value Accept pipeline input? true (ByValue) Accept wildcard characters? true -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 -RunAsync Indicate that the command returns immediately without waiting for the task to complete. In this mode, the outpu t of the cmdlet is a Task object. For more information about the -RunAsync parameter run " help About_RunAsync" in the vSphere PowerCLI console. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -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 -VMHost Specify the host where you want to create the new template. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? true -Datastore Specify a datastore where you want to store the new template. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? true -DiskStorageFormat Specify the disk storage format of the new template. The valid values are Thin and Thick. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -Template Specify a template you want to clone. Required? false Position? named Default value Accept pipeline input? true (ByValue) Accept wildcard characters? true -TemplateFilePath Specify the datastore path to the file you want to use to to register the new template. Required? true Position? 2 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 Template NOTES -------------- Example 1 -------------- C:\PS>New-Template -VM VM -Name Template -Location Datacenter Creates a template named Template from the VM virtual machine on the Datacenter datacenter. -------------- Example 2 -------------- C:\PS>New-Template -Name Template -TemplateFilePath "[Storage1] templatefolder/template.vmtx" -Location VMFolder -V MHost Host Register a template to an inventory folder by using the specified template file. RELATED LINKS Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/New-Template.html Get-Template Remove-Template Set-Template |