Citrix Daas SDK

Get-BrokerMachine

Gets machines belonging to this site.

Syntax

Get-BrokerMachine
   [[-MachineName] <String>]
   [-AgentVersion <String>]
   [-AllocationType <AllocationType>]
   [-ApplicationInUse <String>]
   [-AssignedClientName <String>]
   [-AssignedIPAddress <String>]
   [-AssignedUserSID <String>]
   [-AssociatedTenantId <Guid>]
   [-AssociatedUserFullName <String>]
   [-AssociatedUserName <String>]
   [-AssociatedUserSID <String>]
   [-AssociatedUserUPN <String>]
   [-AzureADJoinedMode <String>]
   [-AzureDeviceId <String>]
   [-BrowserName <String>]
   [-CatalogName <String>]
   [-CatalogUid <Int32>]
   [-CatalogUUID <Guid>]
   [-CbpVersion <CBPVersion>]
   [-ColorDepth <ColorDepth>]
   [-ControllerDNSName <String>]
   [-DeliveryType <DeliveryType>]
   [-Description <String>]
   [-DesktopCondition <String>]
   [-DesktopGroupName <String>]
   [-DesktopGroupUid <Int32>]
   [-DesktopGroupUUID <Guid>]
   [-DesktopKind <DesktopKind>]
   [-DesktopUid <Int32>]
   [-DNSName <String>]
   [-DrainingUntilShutdown <Boolean>]
   [-FaultState <MachineFaultState>]
   [-FunctionalLevel <FunctionalLevel>]
   [-HostedMachineId <String>]
   [-HostedMachineName <String>]
   [-HostingServerName <String>]
   [-HypervisorConnectionName <String>]
   [-HypervisorConnectionUid <Int32>]
   [-HypHypervisorConnectionUid <Guid>]
   [-IconUid <Int32>]
   [-ImageOutOfDate <Boolean>]
   [-InMaintenanceMode <Boolean>]
   [-IPAddress <String>]
   [-IsAssigned <Boolean>]
   [-IsPhysical <Boolean>]
   [-IsReserved <Boolean>]
   [-LastAssignmentTime <DateTime>]
   [-LastConnectionFailure <ConnectionFailureReason>]
   [-LastConnectionTime <DateTime>]
   [-LastConnectionUser <String>]
   [-LastDeregistrationReason <DeregistrationReason>]
   [-LastDeregistrationTime <DateTime>]
   [-LastErrorReason <String>]
   [-LastErrorTime <DateTime>]
   [-LastHostingUpdateTime <DateTime>]
   [-LastPvdErrorReason <String>]
   [-LastPvdErrorTime <DateTime>]
   [-LastRegistrationTime <DateTime>]
   [-LoadIndex <Int32>]
   [-MacAddress <String>]
   [-MachineInternalState <MachineInternalState>]
   [-MachineUnavailableReason <String>]
   [-MaintenanceModeReason <MaintenanceModeReason>]
   [-Metadata <String>]
   [-NameLookupFailureCount <Int32>]
   [-OSType <String>]
   [-OSVersion <String>]
   [-PersistUserChanges <PersistUserChanges>]
   [-PowerActionPending <Boolean>]
   [-PowerState <PowerState>]
   [-ProvisioningType <ProvisioningType>]
   [-PublishedApplication <String>]
   [-PublishedName <String>]
   [-PvdEstimatedCompletionTime <DateTime>]
   [-PvdPercentDone <Int32>]
   [-PvdStage <PvdStage>]
   [-PvdUpdateStartTime <DateTime>]
   [-RegistrationState <RegistrationState>]
   [-ScheduledReboot <ScheduledReboot>]
   [-SecureIcaRequired <Boolean>]
   [-SessionAutonomouslyBrokered <Boolean>]
   [-SessionClientAddress <String>]
   [-SessionClientName <String>]
   [-SessionClientVersion <String>]
   [-SessionConnectedViaHostName <String>]
   [-SessionConnectedViaIP <String>]
   [-SessionCount <Int32>]
   [-SessionDeviceId <String>]
   [-SessionHardwareId <String>]
   [-SessionHidden <Boolean>]
   [-SessionKey <Guid>]
   [-SessionLaunchedViaHostName <String>]
   [-SessionLaunchedViaIP <String>]
   [-SessionProtocol <String>]
   [-SessionSecureIcaActive <Boolean>]
   [-SessionsEstablished <Int32>]
   [-SessionSmartAccessTag <String>]
   [-SessionsPending <Int32>]
   [-SessionStartTime <DateTime>]
   [-SessionState <SessionState>]
   [-SessionStateChangeTime <DateTime>]
   [-SessionSupport <SessionSupport>]
   [-SessionType <SessionType>]
   [-SessionUid <Int64>]
   [-SessionUserName <String>]
   [-SessionUserSID <String>]
   [-SID <String>]
   [-SummaryState <DesktopSummaryState>]
   [-SupportedPowerAction <String>]
   [-Tag <String>]
   [-UUID <Guid>]
   [-VMToolsState <VMToolsState>]
   [-WillShutdownAfterUse <Boolean>]
   [-WillShutdownAfterUseReason <WillShutdownAfterUseReason>]
   [-WindowsConnectionSetting <WindowsConnectionSetting>]
   [-ZoneHealthy <Boolean>]
   [-ZoneName <String>]
   [-ZoneUid <Guid>]
   [-Property <String[]>]
   [-ReturnTotalRecordCount]
   [-MaxRecordCount <Int32>]
   [-Skip <Int32>]
   [-SortBy <String>]
   [-Filter <String>]
   [-FilterScope <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->
Get-BrokerMachine
   [-Uid] <Int32>
   [-Property <String[]>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

Retrieves machines matching the specified criteria. If no parameters are specified, this cmdlet enumerates all machines.

Get-BrokerMachine returns objects that combine machine configuration and state information.

For single-session machines, session information is displayed if present. If “fast user switching” is enabled, more than one session may be present on single-session machines. Because this cmdlet returns information only for a single session, if two sessions are present it will return information about the brokered session (rather than, for example, an unbrokered direct RDP session). If there is no session running, session-related fields return $null.

For multi-session machines, no session information about single sessions is displayed by this cmdlet, and so are always $null. Get-BrokerSession can be used to get information about sessions on both multi-session and single-session machines.

To count machines, rather than retrieve full details of each machine, use Group-BrokerMachine instead.

See about_Broker_Filtering for information about advanced filtering options, and about_Broker_Machines for background information about machines.

————————– BrokerMachine Object

The machine object returned represents a physical or virtual machine, which has been configured in the site.

  • AgentVersion (System.String)

    Version of the Citrix Virtual Delivery Agent (VDA) installed on the machine.

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

    Describes how the machine is allocated to the user, can be Permanent or Random.

  • ApplicationsInUse (System.String[])

    List of applications in use on the machine (in the form of browser name).

  • AssignedClientName (System.String)

    The name of the endpoint client device that the machine has been assigned to.

  • AssignedIPAddress (System.String)

    The IP address of the endpoint client device that the machine has been assigned to.

  • AssignedUserSIDs (System.String[])

    The SIDs of the users that have been assigned to the machine (private machines only).

  • AssociatedTenantId (System.Guid?)

    Tenant associated with the machine. Once a tenant is associated with a machine it can only host sessions for that tenant and no other. Tenant associations are transient and are cleared when the machine’s image is reset.

  • AssociatedUserFullNames (System.String[])

    Full names of the users that have been associated with the machine (usually in the form “Firstname Lastname”). Associated users are the current user(s) for shared machines and the assigned users for private machines.

  • AssociatedUserNames (System.String[])

    Usernames of the users that have been associated with the machine (in the form “domain\user”). Associated users are the current user(s) for shared machines and the assigned users for private machines.

  • AssociatedUserSIDs (System.String[])

    The SIDs of the users that have been associated with the machine. Associated users are the current user(s) for shared machines and the assigned users for private machines.

  • AssociatedUserUPNs (System.String[])

    The User Principal Names of the users associated with the machine (in the form user@domain). Associated users are the current user(s) for shared machines and the assigned users for private machines.

  • AzureADJoinedMode (System.String)

    The type of Azure AD Domain join that took place in VDA. This will be NotAadJoined when the VDA is not Azure AD domain joined.

  • AzureDeviceId (System.String)

    The Azure DeviceId for this worker. Available if the worker is is registered with AzureAD.

  • BrowserName (System.String)

    Site-wide unique name identifying associated desktop to other components (for example StoreFront). This is typically non-null only for machines backing assigned private desktops.

  • Capabilities (System.String[])

    List of the capabilities that the machine supports. Valid capabilities are:

    • MultiSession: Indicates an RDS- (Terminal Services-) based machine, which supports multiple active sessions from different users.
    • CBP1_5: Indicates the machine can use the CBP 1.5 protocol for communication.
  • CatalogName (System.String)

    Name of the catalog the machine is a member of.

  • CatalogUid (System.Int32)

    UID of the catalog the machine is a member of.

  • CatalogUUID (System.Guid)

    UUID of the catalog the machine is a member of.

  • CbpVersion (Citrix.Broker.Admin.SDK.CBPVersion?)

    The version of CBP that the VDA is currently registered with. This will be null when the VDA is not registered.

  • ColorDepth (Citrix.Broker.Admin.SDK.ColorDepth?)

    The color depth setting configured on the machine, possible values are: $null, FourBit, EightBit, SixteenBit, and TwentyFourBit.

  • ControllerDNSName (System.String)

    The DNS host name of the controller that the machine is registered to.

  • DeliveryType (Citrix.Broker.Admin.SDK.DeliveryType?)

    Denotes whether the machine delivers desktops only, apps only or both.

  • Description (System.String)

    Description of the machine.

  • DesktopConditions (System.String[])

    List of outstanding desktop conditions for the machine.

  • DesktopGroupName (System.String)

    Name of the desktop group the machine is a member of.

  • DesktopGroupUid (System.Int32?)

    UID of the desktop group the machine is a member of.

  • DesktopGroupUUID (System.Guid?)

    UUID of the desktop group the machine is a member of.

  • DesktopKind (Citrix.Broker.Admin.SDK.DesktopKind?)

    Deprecated. Denotes whether the machine is private or shared. Use AllocationType instead.

  • DesktopUid (System.Int32?)

    The UID of the associated desktop object.

  • DNSName (System.String)

    The DNS host name of the machine.

  • DrainingUntilShutdown (System.Boolean)

    Flag indicating if this machine is draining and will be shut down after all sessions on the machine have ended. This flag is only ever true on power-managed, multi-session machines. Note: The machine will not shut down if it is in maintenance mode; it will shut down only after it is taken out of maintenance mode.

  • FaultState (Citrix.Broker.Admin.SDK.MachineFaultState)

    Summary state of any current fault state of the machine. Can be one of the following:

    • None - No fault; machine is healthy.
    • FailedToStart - Last power-on operation for machine failed.
    • StuckOnBoot - Machine does not seem to have booted following power on.
    • Unregistered - Machine has failed to register within expected period, or its registration has been rejected.
    • MaxCapacity - Machine is reporting itself at maximum capacity.
  • FunctionalLevel (Citrix.Broker.Admin.SDK.FunctionalLevel?)

    Functional level of the machine, if known.

  • HostedMachineId (System.String)

    Unique ID within the hosting unit of the target managed machine.

  • HostedMachineName (System.String)

    The friendly name of a hosted machine as used by its hypervisor. This is not necessarily the DNS name of the machine.

  • HostingServerName (System.String)

    DNS name of the hypervisor that is hosting the machine if managed.

  • HypervisorConnectionName (System.String)

    The name of the hypervisor connection that the machine has been assigned to, if managed.

  • HypervisorConnectionUid (System.Int32?)

    The UID of the hypervisor connection that the machine’s hosting server is accessed through.

  • HypHypervisorConnectionUid (System.Guid?)

    The UUID of the hypervisor connection that the machine’s hosting server is accessed through

  • IconUid (System.Int32?)

    The UID of the machine’s icon that is displayed in StoreFront.

  • ImageOutOfDate (System.Boolean?)

    Denotes if the VM image for a hosted machine is out of date.

  • InMaintenanceMode (System.Boolean)

    Denotes if the machine is in maintenance mode.

  • IPAddress (System.String)

    The IP address of the machine.

  • IsAssigned (System.Boolean)

    Denotes whether a private desktop has been assigned to a user/users, or a client name/address. Users can be assigned explicitly or by assigning on first use of the machine.

  • IsPhysical (System.Boolean)

    This value is true if the machine is physical (ie not power managed by the Citrix Broker service, and false otherwise.

  • IsReserved (System.Boolean)

    Indicates if machine is reserved for special use, for example for AppDisk preparation. A reserved machine cannot be a member of a desktop group.

  • LastAssignmentTime (System.DateTime?)

    The Datetime of the most recent assignment to a user, client IP address or client name.

  • LastConnectionFailure (Citrix.Broker.Admin.SDK.ConnectionFailureReason)

    The reason for the last failed connection between a client and the machine.

  • LastConnectionTime (System.DateTime?)

    Time of the last detected connection attempt that either failed or succeeded.

  • LastConnectionUser (System.String)

    The SAM name (in the form DOMAIN\user) of the user that last attempted a connection with the machine. If the SAM name is not available, the SID is used.

  • LastDeregistrationReason (Citrix.Broker.Admin.SDK.DeregistrationReason?)

    The reason for the last deregistration of the machine with the broker. Possible values are: AgentShutdown, AgentSuspended, AgentRequested, IncompatibleVersion, AgentAddressResolutionFailed, AgentNotContactable, AgentWrongActiveDirectoryOU, EmptyRegistrationRequest, MissingRegistrationCapabilities, MissingAgentVersion, InconsistentRegistrationCapabilities, NotLicensedForFeature, UnsupportedCredentialSecurityVersion, InvalidRegistrationRequest, SingleMultiSessionMismatch, FunctionalLevelTooLowForCatalog, FunctionalLevelTooLowForDesktopGroup, PowerOff, DesktopRestart, DesktopRemoved, AgentRejectedSettingsUpdate, SendSettingsFailure, SessionAuditFailure, SessionPrepareFailure, ContactLost, SettingsCreationFailure, UnknownError and BrokerRegistrationLimitReached.

  • LastDeregistrationTime (System.DateTime?)

    Time of the last deregistration of the machine from the controller.

  • LastErrorReason (System.String)

    The reason for the last error detected in the machine.

  • LastErrorTime (System.DateTime?)

    The time of the last detected error.

  • LastHostingUpdateTime (System.DateTime?)

    Time of last update to any hosting data (such as power states) or the last completed power action for this machine reported by the hypervisor connection.

  • LastPvdErrorReason (System.String)

    This property is no longer supported.

  • LastPvdErrorTime (System.DateTime?)

    This property is no longer supported.

  • LastRegistrationTime (System.DateTime?)

    Time of last registration of the machine with the controller.

  • LoadIndex (System.Int32?)

    Gives current effective load index for multi-session machines.

  • LoadIndexes (System.String[])

    Gives the last reported individual load indexes that were used in the calculation of the LoadIndex value. Note that the LoadIndex value may have been subsequently adjusted due to session brokering operations. This value is only set for multi-session machines.

  • MacAddress (System.String)

    A string representing the physical address of the network interface corresponding to the IP Address this machine uses to communicate with the Broker.

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

    The internal state of the machine; reported while the machine is registered to a controller, plus some private Citrix Broker Service states while the machine is not registered.

  • MachineName (System.String)

    DNS host name of the machine.

  • MachineUnavailableReason (System.String)

    Reason reported from the VDA showing why it is not yet available for use even though it is registered

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

    The reason why the machine was placed in maintenance mode (if it is in maintenance mode). Possible values are:

    • None - Machine is not in maintenance mode.
    • Administrator - Machine was manually placed in maintenance mode by an administrator.
    • MaxFailedRegistrations - Machine was automatically placed in maintenance mode due to reaching the maximum failed registration limit.
  • MetadataMap (System.Collections.Generic.Dictionary<string, string>)

    Any metadata that is associated with the machine.

  • NameLookupFailureCount (System.Int32)

    Tracks the number of consecutive directory lookup failures for this account

  • OSType (System.String)

    A string that can be used to identify the operating system that is running on the machine.

  • OSVersion (System.String)

    A string that can be used to identify the version of the operating system running on the machine, if known.

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

    Describes if and how user changes are persisted. Possible values are:

    • OnLocal - Persist the user changes on the local disk of the machine.
    • Discard - Discard user changes.
  • PowerActionPending (System.Boolean)

    Indicates if there are any pending power actions for the machine.

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

    The current power state of the machine. Possible values are: Unmanaged, Unknown, Unavailable, Off, On, Suspended, TurningOn, TurningOff, Suspending, resuming.

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

    Describes how the machine was provisioned, possible values are:

    • Manual: No automated provisioning.
    • PVS: Machine provisioned by PVS (may be physical, blade, VM,…)
    • MCS: Machine provisioned by MCS (machine must be VM)
  • PublishedApplications (System.String[])

    List of applications published by the machine (displayed as browser names).

  • PublishedName (System.String)

    The name of the machine that is displayed in StoreFront, if the machine has been published.

  • PvdEstimatedCompletionTime (System.DateTime?)

    This property is no longer supported.

  • PvdPercentDone (System.Int32?)

    This property is no longer supported.

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

    This property is no longer supported.

  • PvdUpdateStartTime (System.DateTime?)

    This property is no longer supported.

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

    Indicates the registration state of the machine. Possible values are: Unregistered, Initializing, Registered, AgentError.

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

    Indicates the state of any scheduled reboot operation for a machine. Possible values:

    • None: No reboot is scheduled.
    • Pending: Machine is awaiting reboot but is available for use.
    • Draining: Machine is awaiting reboot and is unavailable for new sessions; reconnections to existing connections are still allowed, however.
    • InProgress: Machine is actively undergoing a scheduled reboot. o Natural: Natural reboot in progress. Machine is awaiting a restart.
  • SecureIcaRequired (System.Boolean?)

    Flag indicating whether SecureICA is required or not when starting a session on the machine.

  • SessionAutonomouslyBrokered (System.Boolean?)

    Session property indicating if the current session is an HDX session established by direct connection without being brokered. Session properties are always null for multi-session machines.

  • SessionClientAddress (System.String)

    Session property indicating the IP address of the client connected to the machine. Session properties are always null for multi-session machines.

  • SessionClientName (System.String)

    Session property indicating the host name of the client connected to the machine. Session properties are always null for multi-session machines.

  • SessionClientVersion (System.String)

    Session property indicating the version of the Citrix Receiver on the connected client. Session properties are always null for multi-session machines.

  • SessionConnectedViaHostName (System.String)

    Session property indicating the host name of the connection gateway, router or client. Session properties are always null for multi-session machines.

  • SessionConnectedViaIP (System.String)

    Session property indicating the IP address of the connection gateway, router or client. Session properties are always null for multi-session machines.

  • SessionCount (System.Int32)

    Count of number of sessions on the machine.

  • SessionDeviceId (System.String)

    Session property indicating a unique identifier for the client device that has most recently been associated with the current session. Session properties are always null for multi-session machines.

  • SessionHardwareId (System.String)

    Session property indicating a unique identifier for the client hardware that has been most recently associated with the current session. Session properties are always null for multi-session machines.

  • SessionHidden (System.Boolean?)

    Session property that indicates if a session is hidden. Session properties are always null for multi-session machines.

  • SessionKey (System.Guid?)

    Session property indicating the key of the current session. Session properties are always null for multi-session machines.

  • SessionLaunchedViaHostName (System.String)

    Session property that denotes the host name of the StoreFront server used to launch the current brokered session. Session properties are always null for multi-session machines.

  • SessionLaunchedViaIP (System.String)

    Session property that denotes the IP address of the StoreFront server used to launch the current brokered session. Session properties are always null for multi-session machines.

  • SessionProtocol (System.String)

    Session property that denotes the protocol that the current session is using, can be either HDX, RDP or Console. Console sessions on XenDesktop 5 VDAs appear with a blank protocol. Session properties are always null for multi-session machines.

  • SessionSecureIcaActive (System.Boolean?)

    Session property that indicates whether SecureICA is active on the current session or not. Session properties are always null for multi-session machines.

  • SessionsEstablished (System.Int32)

    Number of established sessions on this machine. For multi-session machines this excludes established sessions which have not yet completed their logon processing.

  • SessionSmartAccessTags (System.String[])

    Session property that indicates the Smart Access tags for the current session. Session properties are always null on multi-session machines.

  • SessionsPending (System.Int32)

    Number of pending (brokered but not yet established) sessions on this machine. For multi-session machines this also includes established sessions which have not yet completed their logon processing.

  • SessionStartTime (System.DateTime?)

    Session property that indicates the start time of the current session. Session properties are always null on multi-session machines.

  • SessionState (Citrix.Broker.Admin.SDK.SessionState?)

    Session property indicating the state of the current session, possible values are: Other, PreparingSession, Connected, Active, Disconnected, Reconnecting, NonBrokeredSession and Unknown. Session properties are always null for multi-session machines.

  • SessionStateChangeTime (System.DateTime?)

    Session property indicating the time of the last state change of the current session. Session properties are always null for multi-session machines.

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

    Indicates the session support of the machine. Possible values:

    • SingleSession: Single-session only machine.
    • MultiSession: Multi-session capable machine.
  • SessionType (Citrix.Broker.Admin.SDK.SessionType?)

    Session property indicating the type of the current session. Session properties are always null for multi-session machines.

  • SessionUid (System.Int64?)

    Session property indicating the UID of the current session. Session properties are always null for multi-session machines.

  • SessionUserName (System.String)

    Session property indicates the name of the current session’s user (in the form DOMAIN\user). Session properties are always null for multi-session machines.

  • SessionUserSID (System.String)

    Session property indicates the SID of the current session’s user. Session properties are always null for multi-session machines.

  • SID (System.String)

    The SID of the machine.

  • SummaryState (Citrix.Broker.Admin.SDK.DesktopSummaryState)

    Indicates the overall state of the desktop associated with the machine. The overall state is a result of other more specific states such as session state, registration state and power state. Possible values: Off, Unregistered, Available, Disconnected, InUse, Preparing.

  • SupportedPowerActions (System.String[])

    A list of power actions supported by this machine.

  • Tags (System.String[])

    A list of tags associated with the machine.

  • Uid (System.Int32)

    UID of the machine object.

  • UUID (System.Guid)

    UUID of the machine object.

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

    State of the hypervisor tools present on the VM (if any). Possible values are: NotPresent, Unknown, NotStarted, Running.

  • WillShutdownAfterUse (System.Boolean)

    Flag indicating if this machine is tainted and will be shut down after all sessions on the machine have ended. This flag is only ever true on power-managed, single-session machines. Note: The machine will not shut down if it is in maintenance mode; it will shut down only after it is taken out of maintenance mode.

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

    The reason why the machine will shutdown after use (if it will shutdown after use). Possible values are:

    • None - Machine will not shutdown after use.
    • ResetDiskImage - Machine will shutdown after use to reset its disk image.
    • ScheduledNaturalReboot - Machine will shutdown after use as part of the scheduled natural reboot process.
    • OnDemandNaturalReboot - Machine will shutdown after use as part of an on-demand natural reboot process.
  • WindowsConnectionSetting (Citrix.Broker.Admin.SDK.WindowsConnectionSetting?)

    The logon mode reported by Windows itself (multi-session machines only). For single-session machines the value is always hardwired to LogonEnabled. Possible values are: LogonEnabled, Draining, DrainingUntilRestart and LogonDisabled.

  • ZoneHealthy (System.Boolean?)

    The health state of the zone in which the machine is located.

  • ZoneName (System.String)

    The name of the zone in which the machine is located.

  • ZoneUid (System.Guid)

    The UID of the zone in which the machine is located.

Examples

EXAMPLE 1

These commands return all suspended machines. The second form uses advanced filtering (see about_Broker_Filtering).

Get-BrokerMachine -PowerState Suspended
Get-BrokerMachine -Filter { PowerState -eq 'Suspended' }
<!--NeedCopy-->

EXAMPLE 2

This command returns all machines belonging to the DNS domain mydomain.mycompany.com.

Get-BrokerMachine -DNSName '*.mydomain.mycompany.com'
<!--NeedCopy-->

EXAMPLE 3

This command returns all registered machines running on the specified hypervisor connection.

Get-BrokerMachine -Filter { RegistrationState -eq 'Registered' -and HypervisorConnectionUid -eq 5 }
<!--NeedCopy-->

EXAMPLE 4

This command finds all of the machines in MyDomain with names beginning with X and removes them from the specified desktop group.

Get-BrokerMachine -MachineName 'MyDomain\X*' | Remove-BrokerDesktopGroup 2
<!--NeedCopy-->

EXAMPLE 5

This command gets all desktops in a site. Use this instead of the deprecated Get-BrokerDesktop command.

Get-BrokerMachine -Filter { DesktopGroupUid -ne $null }
<!--NeedCopy-->

Parameters

-Uid

Gets a machine with a specific UID.

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

-MachineName

Gets machines with a specific machine name (in the form domain\machine).

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

-AgentVersion

Gets machines with a specific Citrix Virtual Delivery Agent version.

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

-AllocationType

Gets machines from catalogs with the specified allocation type.

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

-ApplicationInUse

Gets machines running a specified published application (identified by browser name).

String comparisons are case-insensitive.

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

-AssignedClientName

Gets machines that have been assigned to the specific client name.

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

-AssignedIPAddress

Gets machines that have been assigned to the specific IP address.

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

-AssignedUserSID

Gets machines with the specific SID of the user to whom the desktop is assigned.

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

-AssociatedTenantId

Gets machines associated with the specified tenant.

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

-AssociatedUserFullName

Gets machines with an associated user identified by their full name (usually ‘first-name last-name’).

Associated users are all current users of a desktop, plus the assigned users for private desktops.

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

-AssociatedUserName

Gets machines with an associated user identified by their user name (in the form ‘domain\user’).

Associated users are all current users of a desktop, plus the assigned users for private desktops.

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

-AssociatedUserSID

Gets machines with an associated user identified by their Windows SID.

Associated users are all current users of a desktop, plus the assigned users for private desktops.

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

-AssociatedUserUPN

Gets machines with an associated user identified by their User Principle Name (in the form ‘user@domain’).

Associated users are all current users of a desktop, plus the assigned users for private desktops.

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

-AzureADJoinedMode

Gets machines with a specific Azure AD Domain Join Type

  • NotAadJoined - Machine not joined to Azure AD yet.
  • HybridAadJoined - Machine was Hybrid Aad joined.
  • PureAadJoined - Machine was Pure Aad joined.
Type: String
Accepted values: HybridAadJoined, NotAadJoined, PureAadJoined
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-AzureDeviceId

Gets machines with matching Azure DeviceId.

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

-BrowserName

Gets assigned machines backing desktop resources that have browser names matching the specified name.

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

-CatalogName

Gets machines from the catalog with the specific name.

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

-CatalogUid

Gets machines from the catalog with the specific UID.

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

-CatalogUUID

Gets machines from the catalog with the specific UUID.

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

-CbpVersion

The version of CBP that the VDA is currently registered with. This will be null when the VDA is not registered.

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

-ColorDepth

Gets machines configured with a specific color depth.

Valid values are FourBit, EightBit, SixteenBit, and TwentyFourBit.

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

-ControllerDNSName

Gets machines with a specific DNS name of the controller they are registered with.

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

-DeliveryType

Gets machines of a particular delivery type.

Valid values are AppsOnly, DesktopsOnly, DesktopsAndApps

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

-Description

Gets machines with a specific description.

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

-DesktopCondition

Gets machines with an outstanding desktop condition.

Valid values are:

  • CPU: Indicates the machine has high CPU usage
  • ICALatency: Indicates the network latency is high
  • UPMLogonTime: Indicates that the profile load time was high
Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: True

-DesktopGroupName

Gets machines from a desktop group with the specified name.

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

-DesktopGroupUid

Gets machines from a desktop group with a specific UID.

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

-DesktopGroupUUID

Gets machines from a desktop group with a specific UUID.

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

-DesktopKind

Deprecated: Use AllocationType parameter.

Gets machines of a particular kind.

Valid values are Private, Shared.

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

-DesktopUid

Gets the machine that corresponds to the desktop with the specific UID.

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

-DNSName

Gets machines with the specific DNS name.

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

-DrainingUntilShutdown

Gets machines depending on whether they are draining until shutdown or not.

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

-FaultState

Gets machines currently in the specified fault state.

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

-FunctionalLevel

Gets machines with a specific FunctionalLevel.

Valid values are L5, L7, L7_6, L7_7, L7_8, L7_9, L7_20, L7_25

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

-HostedMachineId

Gets machines with the specific machine ID known to the hypervisor.

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

-HostedMachineName

Gets machines with the specific machine name known to the hypervisor.

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

-HostingServerName

Gets machines by the name of the hosting hypervisor server.

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

-HypervisorConnectionName

Gets machines with the specific name of the hypervisor connection hosting them.

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

-HypervisorConnectionUid

Gets machines with the specific UID of the hypervisor connection hosting them.

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

-HypHypervisorConnectionUid

Gets machines with the specific UUID of the hypervisor connection hosting them.

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

-IconUid

Gets machines by configured icon. Note that machines with a null IconUid use the icon of the desktop group.

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

-ImageOutOfDate

Gets machines depending on whether their disk image is out of date or not (for machines provisioned using MCS only).

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

-InMaintenanceMode

Gets machines by whether they are in maintenance mode or not.

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

-IPAddress

Gets machines with a specific IP address.

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

-IsAssigned

Gets machines according to whether they are assigned or not. Machines may be assigned to one or more users or groups, a client IP address or a client endpoint name.

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

-IsPhysical

Gets machines according to whether they can be power managed by XenDesktop or not.

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

-IsReserved

Gets machines that are reserved for special use, for example, for AppDisk preparation.

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

-LastAssignmentTime

Gets machines with the specific LastAssignmentTime.

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

-LastConnectionFailure

Gets machines with a specific reason for the last recorded connection failure. This value is None if the last connection was successful or if there has been no attempt to connect to the desktop yet.

Valid values are None, SessionPreparation, RegistrationTimeout, ConnectionTimeout, Licensing, Ticketing, and Other.

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

-LastConnectionTime

Gets machines on which a user session connection occurred at a specific time. This is the time at which the broker detected that the connection attempt either succeeded or failed.

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

-LastConnectionUser

Gets machines where a specific user name last attempted a connection (in the form ‘domain\user’).

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

-LastDeregistrationReason

Gets machines whose broker last recorded a specific deregistration reason.

Valid values are $null, AgentShutdown, AgentSuspended, AgentRequested, IncompatibleVersion, AgentAddressResolutionFailed, AgentNotContactable, AgentWrongActiveDirectoryOU, EmptyRegistrationRequest, MissingRegistrationCapabilities, MissingAgentVersion, InconsistentRegistrationCapabilities, NotLicensedForFeature, UnsupportedCredentialSecurityVersion, InvalidRegistrationRequest, SingleMultiSessionMismatch, FunctionalLevelTooLowForCatalog, FunctionalLevelTooLowForDesktopGroup, PowerOff, DesktopRestart, DesktopRemoved, AgentRejectedSettingsUpdate, SendSettingsFailure, SessionAuditFailure, SessionPrepareFailure, ContactLost, SettingsCreationFailure, UnknownError and BrokerRegistrationLimitReached.

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

-LastDeregistrationTime

Gets machines by the time that they were last deregistered.

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

-LastErrorReason

Gets machines with the specified last error reason.

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

-LastErrorTime

Gets machines with the specified last error time.

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

-LastHostingUpdateTime

Gets machines with a specific time that the hosting information was last updated or the completion of the last power action.

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

-LastPvdErrorReason

This property is no longer supported.

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

-LastPvdErrorTime

This property is no longer supported.

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

-LastRegistrationTime

Gets machines by the time that they last registered.

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

-LoadIndex

Gets machines by their current load index.

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

-MacAddress

Gets machines with a specific MAC address.

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

-MachineInternalState

Gets machines with the specified internal state.

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

-MachineUnavailableReason

Gets machines that corresponds to a particular MachineUnavailable Reason

  • None - No detailed reason specified.
  • LoadManagementInitializing - VDA load management logic currently initialising. Only occurs for multi-session capable VDAs.
  • GctConnectionInitializing - VDA is still initializing control connection with NGS.
  • AzureADJoinInitializing - VDA is still initializing Aad domain join.
Type: String
Accepted values: AzureADJoinInitializing, CtxUviDisabled, GctConnectionInitializing, IntuneEnrollPending, LoadManagementInitializing, None, PvdFailed, PvdInitializing
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-MaintenanceModeReason

Gets machines by the maintenance mode reason. Valid values are:

  • None - Machine is not in maintenance mode.
  • Administrator - Machine was manually placed in maintenance mode

    by an administrator.

  • MaxFailedRegistrations - Machine was automatically placed in

    maintenance mode due to reaching the maximum failed registration limit.

Type: MaintenanceModeReason
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

-NameLookupFailureCount

Tracks the number of consecutive directory lookup failures for this account.

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

-OSType

Gets machines by the type of operating system they are running.

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

-OSVersion

Gets machines by the version of the operating system they are running.

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

-PersistUserChanges

Gets machines by the location where the user changes are persisted.

  • OnLocal - User changes are persisted locally.
  • Discard - User changes are discarded.
Type: PersistUserChanges
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-PowerActionPending

Gets machines depending on whether a power action is pending or not.

Valid values are $true or $false.

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

-PowerState

Gets machines with a specific power state.

Valid values are Unmanaged, Unknown, Unavailable, Off, On, Suspended, TurningOn, TurningOff, Suspending, and Resuming.

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

-ProvisioningType

Gets machines that are in a catalog with a particular provisioning type. Values can be:

  • Manual - No provisioning.
  • PVS - Machine provisioned by PVS (machine may be physical,

blade, VM,…).

  • MCS - Machine provisioned by MCS (machine must be VM).
Type: ProvisioningType
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-PublishedApplication

Gets machines with a specific application published to them (identified by its browser name).

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

-PublishedName

Gets desktops with a specific published name.

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

-PvdEstimatedCompletionTime

This property is no longer supported.

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

-PvdPercentDone

This property is no longer supported.

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

-PvdStage

This property is no longer supported.

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

-PvdUpdateStartTime

This property is no longer supported.

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

-RegistrationState

Gets machines in a specific registration state.

Valid values are Unregistered, Initializing, Registered, and AgentError.

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

-ScheduledReboot

Gets machines according to their current status with respect to any scheduled reboots (for either scheduled desktop group reboots or image rollout purposes). Valid values are:

  • None - No reboot currently scheduled.
  • Pending - Reboot scheduled but machine still available for use.
  • Draining - Reboot scheduled. New logons are disabled, but

    reconnections to existing sessions are allowed.

  • InProgress - Machine is actively being rebooted.
  • Natural - Natural reboot in progress. Machine is awaiting a restart.
Type: ScheduledReboot
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SecureIcaRequired

Gets machines configured with a particular SecureIcaRequired setting. Note that the machine setting of $null indicates that the desktop group value is used.

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

-SessionAutonomouslyBrokered

Gets machines according to whether their current session is autonomously brokered or not. Autonomously brokered sessions are HDX sessions established by direct connection without being brokered.

Session properties are always null for multi-session machines.

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

-SessionClientAddress

Gets machines with a specific client IP address.

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

-SessionClientName

Gets machines with a specific client name.

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

-SessionClientVersion

Gets machines with a specific client version.

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

-SessionConnectedViaHostName

Gets machines with a specific incoming connection host name. This is usually a proxy or Citrix Access Gateway server.

Session properties are always null for multi-session machines.

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

-SessionConnectedViaIP

Gets machines with a specific incoming connection IP address.

Session properties are always null for multi-session machines.

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

-SessionCount

Gets machines according to the total number of both pending and established user sessions on the machine.

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

-SessionDeviceId

Gets machines with a specific client device ID.

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

-SessionHardwareId

Gets machines with a specific client hardware ID.

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

-SessionHidden

Gets machines depending on whether their sessions are hidden or not. Hidden sessions are treated as though they do not exist when launching sessions using XenDesktop; a hidden session cannot be reconnected to, but a new session may be launched using the same entitlement.

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

-SessionKey

Gets machine running the session with a specified unique key.

Session properties are always null for multi-session machines.

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

-SessionLaunchedViaHostName

Gets machines with a specific host name of the StoreFront server from which the user launched the session.

Session properties are always null for multi-session machines.

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

-SessionLaunchedViaIP

Gets machines with a specific IP address of the StoreFront server from which the user launched the session.

Session properties are always null for multi-session machines.

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

-SessionProtocol

Gets machines with connections using a specific protocol, for example HDX, RDP, or Console.

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

-SessionSecureIcaActive

Gets machines depending on whether the current session uses SecureICA or not.

Session properties are always null for multi-session machines.

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

-SessionsEstablished

Gets machines according to the number of established user sessions present on the machine.

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

-SessionSmartAccessTag

Gets machines where the session has the specific SmartAccess tag.

Session properties are always null for multi-session machines.

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

-SessionsPending

Get machines according to the number of pending user sessions for the machine.

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

-SessionStartTime

Gets machines with a specific session start time.

Session properties are always null for multi-session machines.

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

-SessionState

Gets machines with a specific session state.

Valid values are $null, Other, PreparingSession, Connected, Active, Disconnected, Reconnecting, NonBrokeredSession, and Unknown.

Session properties are always null for multi-session machines.

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

-SessionStateChangeTime

Gets machines whose sessions last changed state at a specific time.

Session properties are always null for multi-session machines.

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

-SessionSupport

Gets machines that have the specified session capability. Values can be:

  • SingleSession - Single-session only machine.
  • MultiSession - Multi-session capable machine.
Type: SessionSupport
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SessionType

Gets machines with a specific session state.

Session properties are always null for multi-session machines.

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

-SessionUid

Gets machines with a specific session UID ($null for no session).

Session properties are always null for multi-session machines.

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

-SessionUserName

Gets machines with a specific user name for the current session (in the form ‘domain\user’).

Session properties are always null for multi-session machines.

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

-SessionUserSID

Gets machines with a specific SID of the current session user.

Session properties are always null for multi-session machines.

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

-SID

Gets machines with a specific machine SID.

Session properties are always null for multi-session machines.

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

-SummaryState

Gets machines with a specific summary state.

Valid values are Off, Unregistered, Available, Disconnected, and InUse.

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

-SupportedPowerAction

Gets machines that support the specified power action.

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

-Tag

Gets machines associated with the specified tag.

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

-UUID

Gets machines with the specified value of UUID.

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

-VMToolsState

Gets machines with a specific VM tools state.

Valid values are NotPresent, Unknown, NotStarted, and Running.

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

-WillShutdownAfterUse

Gets machines depending on whether they shut down after use or not.

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

-WillShutdownAfterUseReason

Gets machines by the will shutdown after use reason. Valid values are:

  • None - Machine will not shutdown after use.
  • ResetDiskImage - Machine will shutdown after use to reset its disk image.
  • ScheduledNaturalReboot - Machine will shutdown after use as part of the scheduled natural reboot process.
  • OnDemandNaturalReboot - Machine will shutdown after use as part of an on-demand natural reboot process.
Type: WillShutdownAfterUseReason
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-WindowsConnectionSetting

Gets machines according to their current Windows connection setting (logon mode). Valid values are:

  • LogonEnabled - All logons are enabled.
  • Draining - New logons are disabled, but reconnections to existing

    sessions are allowed.

  • DrainingUntilRestart - Same as Draining, but setting reverts to

    LogonEnabled when machine next restarts.

  • LogonDisabled - All logons and reconnections are disabled.

This is a Windows setting and is not controlled by XenDesktop. It applies only to multi-session machines; for single-session machines its value is always LogonEnabled.

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

-ZoneHealthy

Gets machines located in the zone with the specified health state.

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

-ZoneName

Gets machines located in the zone with the specified name.

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

-ZoneUid

Gets machines located in the zone with the specified UID.

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

This cmdlet supports the common Citrix parameters: -AdminAddress, -AdminClientIP, -BearerToken, -TraceParent, -TraceState and -VirtualSiteId. For more information, see about_CitrixCommonParameters.

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.Machine

Get-BrokerMachine returns an object for each matching desktop.

Notes

It is generally better to compare dates and times using -Filter and relative comparisons. See about_Broker_Filtering and the examples in this topic for more information.

Get-BrokerMachine