# Invoke-RASHostPool.md

## NAME

Invoke-RASHostPool

## SYNOPSIS

Perform RAS Host Pool commands.

## SYNTAX

**Invoke-RASHostPool** \[[Id](#id-string)] *(uint)* -[Command](#Command) {RecreateHosts | CreateHosts} -[ObjType](#objtype) {RDSHostPool | VDIHostPool | AVDHostPool} \[[NoOfHostsToCreate](#noofhoststocreate-string) *(uint)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

\*\*Invoke-RASHostPool \[-[InputObject](#inputobject)] *(*[*RASListObj*](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/raslistobj)*)* -[Command](#Command) {RecreateHosts | CreateHosts} \[[NoOfHostsToCreate](#noofhoststocreate-string) *(uint)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

**Invoke-RASHostPool** \[[Name](#name-string)] *(string)* \[\[-[SiteId](#siteid-string)] *(uint)*] -[Command](#Command) {RecreateHosts | CreateHosts} -[ObjType](#objtype) {RDSHostPool | VDIHostPool | AVDHostPool} \[[NoOfHostsToCreate](#noofhoststocreate-string) *(uint)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

## DESCRIPTION

Triggers an action on the selected HostPool such as: CreateHosts or RecreateHosts.

CreateHosts: Creates one or more Hosts.

RecreateHosts: Re-creates all of the Hosts.

## PARAMETERS

## Name (string)

The name of the target RAS HostPool.

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SiteId (uint)

Site ID of the specified RAS HostPool.

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

## Id (uint)

The ID of the target RAS HostPool.

```
        Required?                    true

        Position?                    0

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

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

An object of type RDS, VDI, or AVD HostPool representing a RAS HostPool.

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       true (ByValue)

        Accept wildcard characters?  false
```

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

HostPool object type.

Possible values: RDSHostPool, VDIHostPool, AVDHostPool

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

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

Host Pool command.

Accepted values: RecreateHosts, CreateHosts.

Possible values: RecreateHosts, CreateHosts

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## NoOfHostsToCreate (uint)

The number of hosts to be created from the specified RAS HostPool. Default: 1.

```
        Required?                    false

        Position?                    named

        Default value                1

        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

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

## OUTPUTS

-none-

## EXAMPLES

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

Invoke-RASHostPool -Id 10 -ObjType RDSHostPool -Command CreateHosts -NoOfHostsToCreate 2

Add new desktop VMs to the RAS HostPool specified by ID.

If -NoOfHostsToCreate is not specified, 1 desktop VM will be added.\
\*\*---------- EXAMPLE 2 ----------

Invoke-RASHostPool -InputObject $HostPool -Command RecreateHosts

Re-create all desktop VMs of the RAS HostPool specified by the $HostPool object.

## RELATED LINKS

* [Get-RASRDSHostPool](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasrdshostpool)
* [Get-RASRDSHost](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasrdshost)
* [Get-RASVDIHostPool](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasvdihostpool)
* [Get-RASVDIHost](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasvdihost)
* [Get-RASAVDHostPool](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasavdhostpool)
* [Get-RASAVDHost](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasavdhost)
