Edit

Share via


Get-RdsSessionHost

Gets the properties of a session host.

Syntax

Default (Default)

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Name

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SessionHostName

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-TenantName

The name of the tenant.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

System.String

Outputs

Microsoft.RDInfra.RDManagementData.RdMgmtSessionHost