New-RASVDITemplate

NAME

New-RASVDITemplate

SYNOPSIS

Creates a RAS Template.

SYNTAX

New-RASVDITemplate [-ProviderId] <uint> [-VDIGuestId] <string> -Administrator <string> -AdminPassword <SecureString> -Domain <string> -DomainPassword <SecureString> -Organization <string> -OwnerName <string> [-CloneMethod <VDICloneMethod> {FullClone | LinkedClone}] [-ComputerName <string>] [-FolderId <string>] [-FolderName <string>] [-GuestNameFormat <string>] [-GuestsToCreate <uint>] [-ImagePrepTool <VDIImagePrepTool> {RASPrep | SysPrep}] [-MaxGuests <uint>] [-Name <string>] [-NativePoolId <string>] [-NativePoolName <string>] [-NoRestart <SwitchParameter>] [-Password <SecureString>] [-PhysicalHostId <string>] [-PhysicalHostName <string>] [-PreCreatedGuests <uint>] [-TargetOU <string>] [-TemplateType <VDITemplateType> {VDIDesktop | RDSH}] [-Username <string>] [<CommonParameters>]

New-RASVDITemplate [-InputObject] <VM> -Administrator <string> -AdminPassword <SecureString> -Domain <string> -DomainPassword <SecureString> -Organization <string> -OwnerName <string> [-CloneMethod <VDICloneMethod> {FullClone | LinkedClone}] [-ComputerName <string>] [-FolderId <string>] [-FolderName <string>] [-GuestNameFormat <string>] [-GuestsToCreate <uint>] [-ImagePrepTool <VDIImagePrepTool> {RASPrep | SysPrep}] [-MaxGuests <uint>] [-Name <string>] [-NativePoolId <string>] [-NativePoolName <string>] [-NoRestart <SwitchParameter>] [-Password <SecureString>] [-PhysicalHostId <string>] [-PhysicalHostName <string>] [-PreCreatedGuests <uint>] [-TargetOU <string>] [-TemplateType <VDITemplateType> {VDIDesktop | RDSH}] [-Username <string>] [<CommonParameters>]

DESCRIPTION

Creates a RAS Template and add it to a site.

PARAMETERS


-ProviderId <uint>
The ID of a Provider 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

-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

-Name <string>
RAS Template name. If not specified, the VDI Guest name will be used.

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

-TemplateType <VDITemplateType>
VDI Template Type: VDIDesktop or RDSH. Default: VDIDesktop.

Possible values: VDIDesktop, RDSH

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

-GuestNameFormat <string>
Guest VM name format. All guest VMs created from the template will have this name with %ID:N:S% replaced.

If not specified, the Guest Name Format would be VDIGuestName-%ID:3%.

        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

-Domain <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 administrator specified in the Domain 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

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

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

-NativePoolId <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

-NativePoolName <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 the DomainPassword parameter.

        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

VM

OUTPUTS

VDITemplate

EXAMPLES


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

New-RASVDITemplate -ProviderId 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-RASVDITemplate -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-RASVDIGuest -ProviderId 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