Invoke-RASVDISessionCmd
NAME
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.
PARAMETERS
-VDIServer <string> 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 <uint> Site ID from which to retrieve the server. If the parameter is omitted, the Licensing Server site ID will be used.
-ProviderId <uint> The ID of the provider. To obtain the ID, use the Get-RASProvider cmdlet.
-VDIHostId <string> Host ID. To obtain the HostId, use the Get-RASVDIHost command.
-InputObject <VDIRDPSession> The VDIRDPSession Object. To obtain a VDIRDPSession object representing an VDI Session, use the Get-RASProviderStatus command with StatusLevel as Level3."
-Command <VDISessionCmd> Session Command. Accepted values: LogOff, SendMsg, Disconnect. Possible values: LogOff, SendMsg, Disconnect
-MsgTitle <string> The message title for the session message.
-Message <string> The session message to be sent.
<CommonParameters>
INPUTS
OUTPUTS
-none-
EXAMPLES
---------- EXAMPLE 1 ---------- Invoke-RASVDISessionCmd "server.company.dom" -Command LogOff -VDIDesktopId 42311235-09c5-ca15-337d-b9723015edf0 Invoke the VDI session to send the LogOff command from the Licensing Server site (default). ---------- EXAMPLE 2 ---------- Invoke-RASVDISessionCmd -ProviderId 10 -Command SendMsg -VDIDesktopId 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 ProviderId, use the Get-RASProvider cmdlet. To obtain the Desktop ID, use the Get-RASVDIDesktop cmdlet. ---------- EXAMPLE 3 ---------- $VDISession | Invoke-RASVDISessionCmd -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-RASProviderStatus cmdlet with StatusLevel as Level3.
Last updated