New-RASTemplate

NAME

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)] [-CloneMethod {FullClone | LinkedClone}] [ComputerName (string)] [-DatastoreIDs (string[])] [-DatastoreSource {Template | Selection}] [Description (string)] [DeviceName (string)] [DomainOrgUnit (string)] [FolderId (string)] [FolderName (string)] [HWGPU (bool)] [-ImagePrepTool {SysPrep | RASPrep}] [InstanceType (string)] [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)]

New-RASTemplate [ProviderId]** (uint) [AzureId] (string) -Administrator (string) -AdminPassword (SecureString) -AzureGallery (SwitchParameter) -Domain (string) -DomainPassword (SecureString) -LocalAdminPassword (SecureString) -LocalAdminUsername (string) -Location (string) -Name (string) -ObjType {RDSTemplate | VDITemplate | AVDTemplate} -OSDiskType {StandardHDD | StandardSSD | PremiumSSD} -ResourceGroup (string) -SubnetName (string) -TemplateType {SingleSession | MultiSession} -VirtualNetworkName (string) [Address (string)] [-CloneMethod {FullClone | LinkedClone}] [ComputerName (string)] [-DatastoreIDs (string[])] [-DatastoreSource {Template | Selection}] [Description (string)] [DeviceName (string)] [DomainOrgUnit (string)] [FolderId (string)] [FolderName (string)] [GalleryName (string)] [HWGPU (bool)] [-ImagePrepTool {SysPrep | RASPrep}] [InstanceType (string)] [MaximumIOPS (ulong)] [NativePoolId (string)] [NativePoolName (string)] [NoAllowRemoteConnections (SwitchParameter)] [NoApplyParallelsPowerPlan (SwitchParameter)] [NoFireWallRules (SwitchParameter)] [NoRestart (SwitchParameter)] [Organization (string)] [OwnerName (string)] [Password (SecureString)] [PhysicalHostId (string)] [PhysicalHostName (string)] [SiteId (uint)] [Size (uint)] [SubFolderName (string)] [SubnetID (string)] [SubnetMask (string)] [Throughput (ulong)] [Username (string)] [UseSeperateNetworkInterface (bool)] [VirtualNetworkID (string)] [VMSize (string)] [-VolumeType {gp2 | gp3 | io1 | io2 | standard}] [(CommonParameters)]

New-RASTemplate [ProviderId]** (uint) [VMId] (string) -Administrator (string) -AdminPassword (SecureString) -Domain (string) -DomainPassword (SecureString) -ObjType {RDSTemplate | VDITemplate | AVDTemplate} [Address (string)] [-CloneMethod {FullClone | LinkedClone}] [ComputerName (string)] [-DatastoreIDs (string[])] [-DatastoreSource {Template | Selection}] [Description (string)] [DeviceName (string)] [DomainOrgUnit (string)] [FolderId (string)] [FolderName (string)] [HWGPU (bool)] [-ImagePrepTool {SysPrep | RASPrep}] [InstanceType (string)] [MaximumIOPS (ulong)] [Name (string)] [NativePoolId (string)] [NativePoolName (string)] [NoAllowRemoteConnections (SwitchParameter)] [NoApplyParallelsPowerPlan (SwitchParameter)] [NoDesktopExperience (SwitchParameter)] [NoFireWallRules (SwitchParameter)] [NoRestart (SwitchParameter)] [NoTerminalServices (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)] [-TemplateType {SingleSession | MultiSession}] [Throughput (ulong)] [Username (string)] [UseSeperateNetworkInterface (bool)] [VirtualNetworkID (string)] [VirtualNetworkName (string)] [VMSize (string)] [-VolumeType {gp2 | gp3 | io1 | io2 | standard}] [(CommonParameters)]

