Invoke-VDISessionCmd

NAME

Invoke-VDISessionCmd

SYNOPSIS

Sends VDI session commands.

SYNTAX

Invoke-VDISessionCmd [-VDIServer] <string> [[-SiteId] <uint>] -Command <VDISessionCmd> {LogOff | SendMsg | Disconnect} -VDIGuestId <string> [-Message <string>] [-MsgTitle <string>] [<CommonParameters>]

Invoke-VDISessionCmd [-VDIHostId] <uint> -Command <VDISessionCmd> {LogOff | SendMsg | Disconnect} -VDIGuestId <string> [-Message <string>] [-MsgTitle <string>] [<CommonParameters>]

Invoke-VDISessionCmd [-InputObject] <VDIRDPSession> -Command <VDISessionCmd> {LogOff | SendMsg | Disconnect} [-Message <string>] [-MsgTitle <string>] [<CommonParameters>]

DESCRIPTION

Sends a session commands such as Logoff, Disconnect or send message.

It will not fail unless VDI (server or Host ID) is invalid or command does not reach the destination.

If VDI Guest ID is invalid, the command will NOT fail.

PARAMETERS


-VDIServer <string>
The name of an VDI Session Host server.

The name can be either FQDN or IP address, but you have to enter the actual name this server has in the RAS farm.

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

-SiteId <uint>
Site ID from which to retrieve the server.

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

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

-VDIHostId <uint>
The ID of an VDI Session Host server.

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

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

-VDIGuestId <string>
VDI Guest ID.

To obtain the VDIGuestId, use the Get-VDIGuest command.

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

-InputObject <VDIRDPSession>
The RDP Session Object.

To obtain an RDPSession object representing an VDI Session, use the Get-VDIHostStatus command with StatusLevel as Level3."

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

-Command <VDISessionCmd>
Session Command.

Accepted values: LogOff, SendMsg, Disconnect.

Possible values: LogOff, SendMsg, Disconnect

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

-MsgTitle <string>
The message title for the session message.

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

-Message <string>
The session message to be sent.

        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

VDIRDPSession

OUTPUTS

-none-

EXAMPLES


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

Invoke-VDISessionCmd "server.company.dom" -Command LogOff -VDIGuestId 42311235-09c5-ca15-337d-b9723015edf0

Invoke the VDI session to send the LogOff command from the Licensing Server site (default).

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

Invoke-VDISessionCmd -VDIHostId 10 -Command SendMsg -VDIGuestId 42311235-09c5-ca15-337d-b9723015edf0 -Message "This is a message"

Invoke the VDI session to send the SendMsg command specified by ID.

To obtain the VDIHostId, use the Get-VDIHost cmdlet.

To obtain the Guest ID, use the Get-VDIGuest cmdlet.

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

$VDISession | Invoke-VDISessionCmd -Command Disconnect

Invoke the VDI session to send the Disconnect command, which is identified by an object obtained from the pipeline output.

To obtain the VDI Session, use the Get-VDIHostStatus cmdlet with StatusLevel as Level3.

RELATED LINKS