Get-RdsSessionHost

Gets the properties of a session host.

Syntax

Get-RdsSessionHost
   [-TenantName] <String>
   [-HostPoolName] <String>
   [-Name <String>]
   [<CommonParameters>]

Description

The Get-RdsSessionHost cmdlet gets the properties of the specified session host. If you do not specify a session host, this cmdlet returns all session hosts in the host pool.

Examples

Example 1: Get all session hosts in the host pool

PS C:\> Get-RdsSessionHost -TenantName "contoso" -HostPoolName "contosoHostPool"

SessionHostName : sh1.contoso.com
TenantName      : Contoso
TenantGroupName : Default Tenant Group
HostPoolName    : contosoHostPool
AllowNewSession : True
Sessions        : 1
LastHeartBeat   : 1/1/2018 12:00:00 PM
AgentVersion    : 1.0.0.1
AssignedUser    :
Status          : Available
StatusTimestamp : 1/1/2018 12:00:00 PM

SessionHostName : sh2.contoso.com
TenantName      : Contoso
TenantGroupName : Default Tenant Group
HostPoolName    : contosoHostPool
AllowNewSession : False
Sessions        : 1
LastHeartBeat   : 1/1/2018 12:00:00 PM
AgentVersion    : 1.0.0.1
AssignedUser    :
Status          : Available
StatusTimestamp : 1/1/2018 12:00:00 PM

This command gets all session hosts in the specified host pool.

Example 2: Get a specific session host

PS C:\> Get-RdsSessionHost -TenantName "contoso" -HostPoolName "contosoHostPool" -Name "sh1.contoso.com"

SessionHostName : sh1.contoso.com
TenantName      : contoso
TenantGroupName : Default Tenant Group
HostPoolName    : contosoHostPool
AllowNewSession : True
Sessions        : 1
LastHeartBeat   : 1/1/2018 12:00:00 PM
AgentVersion    : 1.0.0.1
AssignedUser    :
Status          : Available
StatusTimestamp : 1/1/2018 12:00:00 PM

This command gets the properties of the specified session host in the host pools. The session host and its properties are displayed only if the session host exists in the tenant and the current user is properly authorized.

Parameters

-HostPoolName

The name of the host pool.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The fully-qualified domain name (FQDN) of the session host.

Type:String
Aliases:SessionHostName
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-TenantName

The name of the tenant.

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

Inputs

System.String

Outputs

Microsoft.RDInfra.RDManagementData.RdMgmtSessionHost