Invoke-RASTemplate
Last updated
Last updated
Invoke-RASTemplate
Perform RAS Template commands.
Invoke-RASTemplate [] (uint)** - {EnterMaintenance | ExitMaintenance | RecreateHosts | RecreateDesktops} - {RDSTemplate | VDITemplate | AVDTemplate} [ (SwitchParameter)] [ (SwitchParameter)] [ (SwitchParameter)] [ (uint)] [ (string)] [()]
Invoke-RASTemplate [-] () - {EnterMaintenance | ExitMaintenance | RecreateHosts | RecreateDesktops} - {RDSTemplate | VDITemplate | AVDTemplate} [ (SwitchParameter)] [ (SwitchParameter)] [ (SwitchParameter)] [ (uint)] [ (string)] [()]
Invoke-RASTemplate []** (string) [[-] (uint)] - {EnterMaintenance | ExitMaintenance | RecreateHosts | RecreateDesktops} - {RDSTemplate | VDITemplate | AVDTemplate} [ (SwitchParameter)] [ (SwitchParameter)] [ (SwitchParameter)] [ (uint)] [ (string)] [()]
Triggers an action on the selected Template such as: EnterMaintenance, ExitMaintenance or RecreateHosts.
EnterMaintenance: Toggle the template into maintenance mode.
ExitMaintenance: Toggle the template out from maintenance mode.
RecreateHosts: Re-creates one or all of the Template hosts.
The name of the target RAS Template.
Site ID of the specified RAS Template.
If the parameter is omitted, the site ID of the Licensing Server will be used.
The ID of the target RAS Template.
To obtain the ID, use the Get-RASTemplate cmdlet.
An object of type Template which represents a RAS Template.
To obtain the object, use the Get-RASTemplate cmdlet.
Template object type.
Possible values: RDSTemplate, VDITemplate, AVDTemplate
Template command.
Accepted values: EnterMaintenance, ExitMaintenance, RecreateHosts.
Possible values: EnterMaintenance, ExitMaintenance, RecreateHosts, RecreateDesktops
Specifies whether to force stopping/updating of hosts.
The ID of a host VM to be recreated.
Specifies whether to re-create all hosts for the specified template.
The template version ID from which new hosts will be (re-)created from. Default: null.
Switch determining whether or not a new template version is created on ExitMaintenance. Default: false.
(CommonParameters)
-none-
**---------- EXAMPLE 1 ----------
Invoke-RASTemplate "TemplateName" -ObjType RDSTemplate -Command EnterMaintenance
Switch the RAS Template specified by name to maintenance mode in the Licensing Server site.
Since -ForceStopUpdateHosts is not included, hosts will not be stopped/updated. **---------- EXAMPLE 2 ----------
Invoke-RASTemplate -ObjType VDITemplate -Id 10 -Command ExitMaintenance -ForceStopUpdateHosts
Switch the RAS Template specified by ID from the maintenance mode.
Since -ForceStopUpdateHosts is included, hosts will be stopped/updated, if required. **---------- EXAMPLE 3 ----------
Invoke-RASTemplate "TemplateName" -ObjType RDSTemplate -Command RecreateHosts -VDIHostId 42312685-05c9-ca51-342d-b3943046edf1
Re-create the specified host of the RAS Template specified by name in the Licensing Server site.
Since -RecreateAllHosts is not included, only the specified host will be re-created. **---------- EXAMPLE 4 ----------
Invoke-RASTemplate -ObjType RDSTemplate -InputObject $Template -Command RecreateHosts -RecreateAllHosts
Re-create all hosts of the RAS Template specified by the $Template object. **---------- EXAMPLE 5 ----------
Get-RASTemplate -ObjType VDITemplate -Id 10 | Invoke-RASTemplateCmd -Command RecreateHosts -RecreateAllHosts
Re-create all hosts of the RAS Template specified by an object obtained from the pipeline output.