Invoke-RASTemplate
SYNOPSIS
Perform RAS Template commands.
SYNTAX
Invoke-RASTemplate [-Id] <uint>
-Command {EnterMaintenance | ExitMaintenance | RecreateHosts | RecreateDesktops}
-ObjType {RDSTemplate | VDITemplate | AVDTemplate} [-CreateTemplateVersion <SwitchParameter>]
[-ForceStopUpdateHosts <SwitchParameter>] [-RecreateAllHosts <SwitchParameter>]
[-TemplateVersionId <uint>] [-VDIHostId <string>] [<CommonParameters>]Invoke-RASTemplate [-InputObject] <Template>
-Command {EnterMaintenance | ExitMaintenance | RecreateHosts | RecreateDesktops}
-ObjType {RDSTemplate | VDITemplate | AVDTemplate} [-CreateTemplateVersion <SwitchParameter>]
[-ForceStopUpdateHosts <SwitchParameter>] [-RecreateAllHosts <SwitchParameter>]
[-TemplateVersionId <uint>] [-VDIHostId <string>] [<CommonParameters>]Invoke-RASTemplate [-Name] <string> [[-SiteId] <uint>]
-Command {EnterMaintenance | ExitMaintenance | RecreateHosts | RecreateDesktops}
-ObjType {RDSTemplate | VDITemplate | AVDTemplate} [-CreateTemplateVersion <SwitchParameter>]
[-ForceStopUpdateHosts <SwitchParameter>] [-RecreateAllHosts <SwitchParameter>]
[-TemplateVersionId <uint>] [-VDIHostId <string>] [<CommonParameters>]DESCRIPTION
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.
EXAMPLES
Example 1
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
Switch the RAS Template specified by ID from the maintenance mode.
Since -ForceStopUpdateHosts is included, hosts will be stopped/updated, if required.
Example 3
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
Re-create all hosts of the RAS Template specified by the $Template object.
Example 5
Re-create all hosts of the RAS Template specified by an object obtained from the pipeline output.
PARAMETERS
-Name
The name of the target RAS Template.
-SiteId
Site ID of the specified RAS Template.
If the parameter is omitted, the site ID of the Licensing Server will be used.
-Id
The ID of the target RAS Template.
To obtain the ID, use the Get-RASTemplate cmdlet.
-InputObject
An object of type Template which represents a RAS Template.
To obtain the object, use the Get-RASTemplate cmdlet.
Type reference: Template
-ObjType
Template object type.
Possible values: RDSTemplate, VDITemplate, AVDTemplate
Type reference: Template
-Command
Template command.
Accepted values: EnterMaintenance, ExitMaintenance, RecreateHosts.
Possible values: EnterMaintenance, ExitMaintenance, RecreateHosts, RecreateDesktops
Type reference: Template
-ForceStopUpdateHosts
Specifies whether to force stopping/updating of hosts.
-VDIHostId
The ID of a host VM to be recreated.
-RecreateAllHosts
Specifies whether to re-create all hosts for the specified template.
-TemplateVersionId
The template version ID from which new hosts will be (re-)created from. Default: null.
-CreateTemplateVersion
Switch determining whether or not a new template version is created on ExitMaintenance. Default: false.
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
Template
OUTPUTS
None
RELATED LINKS
Last updated