For the complete documentation index, see llms.txt. This page is also available as Markdown.

New-RASTemplate

SYNOPSIS

Creates a Template.

SYNTAX

New-RASTemplate [-ProviderId] <uint> [-AzureId] <string> -Administrator <string>
 -AdminPassword <SecureString> -CustomHost <SwitchParameter> -Domain <string>
 -DomainPassword <SecureString> -ObjType {RDSTemplate | VDITemplate | AVDTemplate}
 -TemplateType {SingleSession | MultiSession} [-Address <string>]
 [-AvailabilityOptions {NoInfrastructure | AvailabilitySet | AvailabilityZone}]
 [-AvailabilityPreferredZone {Zone1 | Zone2 | Zone3}] [-CloneMethod {FullClone | LinkedClone}]
 [-ClusterId <string>] [-ClusterName <string>] [-ComputerName <string>] [-DatastoreIDs <string[]>]
 [-DatastoreSource {Template | Selection}] [-Description <string>] [-DeviceName <string>]
 [-DomainOrgUnit <string>] [-EnableSecureBoot <bool>] [-EnableVTPM <bool>] [-FolderId <string>]
 [-FolderName <string>] [-HibernationEnabled <bool>] [-HWGPU <bool>]
 [-ImagePrepTool {SysPrep | RASPrep}] [-InstanceType <string>] [-IntegrityMonitoring <bool>]
 [-MaximumIOPS <ulong>] [-Name <string>] [-NativePoolId <string>] [-NativePoolName <string>]
 [-NoAllowRemoteConnections <SwitchParameter>] [-NoApplyParallelsPowerPlan <SwitchParameter>]
 [-NoFireWallRules <SwitchParameter>] [-NoRestart <SwitchParameter>] [-Organization <string>]
 [-OSDiskType {StandardHDD | StandardSSD | PremiumSSD}] [-OwnerName <string>]
 [-Password <SecureString>] [-PhysicalHostId <string>] [-PhysicalHostName <string>]
 [-ResourceGroup <string>] [-SiteId <uint>] [-Size <uint>] [-SubFolderName <string>]
 [-SubnetId <string>] [-SubnetMask <string>] [-SubnetName <string>] [-Throughput <ulong>]
 [-Username <string>] [-UseSeperateNetworkInterface <bool>] [-VirtualNetworkID <string>]
 [-VirtualNetworkName <string>] [-VMSize <string>] [-VolumeType {gp2 | gp3 | io1 | io2 | standard}]
 [<CommonParameters>]

DESCRIPTION

The cmdlet creates a Template.

EXAMPLES

Example 1

Creates an VDI Template with the specified data.

Example 2

Creates an AVD Template based on the specified AVD Gallery Image.

Example 3

Creates an AVD Template based on the specified AVD Custom Host.

PARAMETERS

-ProviderId

The ID of a Provider on which the source desktop VM resides.

-VMId

The ID of the source VM.

-InputObject

The desktop VM to be converted to a RAS Template.

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

Type reference: VM

-ObjType

Template object type.

Possible values: RDSTemplate, VDITemplate, AVDTemplate

Type reference: TemplateObjType

-Name

RAS Template Name.

-SiteId

The site ID in which to create the RAS Template info.

If the parameter is omitted, the site ID of the Licensing Server will be used.

-Description

RAS Template Description.

-TemplateType

Template type: Single Session (VDI / AVD) or Multi Session (RDS / AVD (default))

Possible values: SingleSession, MultiSession

Type reference: HostSessionType

-CloneMethod

Clone method: Full clone (default) or Linked clone (Not supported for RDS/VDI - Azure/AWS).

Possible values: FullClone, LinkedClone

Type reference: CloneMethod

-Username

An administrator account for push installing the RD Session Host agent on the server.

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

-Password

The password of the account specified in the Username parameter.

-NoRestart

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.

-NoFireWallRules

Specifies not to add firewall rules to allow the RAS Guest Agent to communicate.

If this parameter is omitted, the firewall rules will not be added.

-NoAllowRemoteConnections

Specifies not to enable allow remote connection when the RAS Guest Agent is installed.

If this parameter is omitted, remote connections are enabled.

-NoApplyParallelsPowerPlan

Specifies not to apply Parallels power plan when the RAS Guest Agent is installed.

If this parameter is omitted, the plan will be applied.

-FolderName

Folder name where desktop VMs will be created.

-FolderId

The ID of a folder where desktop VMs will be created.

-SubFolderName

Subfolder name where desktop VMs will be created.

-NativePoolId

The ID of the native pool where desktop VMs will be created.

-NativePoolName

The name of the native pool where desktop VMs will be created.

-HWGPU

Enable hardware acceleration graphics licensing support.

-PhysicalHostId

