New-VDITemplate

NAME

New-VDITemplate

SYNOPSIS

Creates a RAS Template.

SYNTAX

New-VDITemplate [-VDIHostId] <uint> [-VDIGuestId] <string> -Administrator <string> -AdminPassword <SecureString> -DomainPassword <SecureString> -JoinDomain <string> -Organization <string> -OwnerName <string> [-CloneMethod <VDICloneMethod> {FullClone | LinkedClone}] [-ComputerName <string>] [-FolderId <string>] [-FolderNamePath <string>] [-GuestNamePrefix <string>] [-GuestsToCreate <uint>] [-ImagePrepTool <VDIImagePrepTool> {RASPrep | SysPrep}] [-MaxGuests <uint>] [-NoRestart <SwitchParameter>] [-Password <SecureString>] [-PhysicalHostId <string>] [-PhysicalHostName <string>] [-PoolId <string>] [-PoolName <string>] [-PreCreatedGuests <uint>] [-TargetOU <string>] [-TemplateName <string>] [-TemplateType <VDITemplateType> {VDIDesktop | RDSH}] [-Username <string>] [<CommonParameters>]

New-VDITemplate [-InputObject] <VM> -Administrator <string> -AdminPassword <SecureString> -DomainPassword <SecureString> -JoinDomain <string> -Organization <string> -OwnerName <string> [-CloneMethod <VDICloneMethod> {FullClone | LinkedClone}] [-ComputerName <string>] [-FolderId <string>] [-FolderNamePath <string>] [-GuestNamePrefix <string>] [-GuestsToCreate <uint>] [-ImagePrepTool <VDIImagePrepTool> {RASPrep | SysPrep}] [-MaxGuests <uint>] [-NoRestart <SwitchParameter>] [-Password <SecureString>] [-PhysicalHostId <string>] [-PhysicalHostName <string>] [-PoolId <string>] [-PoolName <string>] [-PreCreatedGuests <uint>] [-TargetOU <string>] [-TemplateName <string>] [-TemplateType <VDITemplateType> {VDIDesktop | RDSH}] [-Username <string>] [<CommonParameters>]

DESCRIPTION

The New-VDITemplate cmdlet is used to create a RAS Template and add it to a site.

PARAMETERS


-VDIHostId <uint>
The ID of a VDI Host on which the source guest VM resides.

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

-VDIGuestId <string>
The ID of the source guest VM.

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

-VMId <string>
The ID of the source guest VM.

This is an alias of the VDIGuestId parameter.

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

-InputObject <VM>
The guest VM to be converted to a RAS Template.

To obtain an object of type VDIGuest representing the VM, use the Get-VM or Get-VDIGuest cmdlet.

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

-TemplateName <string>
RAS Template name.

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

-TemplateType <VDITemplateType>
VDI Template Type: VDIDesktop (default) or RDSH

Possible values: VDIDesktop, RDSH

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

-GuestNamePrefix <string>
Guest VM name prefix. All guest VMs created from the template will have this name with %ID% added at the end.

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

-MaxGuests <uint>
The maximum number of guest VMs that can be created from the template.

Default: VDIDesktop = 20 | RDSH = 10.

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

-PreCreatedGuests <uint>
The number of pre-created guest VMs for the template.

Default: VDIDesktop = 3 | RDSH = 1.

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

-GuestsToCreate <uint>
The number of guest VMs that will be created after template creation process has finished. These guests are created only once.

Default: VDIDesktop = 3 | RDSH = 1.

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

-ImagePrepTool <VDIImagePrepTool>
Image preparation tool: RASPrep (default) or SysPrep

Possible values: RASPrep, SysPrep

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

-OwnerName <string>
A guest VM owner name (assigned to a VM by RASprep or Sysprep).

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

-Organization <string>
Organization name (assigned to a VM by RASprep or Sysprep).

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

-JoinDomain <string>
Domain or WorkGroup to join (assigned to a VM by RASprep or Sysprep).

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

-Administrator <string>
The Domain administrator of the domain specified in the -JoinDomian parameter.

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

-DomainAdmin <string>
The Domain administrator of the domain specified in the -JoinDomian parameter.

This is an alias of the Administrator parameter.

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

-DomainPassword <SecureString>
The password of the domain administrator specified in the -Administrator parameter.

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

-AdminPassword <SecureString>
The password of the administrator for the guest VM (assigned to a VM by RASprep or Sysprep).

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

-CloneMethod <VDICloneMethod>
Clone method: Full clone (default) or Linked clone

Possible values: FullClone, LinkedClone

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

-FolderId <string>
The ID of a folder where guest VMs will be created.

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

-FolderNamePath <string>
Folder name where guest VMs will be created.

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

-PoolId <string>
The ID of a native pool where guest VMs will be created.

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

-PoolName <string>
The name of a native pool where guest VMs will be created.

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

-PhysicalHostId <string>
The ID of a physical host where guest VMs will be created

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

-PhysicalHostName <string>
The name of a physical host where guest VMs will be created.

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

-TargetOU <string>
Target organization unit.

Uses the domain password set by -DomainPassword.

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

-Username <string>
An administrator account for push installing the RD Session Host agent on the server (Used only for RDSH Templates).

If this parameter is omitted, your RAS admin username (and password) will be used.

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

-Password <SecureString>
The password of the account specified in the -Username parameter (Used only for RDSH Templates).

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

-NoRestart <SwitchParameter>
Specifies NOT to restart the server after the RD Session Host agent is installed.

If this parameter is omitted, the server will be restarted if required.

This parameter applies ONLY for RDSH Templates.

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

-ComputerName <string>
The FQDN or IP address of the target VM.

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

<CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see 
        about_CommonParameters documentation. 

INPUTS

PSAdmin.VM

OUTPUTS

PSAdmin.VDITemplate

EXAMPLES


---------- EXAMPLE 1 ----------

New-VDITemplate -VDIHostId 1 -VDIGuestId 42312685-05c9-ca51-342d-b3943046edf1 -FolderNamePath "\Datacenter\John" -OwnerName John -Organization CompanyName -JoinDomain company.local -DomainPassword $SecureDomPass -Administrator administrator -AdminPassword $SecureAdminPass

Creates a new RAS Template with the supplied details.

---------- EXAMPLE 2 ----------

New-VDITemplate -InputObject $VDIGuestObj -FolderNamePath "\Datacenter\John" -OwnerName John -Organization CompanyName -JoinDomain company.local -DomainPassword $SecureDomPass -Administrator administrator -AdminPassword $SecureAdminPass

Creates a new RAS Template with the supplied details.

---------- EXAMPLE 3 ----------

Get-VDIGuest -VDIHostId 2 -Id 42311235-09c5-ca15-337d-b9723015edf0 | New-VDITemplate -FolderNamePath "\Datacenter\John" -OwnerName John -Organization CompanyName -JoinDomain company.local -DomainPassword $SecureDomPass -Administrator administrator -AdminPassword $SecureAdminPass

Creates a new RAS Template with the supplied details.

RELATED LINKS