Invoke-RDSProcessCmd

NAME

Invoke-RDSProcessCmd

SYNOPSIS

Sends an RDS Process command.

SYNTAX

Invoke-RDSProcessCmd [-RDSServer] <string> [[-SiteId] <uint>] -Command <RDSProcessCmd> {Kill} -Id <uint> [<CommonParameters>]

Invoke-RDSProcessCmd [-RDSId] <uint> -Command <RDSProcessCmd> {Kill} -Id <uint> [<CommonParameters>]

Invoke-RDSProcessCmd [-InputObject] <ServerAppInfo> -Command <RDSProcessCmd> {Kill} [<CommonParameters>]

DESCRIPTION

The Invoke-RDSProcessCmd cmdlet is used to send an RDS session process command.

The Invoke-RDSProcessCmd command will only fail with an error if the name or ID of the target RD Session Host server is invalid or command does not reach the destination.

If the process ID is invalid, the command will NOT fail.

Kill: sends an RDS kill process command.

PARAMETERS


-RDSServer <string>
The name of an RD 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.

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

-RDSId <uint>
The ID of an RD Session Host server.

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

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

-Id <uint>
Process ID.

To obtain the RDS Process ID, use the Get-RDSStatus command with StatusLevel as Level3.

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

-InputObject <ServerAppInfo>
The RDS Server Application info object.

To obtain an ServerAppInfo object representing an RD Session application info, use the Get-RDSStatus command with StatusLevel as Level 3."

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

-Command <RDSProcessCmd>
Process command.

Accepted values: Kill.

Possible values: Kill

        Required?                    true
        Position?                    named
        Default value                0
        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

PSAdmin.ServerAppInfo

OUTPUTS

-none-

EXAMPLES


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

Invoke-RDSProcessCmd "server.company.dom" -Id 2536 -Command Kill

Invoke the RDS kill process command in the Licensing Server site (default) for the process with ID '2536'.

To obtain the Process ID, use the Get-RDSStatus cmdlet with StatusLevel as Level3.

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

Invoke-RDSProcessCmd -RDSId 10 -Id 2536 -Command Kill

Invoke the RDS kill process command for the process with ID '2536' of the RDS Server with ID '10'.

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

To obtain the process ID, use the Get-RDSStatus cmdlet with StatusLevel as Level3.

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

$RDPSessionApp | Invoke-RDSProcessCmd -Command Kill

Invoke the RDS kill process command for the process, which is identified by an object obtained from the pipeline output.

To obtain the $RDPSessionApp object, use the Get-RDSStatus cmdlet with StatusLevel as Level3.

RELATED LINKS