The ID of a physical host where desktop VMs will be created.

-PhysicalHostName

The name of a physical host where desktop VMs will be created.

-UseSeperateNetworkInterface

Use a separate network interface for LAN access.

-Address

The address of the network interface.

-SubnetMask

The subnet mask of the network interface.

-InstanceType

Instance type.

-DeviceName

Device name.

-VolumeType

Volume type.

Possible values: gp2, gp3, io1, io2, standard

Type reference: VolumeType

-Size

Size (GiB).

-MaximumIOPS

Maximum IOPS.

-Throughput

Throughput (MB/s).

-ResourceGroup

Resource group.

Available to VDI/RDS Templates Azure and AVD Templates.

-VMSize

VM size.

Available to VDI/RDS Templates Azure and AVD Templates. Default: Standard_B2s

-OSDiskType

OS disk type.

Available to VDI/RDS Templates Azure and AVD Templates.

Possible values: StandardHDD, StandardSSD, PremiumSSD

Type reference: DiskType

-VirtualNetworkID

Virtual network ID.

Available to VDI/RDS Templates Azure and AVD Templates.

-VirtualNetworkName

Virtual network name.

Available to VDI/RDS Templates Azure and AVD Templates.

-AvailabilityOptions

Availability Options.

Possible values: NoInfrastructure, AvailabilitySet, AvailabilityZone

Type reference: HighAvailability

-AvailabilityPreferredZone

Availability Preferred Zone.

Acceptable values: Zone 1, Zone 2, Zone 3

Possible values: Zone1, Zone2, Zone3

Type reference: PreferredZone

-SubnetId

Subnet Id.

Available to VDI/RDS Templates Azure/NutanixPC and AVD Templates.

-SubnetName

Subnet name.

Available to VDI/RDS Templates Azure/NutanixPC and AVD Templates.

-ClusterName

Cluster name where desktop VMs will be created.

Available to VDI/RDS Templates NutanixPC.

-ClusterId

The ID of a cluster where desktop VMs will be created.

Available to VDI/RDS Templates NutanixPC.

-DatastoreSource

Datastore Source.

Available to VDI/RDS Templates VCenter.

Possible values: Template, Selection

Type reference: DatastoreSourceType

-DatastoreIDs

Datastore IDs.

Available to VDI/RDS Templates VCenter.

-SecurityType

Security Type.

Available to AVD Azure Gallery Templates.

Possible values: TrustedLaunch, Standard

Type reference: SecurityType

-EnableSecureBoot

Specifies if 'Enable secure boot' option is enabled or disabled.

Available to VDI/RDS Azure/AVD Templates, when security type is Trusted Launch.

-EnableVTPM

Specifies if 'Enable vTPM' option is enabled or disabled.

Available to VDI/RDS Azure/AVD Templates, when security type is Trusted Launch.

-IntegrityMonitoring

Specifies if 'Integrity monitoring' option is enabled or disabled.

Available to VDI/RDS Azure/AVD Templates, when security type is Trusted Launch.

-HibernationEnabled

Specifies if 'Hibernation' option is enabled or disabled.

Available to Azure/AVD Templates.

-ImagePrepTool

Image preparation tool: RASPrep (default) or SysPrep.

Possible values: SysPrep, RASPrep

Type reference: ImagePrepTool

-ComputerName

The FQDN or IP address of the target VM.

-OwnerName

A desktop VM owner name (assigned to a VM by RASprep or Sysprep).

-Organization

Organization name (assigned to a VM by RASprep or Sysprep).

-Domain

Domain or WorkGroup to join (assigned to a VM by RASprep or Sysprep).

-DomainPassword

The password of the domain administrator specified in the Administrator parameter.

-Administrator

The administrator of the domain specified in the JoinDomain parameter.

-AdminPassword

The password of the administrator for the desktop VM (assigned to a VM by RASprep or Sysprep).

-DomainOrgUnit

Domain Organization unit

-NoDesktopExperience

Specifies not to install the Desktop Experience after the RD Session Host agent is installed.

If this parameter is omitted, the Desktop Experience is installed.

-NoTerminalServices

Specifies not to install the Terminal Services role after the RD Session Host agent is installed.

If this parameter is omitted, the Terminal Services role will be installed.

-AzureId

The Azure ID of the AVD Custom Host or AVD Gallery Image.

-CustomHost

Specifies that the AVD Template will use an AVD Custom Host.

-AzureGallery

Specifies that the AVD Template will use an AVD Gallery Image.

-GalleryName

The name of the AVD Gallery that contains the AVD Gallery Image.

-Location

The AVD Location of the AVD Gallery Image.

-LocalAdminUsername

The local admin username.

-LocalAdminPassword

The local admin password.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

VM

OUTPUTS

Template

Last updated