Invoke-RASVDITemplateCmd

NAME

Invoke-RASVDITemplateCmd

SYNOPSIS

Perform RAS Template commands.

SYNTAX

Invoke-RASVDITemplateCmd [-Name] <string> [[-SiteId] <uint>] -Command <VDITemplateCmd> {EnterMaintenance | ExitMaintenance | RecreateGuests | CreateGuests} [-ForceStopUpdateGuests <SwitchParameter>] [-NoOfGuestsToCreate <uint>] [-RecreateAllGuests <SwitchParameter>] [-VDIGuestId <string>] [<CommonParameters>]

Invoke-RASVDITemplateCmd [-Id] <uint> -Command <VDITemplateCmd> {EnterMaintenance | ExitMaintenance | RecreateGuests | CreateGuests} [-ForceStopUpdateGuests <SwitchParameter>] [-NoOfGuestsToCreate <uint>] [-RecreateAllGuests <SwitchParameter>] [-VDIGuestId <string>] [<CommonParameters>]

Invoke-RASVDITemplateCmd [-InputObject] <VDITemplate> -Command <VDITemplateCmd> {EnterMaintenance | ExitMaintenance | RecreateGuests | CreateGuests} [-ForceStopUpdateGuests <SwitchParameter>] [-NoOfGuestsToCreate <uint>] [-RecreateAllGuests <SwitchParameter>] [-VDIGuestId <string>] [<CommonParameters>]

DESCRIPTION

Triggers an action on the selected VDI Template such as: EnterMaintenance, ExitMaintenance or RecreateGuests.

EnterMaintenance: Toggle the VDI template into maintenance mode.

ExitMaintenance: Toggle the VDI template out from maintenance mode.

RecreateGuests: Re-creates one or all of the VDI Template Guests.

PARAMETERS


-Name <string>
The name of the target RAS Template.

        Required?                    true
        Position?                    0
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-SiteId <uint>
Site ID of the specified RAS Template.

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 Template.

To obtain the ID, use the Get-VDITemplate cmdlet.

        Required?                    true
        Position?                    0
        Default value                0
        Accept pipeline input?       false
        Accept wildcard characters?  false

-InputObject <VDITemplate>
An object of type VDITemplate representing a RAS Template.

To obtain the object, use the Get-VDITemplate cmdlet.

        Required?                    true
        Position?                    0
        Default value                
        Accept pipeline input?       true (ByValue)
        Accept wildcard characters?  false

-Command <VDITemplate>
VDI Template command.

Accepted values: EnterMaintenance, ExitMaintenance, RecreateGuests.

Possible values: EnterMaintenance, ExitMaintenance, RecreateGuests, CreateGuests

        Required?                    true
        Position?                    named
        Default value                0
        Accept pipeline input?       false
        Accept wildcard characters?  false

-ForceStopUpdateGuests <SwitchParameter>
Specifies whether to force stopping/updating of guest VMs.

        Required?                    false
        Position?                    named
        Default value                False
        Accept pipeline input?       false
        Accept wildcard characters?  false

-VDIGuestId <string>
The ID of a guest VM to be recreated.

        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-RecreateAllGuests <SwitchParameter>
Specifies whether to re-create all guest VMs for the specified template.

        Required?                    false
        Position?                    named
        Default value                False
        Accept pipeline input?       false
        Accept wildcard characters?  false

-NoOfGuestsToCreate <uint>
The number of guests to be created from the specified RAS Template. Default: 1.

        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

VDITemplate

OUTPUTS

-none-

EXAMPLES


---------- EXAMPLE 1 ----------

Invoke-RASVDITemplateCmd "TemplateName" -Command EnterMaintenance

Switch the RAS Template specified by name to maintenance mode in the Licensing Server site.

Since -ForceStopUpdateGuests is not included, guest VMs will not be stopped/updated.

---------- EXAMPLE 2 ----------

Invoke-RASVDITemplateCmd -Id 10 -Command ExitMaintenance -ForceStopUpdateGuests

Switch the RAS Template specified by ID from the maintenance mode.

Since -ForceStopUpdateGuests is included, guest VMs will be stopped/updated, if required.

---------- EXAMPLE 3 ----------

Invoke-RASVDITemplateCmd -Id 10 -Command CreateGuests -NoOfGuestsToCreate 2

Add new guest VMs to the RAS template specified by ID.

If -NoOfGuestsToCreate is not specified, 1 guest VM will be added.

---------- EXAMPLE 4 ----------

Invoke-RASVDITemplateCmd "TemplateName" -Command RecreateGuests -VDIGuestId 42312685-05c9-ca51-342d-b3943046edf1

Re-create the specified guest VM of the RAS Template specified by name in the Licensing Server site.

Since -RecreateAllGuests is not included, only the specified guest VM will be re-created.

---------- EXAMPLE 5 ----------

Invoke-RASVDITemplateCmd -InputObject $Template -Command RecreateGuests -RecreateAllGuests

Re-create all guest VMs of the RAS Template specified by the $Template object.

---------- EXAMPLE 6 ----------

Get-RASVDITemplate -Id 10 | Invoke-RASVDITemplateCmd -Command RecreateGuests -RecreateAllGuests

Re-create all guest VMs of the RAS Template specified by an object obtained from the pipeline output.

RELATED LINKS