Table of contents
TLS
TOC
Collapse the table of content
Expand the table of content

Remove-RDSessionHost

Last Updated: 4/3/2017

SYNOPSIS

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

SYNTAX

Remove-RDSessionHost [-SessionHost] <String[]> [-ConnectionBroker <String>] [-Force] [-WhatIf] [-Confirm]
 [<CommonParameters>]

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.

EXAMPLES

Example 1: Remove a session host

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

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

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionBroker

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.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force

Forces the command to run without asking for user confirmation.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionHost

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.

Type: String[]
Parameter Sets: (All)
Aliases: 

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

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

OUTPUTS

Null

NOTES

Add-RDSessionHost

Get-RDSessionHost

Set-RDSessionHost

© 2017 Microsoft