Citrix Virtual Apps and Desktops SDK

Get-BrokerController

Gets Controllers running broker services in the site.

Syntax

Get-BrokerController
   [[-MachineName] <String>]
   [-ControllerVersion <String>]
   [-DesktopsRegistered <Int32>]
   [-DNSName <String>]
   [-IsLasAware <Boolean>]
   [-LasActivationExpiry <DateTime>]
   [-LasActivationStatus <String>]
   [-LasConnectionStatus <String>]
   [-LastActivityTime <DateTime>]
   [-LastLicensingServerEvent <LicensingServerEvent>]
   [-LastLicensingServerEventTime <DateTime>]
   [-LastStartTime <DateTime>]
   [-LasUniqueEnvId <String>]
   [-LicensingGraceState <LicensingGraceState>]
   [-LicensingServerState <LicensingServerState>]
   [-Metadata <String>]
   [-OSType <String>]
   [-OSVersion <String>]
   [-SID <String>]
   [-State <ControllerState>]
   [-UUID <Guid>]
   [-Property <String[]>]
   [-ReturnTotalRecordCount]
   [-MaxRecordCount <Int32>]
   [-Skip <Int32>]
   [-SortBy <String>]
   [-Filter <String>]
   [-FilterScope <Guid>]
   [-AdminAddress <String>]
   [-BearerToken <String>]
   [-TraceParent <String>]
   [-TraceState <String>]
   [-VirtualSiteId <String>]
   [<CommonParameters>]
