Skip to content

xRDSessionCollection

dscbot edited this page Oct 15, 2025 · 1 revision

Parameters

Parameter Attribute DataType Description Allowed Values
CollectionName Key String Specifies a name for the session collection.
ConnectionBroker Required String Specifies the Remote Desktop Connection Broker (RD Connection Broker) server for a Remote Desktop deployment.
SessionHost Required StringArray[] Specifies one or more RD Session Host servers to include in the session collection.
CollectionDescription Write String Specifies a description for the collection.
Force Write Boolean Indicates that servers may be added to or removed from the collection.

Description

This resource is used to configure the Remote Desktop Collection.

Examples

Example 1

This example shows how to ensure a session collection is created.

configuration Example
{
    Import-DscResource -ModuleName 'xRemoteDesktopSessionHost'

    node localhost {

        xRDSessionCollection 'MyCollection' {
            CollectionName        = 'ExampleApplications'
            SessionHost           = 'sessionhost.server.fqdn'
            ConnectionBroker      = 'connectionbroker.server.fqdn'
            CollectionDescription = 'A collection to deploy example applications'
        }
    }
}

Example 2

configuration xRDSessionCollection_Full
{
    Import-DscResource -modulename xRemoteDesktopSessionHost

    node localhost
    {
        xRDSessionCollection WeLoveDsc
        {
            ConnectionBroker = 'RDCB1.contoso.com'
            CollectionName   = 'WeLoveDsc'
            SessionHost      = 'RDSH1.contoso.com', 'RDSH2.contoso.com'
        }
    }
}
Clone this wiki locally