# New-RASAVDHostPool.md

## NAME

New-RASAVDHostPool

## SYNOPSIS

The cmdlet creates an object of type Azure Virtual Desktop Host Pool.

## SYNTAX

**New-RASAVDHostPool** \[\[-[SiteId](#siteid-string)] *(uint)*] -[AzureId](#azureid-string) *(string)* -[HostName](#hostname-string) *(string)* -[WorkspaceId](#workspaceid-string) *(uint)* \[[AutoScaleEnabled](#autoscaleenabled-string) *(bool)*] \[-[DefaultPowerState](#DefaultPowerState) {PoweredOn | PoweredOff | Suspended}] \[[DrainRemainsBelowSec](#drainremainsbelowsec-string) *(uint)*] \[[Duration](#duration-string) *(uint)*] \[[Enabled](#enabled-string) *(bool)*] \[[HostsToCreate](#hoststocreate-string) *(uint)*] \[[MaxHosts](#maxhosts-string) *(uint)*] \[[MaxServersFromTemplate](#maxserversfromtemplate-string) *(uint)*] \[[MinServersFromTemplate](#minserversfromtemplate-string) *(uint)*] \[[OverwriteSize](#overwritesize-string) *(bool)*] \[[PreCreatedHosts](#precreatedhosts-string) *(uint)*] \[[RemoveServersAfterDrainAndPowerOff](#removeserversafterdrainandpoweroff-string) *(bool)*] \[[ServersToAddPerRequest](#serverstoaddperrequest-string) *(uint)*] \[[TemplateId](#templateid-string) *(uint)*] \[[TemplateTagId](#templatetagid-string) *(uint)*] \[[TemplateVersionId](#templateversionid-string) *(uint)*] \[[ValidationEnvironment](#validationenvironment-string) *(bool)*] \[[VMSize](#vmsize-string) *(string)*] \[[WorkLoadDrain](#workloaddrain-string) *(uint)*] \[[WorkloadThreshold](#workloadthreshold-string) *(uint)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

**New-RASAVDHostPool** \[[Name](#name-string)] *(string)* \[\[-[SiteId](#siteid-string)] *(uint)*] -[LoadBalancerType](#LoadBalancerType) {BreadthFirst | DepthFirst | Persistent} -[Location](#location-string) *(string)* -[PoolType](#PoolType) {Pooled | Personal} -[ProvisioningType](#ProvisioningType) {Template | Standalone} -[PublishingType](#PublishingType) {RemoteApp | Desktop} -[ResourceGroup](#resourcegroup-string) *(string)* -[WorkspaceId](#workspaceid-string) *(uint)* \[[AutoScaleEnabled](#autoscaleenabled-string) *(bool)*] \[-[DefaultPowerState](#DefaultPowerState) {PoweredOn | PoweredOff | Suspended}] \[[Description](#description-string) *(string)*] \[[DrainRemainsBelowSec](#drainremainsbelowsec-string) *(uint)*] \[[Duration](#duration-string) *(uint)*] \[[Enabled](#enabled-string) *(bool)*] \[[FriendlyName](#friendlyname-string) *(string)*] \[[HostName](#hostname-string) *(string)*] \[[HostsToCreate](#hoststocreate-string) *(uint)*] \[[LimitHosts](#limithosts-string) *(uint)*] \[[MaxHosts](#maxhosts-string) *(uint)*] \[[MaxServersFromTemplate](#maxserversfromtemplate-string) *(uint)*] \[[MinServersFromTemplate](#minserversfromtemplate-string) *(uint)*] \[[OverwriteSize](#overwritesize-string) *(bool)*] \[[PowerOnHost](#poweronhost-string) *(bool)*] \[[PreCreatedHosts](#precreatedhosts-string) *(uint)*] \[[RemoveServersAfterDrainAndPowerOff](#removeserversafterdrainandpoweroff-string) *(bool)*] \[[ServersToAddPerRequest](#serverstoaddperrequest-string) *(uint)*] \[[TemplateId](#templateid-string) *(uint)*] \[[TemplateTagId](#templatetagid-string) *(uint)*] \[[TemplateVersionId](#templateversionid-string) *(uint)*] \[[ValidationEnvironment](#validationenvironment-string) *(bool)*] \[[VMSize](#vmsize-string) *(string)*] \[[WorkLoadDrain](#workloaddrain-string) *(uint)*] \[[WorkloadThreshold](#workloadthreshold-string) *(uint)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

## DESCRIPTION

Creates a new Azure Virtual Desktop Host Pool or imports an existing Azure Virtual Desktop Host Pool

## PARAMETERS

## Name (string)

The name of the AVD Host Pool.

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SiteId (uint)

Site ID in which to modify the specified AVD Host Pool.

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

```
        Required?                    false

        Position?                    1

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## WorkspaceId (uint)

The Workspace ID.

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Description (string)

Description of the AVD Host Pool.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Enabled (bool)

Enable or disable the AVD Host Pool upon creation.

If the parameter is omitted, the AVD Host Pool is initialised as Disabled.

```
        Required?                    false

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## FriendlyName (string)

Friendly name of the AVD Host Pool.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ResourceGroup (string)

Resource Group of the AVD Host Pool.

```
        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Location (string)

Location of the AVD Host Pool.

```
        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## AzureId (string)

The Azure ID of the AVD Host Pool.

```
        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PoolType ([PoolType](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/pooltype))

The Pool Type of the AVD Host Pool.

Possible values: Pooled, Personal

```
        Required?                    true

        Position?                    named

        Default value                Pooled

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## LimitHosts (uint)

The Limit of session on host. Default: Pooled: 50, Personal: 1 (always).

Available to Pooled Host Pools

```
        Required?                    false

        Position?                    named

        Default value                50

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PublishingType ([PublishingType](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/publishingtype))

The Publishing Type of the AVD Host Pool.

Possible values: RemoteApp, Desktop

```
        Required?                    true

        Position?                    named

        Default value                RemoteApp

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## LoadBalancerType

([LoadBalancerType](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/loadbalancertype)) The Load Balancer Type of the AVD Host Pool.

Possible values: BreadthFirst, DepthFirst, Persistent

```
        Required?                    true

        Position?                    named

        Default value                BreadthFirst

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PowerOnHost (bool)

Whether Power On Host is Enabled or not.

```
        Required?                    false

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ValidationEnvironment (bool)

Whether Validation Environment is Enabled or not.

```
        Required?                    false

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ProvisioningType

([ProvisioningType](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/provisioningtype)) The Provisioning Type of the Host Pool

Possible values: Template, Standalone

```
        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## TemplateId (uint)

The Template ID.

Available to Templated Host Pools

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## TemplateVersionId (uint)

The Template Version ID.

Available to Templated Host Pools

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## TemplateTagId (uint)

The Template Tag ID.

Available to Templated Host Pools

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaxHosts (uint)

The maximum number of hosts that can be created from the template.

Available to Templated Personal Host Pools

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PreCreatedHosts (uint)

The maximum number of pre-created hosts. (Keep available buffer)

Available to Templated Personal Host Pools

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Duration (uint)

The duration (in seconds) before the unused hosts are deleted

Available to Templated Personal Host Pools

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## HostsToCreate (uint)

The number of hosts that will be created after template creation process has finished. These desktops are created only once.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## AutoScaleEnabled (bool)

Whether AutoScale is Enabled or not

Available to Templated Pooled Host Pools

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MinServersFromTemplate (uint)

The Minimum Number of Hosts added from the template.

Default: 1

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaxServersFromTemplate (uint)

The Maximum Number of Hosts added from the template.

Default: 2

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## WorkloadThreshold (uint)

The Workload Threshold.

Default: 75

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ServersToAddPerRequest (uint)

The amount of servers to add per request.

Default: 1

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## WorkLoadDrain (uint)

The Drain Workload.

Default: 20

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## DrainRemainsBelowSec (uint)

The Remaining Drain level.

Default: 1 (Immediate)

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## RemoveServersAfterDrainAndPowerOff (bool)

Remove hosts from host pool after drain and power off.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## HostName (string)

The host name format. All VMs created from the template will have this name with %ID:N:S% replaced.

```
        Required?                    true

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## DefaultPowerState

([DefaultPowerState](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/defaultpowerstate)) The Default Power State

Possible values: PoweredOn, PoweredOff, Suspended

```
        Required?                    false

        Position?                    named

        Default value                PoweredOn

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## OverwriteSize (bool)

Whether Overwrite Size is Enabled or not.

Available to Templated Host Pools

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## VMSize (string)

VMSize which will override the size specified in template properties.

Example: Standard\_B2s

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

-none-

## OUTPUTS

[AVDHostPool](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/avdhostpool)

## EXAMPLES

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

New-RASAVDHostPool -Name "NGTstHostPool" -WorkspaceId 5 -ResourceGroup "NGResource" -Location "westeurope" -PoolType Pooled -PublishingType "Desktop" -ProvisioningType Template -LoadBalancer "DepthFirst"

Creates a new Pooled Templated AVD Host Pool.\
\*\*---------- EXAMPLE 2 ----------

New-RASAVDHostPool -Name "NGTstHostPool" -WorkspaceId 5 -ResourceGroup "NGResource" -Location "westeurope" -PoolType Personal -PublishingType "Desktop" -ProvisioningType Template -LoadBalancer "Persistent"

Creates a new Personal Templated AVD Host Pool.\
\*\*---------- EXAMPLE 3 ----------

New-RASAVDHostPool -WorkspaceId 1 -AzureId "subscriptions/b0375739-05f3-859f-ac89-20ef4dcd92cb/resourceGroups/My\_Resource\_Group/providers/Microsoft.DesktopVirtualization/hostpools/my-hostpool"

Imports an existing AVD Host Pool.

## RELATED LINKS

* [Get-RASAVDHostPool](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasavdhostpool)
* [Set-RASAVDHostPool](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-rasavdhostpool)
* [Remove-RASAVDHostPool](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/remove-rasavdhostpool)