<!--NeedCopy-->
Get-BrokerController
   [-Uid] <Int32>
   [-Property <String[]>]
   [-AdminAddress <String>]
   [-BearerToken <String>]
   [-TraceParent <String>]
   [-TraceState <String>]
   [-VirtualSideId <String>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

Gets Controllers from the current site that match the specified search criteria.

Controllers are server machines running instances of the broker service. The broker service is responsible for the brokering of user sessions to desktops or applications, and for power management of the underlying machines. An operational site must contain at least one Controller.

If no search criteria are specified, all Controllers in the site are obtained.

BrokerController Object

The BrokerController object represents a single controller running an instance of the Broker service. It contains the following properties:

  • ActiveSiteServices (System.String[])

    The Broker site services active on the controller.

  • AssociatedHypervisorConnectionUids (System.Int32[])

    The UIDs of the hypervisor connections being managed by the Broker service on the controller.

  • ControllerVersion (System.String)

    The version of the Broker service on the controller.

  • DesktopsRegistered (System.Int32)

    The number of VDA machines registered with the Broker service on the controller.

  • DNSName (System.String)

    The DNS name of the controller.

  • IsLasAware (System.Boolean)

    The flag indicating whether the controller is capable of handling License Activation Service. NOTE: This is only available in 2203 CU7 or later.

  • LasActivationExpiry (System.DateTime?)

    The expiry time of the License Activation Service activation on the controller. NOTE: This is only available in 2203 CU7 or later.

  • LasActivationStatus (System.String)

    The status of the License Activation Service activation on the controller. NOTE: This is only available in 2203 CU7 or later.

  • LasConnectionStatus (System.String)

    The connection status of the license server to LAS server. NOTE: This is only available in 2203 CU7 or later.

  • LastActivityTime (System.DateTime?)

    The last reported activity time of the Broker service on the controller.

  • LastLicensingServerEvent (Citrix.Broker.Admin.SDK.LicensingServerEvent?)

    Last significant licensing server event reported by the Broker service on the controller.

  • LastLicensingServerEventDetails (System.String[])

    Additional details associated with the last significant licensing server event.

  • LastLicensingServerEventTime (System.DateTime?)

    Time at which the last significant licensing server event was reported.

  • LastStartTime (System.DateTime?)

    The last start-up time of the Broker service on the controller.

  • LasUniqueEnvId (System.String)

    The unique id used to identify the binding of a DDC to a license server.

  • LicensingGracePeriodReasons (Citrix.Broker.Admin.SDK.LicensingGracePeriodReason[])

    Current active or expired license caching modes in effect on the controller.

  • LicensingGracePeriodTimesRemaining (System.TimeSpan[])

    Times remaining in currently active or expired license caching modes in effect on the controller. Expired license caching modes are indicated by zero remaining time. The number and order of entries in this list matches that in the LicensingGracePeriodReasons list.

  • LicensingGraceState (Citrix.Broker.Admin.SDK.LicensingGraceState)

    The licensing grace state currently in effect in the Broker service on the controller.

  • LicensingServerState (Citrix.Broker.Admin.SDK.LicensingServerState)

    The licensing server state currently in effect in the Broker service on the controller.

  • MachineName (System.String)

    The Windows name of the controller.

  • MetadataMap (System.Collections.Generic.Dictionary<string, string>)

    The metadata for the controller.

  • OSType (System.String)

    The Operating System type of the controller.

  • OSVersion (System.String)

    The Operating System version of the controller.

  • SID (System.String)

    The SID of the controller.

  • State (Citrix.Broker.Admin.SDK.ControllerState)

    The state of the Broker service on the controller.

  • Uid (System.Int32)

    The UID of the controller instance.

  • UUID (System.Guid)

    A globally unique identifier of the controller instance.

Examples

EXAMPLE 1

Gets all Controllers in the site that are currently active (powered on and fully operational).

Get-BrokerController -State Active
<!--NeedCopy-->

EXAMPLE 2

Gets all Controllers in the site that started-up in the last 30 minutes.

Get-BrokerController -Filter 'LastStartTime -gt "-30:00"'
<!--NeedCopy-->

Parameters

-Uid

Gets only Controller with the specified unique ID.

Type: Int32
Position: 2
Default value: None
Required: True
Accept pipeline input: False
Accept wildcard characters: False

-MachineName

Gets only Controllers with the specified Windows name. (‘domain\machine’)

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

-ControllerVersion

Gets only Controllers running the specified version of the broker service.

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

-DesktopsRegistered

Gets only Controllers that have the specified number of desktops currently registered. This parameter is mainly of use with advanced filtering; see about_Broker_Filtering.

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

-DNSName

Gets only Controllers with the specified DNS name (‘machine.domain’)

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

-IsLasAware

The flag indicating whether the controller is capable of handling License Activation Service. NOTE: This is only available in 2203 CU7 or later.

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

-LasActivationExpiry

The expiry time of the License Activation Service activation on the controller. NOTE: This is only available in 2203 CU7 or later.

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

-LasActivationStatus

The status of the License Activation Service activation on the controller. NOTE: This is only available in 2203 CU7 or later.

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

-LasConnectionStatus

The connection status of the license server to LAS server. NOTE: This is only available in 2203 CU7 or later.

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

-LastActivityTime

Gets only Controllers last reported as active at the specified time. This parameter is mainly of use with advanced filtering; see about_Broker_Filtering.

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

-LastLicensingServerEvent

Gets only Controllers with the specified last license server event recorded.

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

-LastLicensingServerEventTime

Gets only Controllers with its last recorded licensing server event at the specified time. This parameter is mainly of use with advanced filtering; see about_Broker_Filtering.

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

-LastStartTime

Gets only Controllers that last started-up at the specified time. This parameter is mainly of use with advanced filtering; see about_Broker_Filtering.

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

-LasUniqueEnvId

The unique id used to identify the binding of a DDC to a license server.

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

-LicensingGraceState

Gets only Controllers in the specified licensing grace state.

Valid values are: NotActive, Active, and Expired.

Type: LicensingGraceState
Accepted values: NotActive, Active, Expired
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-LicensingServerState

Gets only Controllers in the specified licensing server state. Valid values are: IncompleteConfiguration, NotConnected, OK, StartupLicenseNotInstalled, Incompatible, Failed, LasConnectionOK, and LasConnectionLost.

Type: LicensingServerState
Accepted values: IncompleteConfiguration, NotConnected, OK, StartupLicenseNotInstalled, Incompatible, Failed, LasConnectionOK, LasConnectionLost
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Metadata

Gets records with matching metadata entries.

The value being compared with is a concatenation of the key name, a colon, and the value. For example: -Metadata “abc:x*” matches records with a metadata entry having a key name of “abc” and a value starting with the letter “x”.

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

-OSType

Gets only Controllers running the specified Operating System type.

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

-OSVersion

Gets only Controllers running the specified Operating System version.

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

-SID

Gets only Controllers with the specified SID.

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

-State

Gets only Controllers currently in the specified state.

Valid values are: Off, Transitioning, Active, and Failed.

Type: ControllerState
Accepted values: Off, Transitioning, Active, Failed
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-UUID

Gets only the Controller with the specified GUID.

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

-ReturnTotalRecordCount

When specified, this causes the cmdlet to output an error record containing the number of records available. This error record is additional information and does not affect the objects written to the output pipeline. See about_Broker_Filtering for details.

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

-MaxRecordCount

Specifies the maximum number of records to return.

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

-Skip

Skips the specified number of records before returning results. Also reduces the count returned by -ReturnTotalRecordCount.

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

-SortBy

Sorts the results by the specified list of properties. The list is a set of property names separated by commas, semi-colons, or spaces. Optionally, prefix each name with a + or - to indicate ascending or descending order. Ascending order is assumed if no prefix is present.

Type: String
Position: Named
Default value: The default sort order is by name or unique identifier.
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Filter

Gets records that match a PowerShell style filter expression. See about_Broker_Filtering for details.

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

-FilterScope

Gets only results allowed by the specified scope id.

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

-Property

Specifies the properties to be returned. This is similar to piping the output of the command through Select-Object, but the properties are filtered more efficiently at the server.

Type: String[]
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

CitrixCommonParameters

-AdminAddress

Specifies the address of a XenDesktop controller the PowerShell snap-in will connect to. You can provide this as a host name or an IP address.

Type: String
Position: Named
Default value: Localhost. Once a value is provided by any cmdlet, this value becomes the default.
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-BearerToken

Specifies the bearer token assigned to the calling user.

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

-TraceParent

Specifies the OpenTelemetry distributed tracing trace parent for this cmdlet call.

This property should follow the W3C Trace Context format for a traceparent header.

Note this property will also detect any ambient Activity provided by the caller provided by Activity.Current.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False
Available Since: Citrix Virtual Apps and Desktop 7 2106

-TraceState

Specifies the OpenTelemetry distributed tracing trace state for this cmdlet call.

This property will be ignored if no TraceParent is specified.

This property should follow the W3C Trace Context format for a tracestate header.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False
Available Since: Citrix Virtual Apps and Desktop 7 2106

-VirtualSiteId

Specifies the virtual site the PowerShell snap-in will connect to.

Type: String
Position: Named
Default value: None
Required: 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

None

You cannot pipe input into this cmdlet.

Outputs

Citrix.Broker.Admin.SDK.Controller

Returns Controllers matching all specified selection criteria.

Get-BrokerController