New-RASTemplate [-InputObject]** (VM) -Administrator (string) -AdminPassword (SecureString) -Domain (string) -DomainPassword (SecureString) -ObjType {RDSTemplate | VDITemplate | AVDTemplate} [Address (string)] [-CloneMethod {FullClone | LinkedClone}] [ComputerName (string)] [-DatastoreIDs (string[])] [-DatastoreSource {Template | Selection}] [Description (string)] [DeviceName (string)] [DomainOrgUnit (string)] [FolderId (string)] [FolderName (string)] [HWGPU (bool)] [-ImagePrepTool {SysPrep | RASPrep}] [InstanceType (string)] [MaximumIOPS (ulong)] [Name (string)] [NativePoolId (string)] [NativePoolName (string)] [NoAllowRemoteConnections (SwitchParameter)] [NoApplyParallelsPowerPlan (SwitchParameter)] [NoDesktopExperience (SwitchParameter)] [NoFireWallRules (SwitchParameter)] [NoRestart (SwitchParameter)] [NoTerminalServices (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)] [-TemplateType {SingleSession | MultiSession}] [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.

PARAMETERS

ProviderId (uint)

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

        Required?                    true

        Position?                    0

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false

VMId (string)

The ID of the source VM.

        Required?                    true

        Position?                    1

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

InputObject (VM)

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.

        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       true (ByValue)

        Accept wildcard characters?  false

ObjType (TemplateObjType)

Template object type.

Possible values: RDSTemplate, VDITemplate, AVDTemplate

        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false

Name (string)

RAS Template Name.

        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

SiteId (uint)

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.

        Required?                    false

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false

Description (string)

RAS Template Description.

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

TemplateType (HostSessionType)

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

Possible values: SingleSession, MultiSession

        Required?                    true

        Position?                    named

        Default value                MultiSession

        Accept pipeline input?       false

        Accept wildcard characters?  false

CloneMethod (CloneMethod)

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

Possible values: FullClone, LinkedClone

        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.

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.

        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

NoFireWallRules (SwitchParameter)

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.

        Required?                    false

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false

NoAllowRemoteConnections (SwitchParameter)

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

If this parameter is omitted, remote connections are enabled.

        Required?                    false

        Position?                    named

        Default value                True

        Accept pipeline input?       false

        Accept wildcard characters?  false

NoApplyParallelsPowerPlan (SwitchParameter)

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

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

        Required?                    false

        Position?                    named

        Default value                True

        Accept pipeline input?       false

        Accept wildcard characters?  false

FolderName (string)

Folder name where desktop VMs will be created.

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

FolderId (string)

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

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

SubFolderName (string)

Subfolder name where desktop VMs will be created.

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

NativePoolId (string)

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

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

NativePoolName (string)

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

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

HWGPU (bool)

Enable hardware acceleration graphics licensing support.

        Required?                    false

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false

PhysicalHostId (string)

The ID of a physical host where desktop 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 desktop VMs will be created.

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

UseSeperateNetworkInterface (bool)

Use a separate network interface for LAN access.

        Required?                    false

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false

Address (string)

The address of the network interface.

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

SubnetMask (string)

The subnet mask of the network interface.

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

InstanceType (string)

Instance type.

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

DeviceName (string)

Device name.

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

VolumeType (VolumeType)

Volume type.

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

        Required?                    false

        Position?                    named

        Default value                gp2

        Accept pipeline input?       false

        Accept wildcard characters?  false

Size (uint)

Size (GiB).

        Required?                    false

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false

MaximumIOPS (ulong)

Maximum IOPS.

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

Throughput (ulong)

Throughput (MB/s).

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

ResourceGroup (string)

Resource group.

Available to VDI/RDS Templates Azure and AVD Templates.

        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

VMSize (string)

VM size.

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

        Required?                    false

        Position?                    named

        Default value                Standard_B2s

        Accept pipeline input?       false

        Accept wildcard characters?  false

OSDiskType (DiskType)

OS disk type.

Available to VDI/RDS Templates Azure and AVD Templates.

Possible values: StandardHDD, StandardSSD, PremiumSSD

        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false

VirtualNetworkID (string)

Virtual network ID.

Available to VDI/RDS Templates Azure and AVD Templates.

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

VirtualNetworkName (string)

Virtual network name.

Available to VDI/RDS Templates Azure and AVD Templates.

        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

SubnetID (string)

Subnet ID.

Available to VDI/RDS Templates Azure and AVD Templates.

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

SubnetName (string)

Subnet name.

Available to VDI/RDS Templates Azure and AVD Templates.

        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

DatastoreSource

(DatastoreSourceType) Datastore Source.

Available to VDI/RDS Templates VCenter.

Possible values: Template, Selection

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

DatastoreIDs (string[])

Datastore IDs.

Available to VDI/RDS Templates VCenter.

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

ImagePrepTool (ImagePrepTool)

Image preparation tool: RASPrep (default) or SysPrep.

Possible values: SysPrep, RASPrep

        Required?                    false

        Position?                    named

        Default value                RASPrep

        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

OwnerName (string)

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

        Required?                    false

        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?                    false

        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

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

Administrator (string)

The administrator of the domain specified in the JoinDomain parameter.

        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

AdminPassword (SecureString)

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

        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

DomainOrgUnit (string)

Domain Organization unit

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

NoDesktopExperience (SwitchParameter)

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.

        Required?                    false

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false

NoTerminalServices (SwitchParameter)

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.

        Required?                    false

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false

AzureId (string)

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

        Required?                    true

        Position?                    1

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

CustomHost (SwitchParameter)

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

        Required?                    true

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false

AzureGallery (SwitchParameter)

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

        Required?                    true

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false

GalleryName (string)

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

        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

Location (string)

The AVD Location of the AVD Gallery Image.

        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

LocalAdminUsername (string)

The local admin username.

        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false

LocalAdminPassword (SecureString)

The local admin password.

        Required?                    true

        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

Template

EXAMPLES

**---------- EXAMPLE 1 ----------

New-RASTemplate -ObjType VDITemplate -Name "My Template" -ProviderId 1 Domain "my domain" -DomainPassword $password -Administrator "admin" -AdminPassword $password

Creates an VDI Template with the specified data. **---------- EXAMPLE 2 ----------

New-RASTemplate -ObjType AVDTemplate -Name "My Template" -AzureGallery -ProviderId 1 -Domain "my domain" -DomainPassword $password -Administrator "admin" -AdminPassword $password -TemplateType SingleSession -OSDiskType StandardSSD -ResourceGroup "my Resource Group" -location "westeurope" -VirtualNetworkName "vnet" -SubnetName "subnet" -LocalAdminUsername "admin" -LocalAdminPassword $password -AzureId "/subscriptions/j383475632498-93h5-034f-le09-768ds6f78987sd3/resourceGroups/myResourceGourp/providers/Microsoft.Compute/galleries/myGallery/images/myImage"

Creates an AVD Template based on the specified AVD Gallery Image. **---------- EXAMPLE 3 ----------

New-RASTemplate -ObjType AVDTemplate -Name "My Template" -CustomHost -ProviderId 1 -Domain "my domain" -DomainPassword $password -Administrator "admin" -AdminPassword $password -AzureId "/subscriptions/j383475632498-93h5-034f-le09-768ds6f78987sd3/resourceGroups/myResourceGourp/providers/Microsoft.Compute/virtualMachines/myMachine"

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

Last updated