Remove-RDSessionHost

Remove-RDSessionHost

Removes one or more RD Session Host servers from a session collection.

Syntax

Parameter Set: Default
Remove-RDSessionHost [-SessionHost] <String[]> [-ConnectionBroker <String> ] [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Remove-RDSessionHost cmdlet removes one or more Remote Desktop Session Host (RD Session Host) servers from a session collection. The servers remain part of the deployment.

RD Session Host is a Remote Desktop Services role service that lets users share Windows-based programs or the full Windows desktop. Users can connect to an RD Session Host server to run programs, save files, and use network resources on that server.

Parameters

-ConnectionBroker<String>

Specifies the Remote Desktop Connection Broker (RD Connection Broker) server for this Remote Desktop deployment. If this parameter does not appear, the default value is the fully qualified domain name (FQDN) of the local host.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Indicates that the cmdlet removes the RD Session Host without prompting for user confirmation.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SessionHost<String[]>

Specifies an array that contains the name(s) of one or more servers that run the RD Session Host role and that you remove from the session collection.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Null

Examples

Example 1:

This command removes the session host named rdsh.contoso.com from the session collection.

PS C:\> Remove-RDSessionHost -SessionHost @("rdsh.contoso.com") -ConnectionBroker "rdcb.contoso.com" -Force

Add-RDSessionHost

Get-RDSessionHost

Set-RDSessionHost