For the complete documentation index, see llms.txt. This page is also available as Markdown.

Invoke-RASVDISessionCmd

SYNOPSIS

Sends VDI session commands.

SYNTAX

Invoke-RASVDISessionCmd [-InputObject] <VDIRDPSession> -Command {LogOff | SendMsg | Disconnect}
 [-Message <string>] [-MsgTitle <string>] [<CommonParameters>]
Invoke-RASVDISessionCmd [-ProviderId] <uint> -Command {LogOff | SendMsg | Disconnect}
 -VDIHostId <string> [-Message <string>] [-MsgTitle <string>] [<CommonParameters>]
Invoke-RASVDISessionCmd [-VDIServer] <string> [[-SiteId] <uint>]
 -Command {LogOff | SendMsg | Disconnect} -VDIHostId <string> [-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 Provider ID) is invalid or command does not reach the destination.

If VDI Desktop ID is invalid, the command will not fail.

EXAMPLES

Example 1

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

Example 2

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

To obtain the ProviderId, use the Get-RASProvider cmdlet.

To obtain the Desktop ID, use the Get-RASVDIDesktop cmdlet.

Example 3

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-RASProviderStatus cmdlet with StatusLevel as Level3.

PARAMETERS

-VDIServer

The name of a Provider.

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

-SiteId

Site ID from which to retrieve the server.

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

-ProviderId

The ID of the provider.

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

-VDIHostId

Host ID.

To obtain the HostId, use the Get-RASVDIHost command.

-InputObject

The VDIRDPSession Object.

To obtain a VDIRDPSession object representing an VDI Session, use the Get-RASProviderStatus command with StatusLevel as Level3."

Type reference: VDIRDPSession

-Command

Session Command.

Accepted values: LogOff, SendMsg, Disconnect.

Possible values: LogOff, SendMsg, Disconnect

Type reference: VDISessionCmd

-MsgTitle

The message title for the session message.

-Message

The session message to be sent.

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

VDIRDPSession

OUTPUTS

None

Last updated