Product Documentation

Get-BrokerMachine

Nov 06, 2015

Gets machines belonging to this site.

Syntax

Get-BrokerMachine [-Uid] <Int32> [-Property <String[]>] [-AdminAddress <String>] [<CommonParameters>]

Get-BrokerMachine [[-MachineName] <String>] [-AgentVersion <String>] [-AllocationType <AllocationType>] [-ApplicationInUse <String>] [-AssignedClientName <String>] [-AssignedIPAddress <String>] [-AssociatedUserFullName <String>] [-AssociatedUserName <String>] [-AssociatedUserSID <String>] [-AssociatedUserUPN <String>] [-CatalogName <String>] [-CatalogUid <Int32>] [-CatalogUUID <Guid>] [-ColorDepth <ColorDepth>] [-ControllerDNSName <String>] [-DeliveryType <DeliveryType>] [-Description <String>] [-DesktopCondition <String>] [-DesktopGroupName <String>] [-DesktopGroupUid <Int32>] [-DesktopGroupUUID <Guid>] [-DesktopKind <DesktopKind>] [-DesktopUid <Int32>] [-DNSName <String>] [-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>] [-LastConnectionFailure <ConnectionFailureReason>] [-LastConnectionTime <DateTime>] [-LastConnectionUser <String>] [-LastDeregistrationReason <DeregistrationReason>] [-LastDeregistrationTime <DateTime>] [-LastErrorReason <String>] [-LastErrorTime <DateTime>] [-LastHostingUpdateTime <DateTime>] [-LoadIndex <Int32>] [-MachineInternalState <MachineInternalState>] [-Metadata <String>] [-OSType <String>] [-OSVersion <String>] [-PersistUserChanges <PersistUserChanges>] [-PowerActionPending <Boolean>] [-PowerState <PowerState>] [-ProvisioningType <ProvisioningType>] [-PublishedApplication <String>] [-PublishedName <String>] [-PvdStage <PvdStage>] [-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>] [-SessionUid <Int64>] [-SessionUserName <String>] [-SessionUserSID <String>] [-SID <String>] [-SummaryState <DesktopSummaryState>] [-SupportedPowerActions <String[]>] [-Tag <String>] [-UUID <Guid>] [-VMToolsState <VMToolsState>] [-WillShutdownAfterUse <Boolean>] [-WindowsConnectionSetting <WindowsConnectionSetting>] [-AssignedUserSID <String>] [-ReturnTotalRecordCount] [-MaxRecordCount <Int32>] [-Skip <Int32>] [-SortBy <String>] [-Filter <String>] [-Property <String[]>] [-AdminAddress <String>] [<CommonParameters>]

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

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

-- Capabilities (System.String[])

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

o MultiSession: Indicates an RDS- (Terminal Services-) based machine, which supports multiple active sessions from different users.

o CBP1_5: Indicates the machine uses 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.

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

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

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

o None - No fault; machine is healthy.

o FailedToStart - Last power-on operation for machine failed.

o StuckOnBoot - Machine does not seem to have booted following power on.

o Unregistered - Machine has failed to register within expected period, or its registration has been rejected.

o 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 machines'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.

-- 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) for this machine reported by the hypervisor connection.

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

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

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

Any metadata that is associated with the machine.

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

o OnLocal - Persist the user changes on the local disk of the machine.

o Discard - Discard user changes.

o OnPvd - Persist user changes on the Citrix Personal vDisk.

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

o Manual: No automated provisioning.

o PVS: Machine provisioned by PVS (may be physical, blade, VM,...)

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

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

For a machine supporting Personal vDisk technology (PvD), indicates the stage of the PvD image preparation.

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

o None: No reboot is scheduled.

o Pending: Machine is awaiting reboot but is available for use.

o Draining: Machine is awaiting reboot and is unavailable for new sessions; reconnections to existing connections are still allowed, however.

o 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 was started without the use of the broker.

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 host name of the client connected to the machine.

Session properties are always null for multi-session machine.

-- 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-sesison machines.

-- SessionHidden (System.Boolean?)

Session parameter that indicates if a session is hidden.

Session parameters 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" or "RDP".

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:

o SingleSession: Single-session only machine.

o MultiSession: Multi-session capable machine.

-- 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 sessions' 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 sessions' 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 for 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.

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

Related topics

Group-BrokerMachine

Parameters

-Uid<Int32>

Gets a machine with a specific UID.

Required? true
Default Value  
Accept Pipeline Input? false

-MachineName<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-AgentVersion<String>

Gets machines with a specific Citrix Virtual Delivery Agent version.

Required? false
Default Value  
Accept Pipeline Input? false

-AllocationType<AllocationType>

Gets machines from catalogs with the specified allocation type.

Required? false
Default Value  
Accept Pipeline Input? false

-ApplicationInUse<String>

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

String comparisons are case-insensitive.

Required? false
Default Value  
Accept Pipeline Input? false

-AssignedClientName<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-AssignedIPAddress<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-AssociatedUserFullName<String>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-AssociatedUserName<String>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-AssociatedUserSID<String>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-AssociatedUserUPN<String>

Gets machiness 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.

Required? false
Default Value  
Accept Pipeline Input? false

-CatalogName<String>

Gets machines from the catalog with the specific name.

Required? false
Default Value  
Accept Pipeline Input? false

-CatalogUid<Int32>

Gets machines from the catalog with the specific UID.

Required? false
Default Value  
Accept Pipeline Input? false

-CatalogUUID<Guid>

Gets machines from the catalog with the specific UUID.

Required? false
Default Value  
Accept Pipeline Input? false

-ColorDepth<ColorDepth>

Gets machines configured with a specific color depth.

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

Required? false
Default Value  
Accept Pipeline Input? false

-ControllerDNSName<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-DeliveryType<DeliveryType>

Gets machines of a particular delivery type.

Valid values are AppsOnly, DesktopsOnly, DesktopsAndApps

Required? false
Default Value  
Accept Pipeline Input? false

-Description<String>

Gets machines with a specific description.

Required? false
Default Value  
Accept Pipeline Input? false

-DesktopCondition<String>

Gets machines with an outstanding desktop condition.

Valid values are:

o CPU: Indicates the machine has high CPU usage

o ICALatency: Indicates the network latency is high

o UPMLogonTime: Indicates that the profile load time was high

Required? false
Default Value  
Accept Pipeline Input? false

-DesktopGroupName<String>

Gets machines from a desktop group with the specified name.

Required? false
Default Value  
Accept Pipeline Input? false

-DesktopGroupUid<Int32>

Gets machines from a desktop group with a specific UID.

Required? false
Default Value  
Accept Pipeline Input? false

-DesktopGroupUUID<Guid>

Gets machines from a desktop group with a specific UUID.

Required? false
Default Value  
Accept Pipeline Input? false

-DesktopKind<DesktopKind>

Deprecated: Use AllocationType parameter.

Gets machines of a particular kind.

Valid values are Private, Shared.

Required? false
Default Value  
Accept Pipeline Input? false

-DesktopUid<Int32>

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

Required? false
Default Value  
Accept Pipeline Input? false

-DNSName<String>

Gets machines with the specific DNS name.

Required? false
Default Value  
Accept Pipeline Input? false

-FaultState<MachineFaultState>

Gets machines currently in the specified fault state.

Required? false
Default Value  
Accept Pipeline Input? false

-FunctionalLevel<FunctionalLevel>

Gets machines with a specific FunctionalLevel.

Valid values are L5, L7

Required? false
Default Value  
Accept Pipeline Input? false

-HostedMachineId<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-HostedMachineName<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-HostingServerName<String>

Gets machines by the name of the hosting hypervisor server.

Required? false
Default Value  
Accept Pipeline Input? false

-HypervisorConnectionName<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-HypervisorConnectionUid<Int32>

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

Required? false
Default Value  
Accept Pipeline Input? false

-HypHypervisorConnectionUid<Guid>

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

Required? false
Default Value  
Accept Pipeline Input? false

-IconUid<Int32>

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

Required? false
Default Value  
Accept Pipeline Input? false

-ImageOutOfDate<Boolean>

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

Required? false
Default Value  
Accept Pipeline Input? false

-InMaintenanceMode<Boolean>

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

Required? false
Default Value  
Accept Pipeline Input? false

-IPAddress<String>

Gets machines with a specific IP address.

Required? false
Default Value  
Accept Pipeline Input? false

-IsAssigned<Boolean>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-IsPhysical<Boolean>

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

Required? false
Default Value  
Accept Pipeline Input? false

-LastConnectionFailure<ConnectionFailureReason>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-LastConnectionTime<DateTime>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-LastConnectionUser<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-LastDeregistrationReason<DeregistrationReason>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-LastDeregistrationTime<DateTime>

Gets machines by the time that they were last deregistered.

Required? false
Default Value  
Accept Pipeline Input? false

-LastErrorReason<String>

Gets machines with the specified last error reason.

Required? false
Default Value  
Accept Pipeline Input? false

-LastErrorTime<DateTime>

Gets machines with the specified last error time.

Required? false
Default Value  
Accept Pipeline Input? false

-LastHostingUpdateTime<DateTime>

Gets machines with a specific time that the hosting information was last updated.

Required? false
Default Value  
Accept Pipeline Input? false

-LoadIndex<Int32>

Gets machines by their current load index.

Required? false
Default Value  
Accept Pipeline Input? false

-MachineInternalState<MachineInternalState>

Gets machines with the specified internal state.

Required? false
Default Value  
Accept Pipeline Input? false

-Metadata<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-OSType<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-OSVersion<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-PersistUserChanges<PersistUserChanges>

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

o OnLocal - User changes are persisted locally.

o Discard - User changes are discarded.

o OnPvd - User changes are persisted on the Pvd.

Required? false
Default Value  
Accept Pipeline Input? false

-PowerActionPending<Boolean>

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

Valid values are $true or $false.

Required? false
Default Value  
Accept Pipeline Input? false

-PowerState<PowerState>

Gets machines with a specific power state.

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

Required? false
Default Value  
Accept Pipeline Input? false

-ProvisioningType<ProvisioningType>

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

o Manual - No provisioning.

o PVS - Machine provisioned by PVS (machine may be physical, blade, VM,...).

o MCS - Machine provisioned by MCS (machine must be VM).

Required? false
Default Value  
Accept Pipeline Input? false

-PublishedApplication<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-PublishedName<String>

Gets desktops with a specific published name.

Required? false
Default Value  
Accept Pipeline Input? false

-PvdStage<PvdStage>

Gets machines at a specific personal vDisk stage.

Valid values are None, Requested, PoweringOn and Working.

Required? false
Default Value  
Accept Pipeline Input? false

-RegistrationState<RegistrationState>

Gets machines in a specific registration state.

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

Required? false
Default Value  
Accept Pipeline Input? false

-ScheduledReboot<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:

o None - No reboot currently scheduled.

o Pending - Reboot scheduled but machine still available for use.

o Draining - Reboot scheduled. New logons are disabled, but reconnections to existing sessions are allowed.

o InProgress - Machine is actively being rebooted. o Natural - Natural reboot in progress. Machine is awaiting a restart.

Required? false
Default Value  
Accept Pipeline Input? false

-SecureIcaRequired<Boolean>

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

Required? false
Default Value  
Accept Pipeline Input? false

-SessionAutonomouslyBrokered<Boolean>

Gets machines with the autonomously brokered session flag.

Session properties are always $null for multi-session machines.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionClientAddress<String>

Gets machines with a specific client IP address.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionClientName<String>

Gets machines with a specific client name.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionClientVersion<String>

Gets machines with a specific client version.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionConnectedViaHostName<String>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionConnectedViaIP<String>

Gets machines with a specific incoming connection IP address.

Session properties are always null for multi-session machines.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionCount<Int32>

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

Required? false
Default Value  
Accept Pipeline Input? false

-SessionDeviceId<String>

Gets machines with a specific client device ID.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionHardwareId<String>

Gets machines with a specific client hardware ID.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionHidden<Boolean>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionKey<Guid>

Gets machine running the session with a specified unique key.

Session properties are always null for multi-session machines.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionLaunchedViaHostName<String>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionLaunchedViaIP<String>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionProtocol<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-SessionSecureIcaActive<Boolean>

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

Session properties are always null for multi-session machines.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionsEstablished<Int32>

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

Required? false
Default Value  
Accept Pipeline Input? false

-SessionSmartAccessTag<String>

Gets machines where the session has the specific SmartAccess tag.

Session properties are always $null for multi-session machines.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionsPending<Int32>

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

Required? false
Default Value  
Accept Pipeline Input? false

-SessionStartTime<DateTime>

Gets machines with a specific session start time.

Session properties are always null for multi-session machines.

Required? false
Default Value  
Accept Pipeline Input? false

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

Required? false
Default Value  
Accept Pipeline Input? false

-SessionStateChangeTime<DateTime>

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

Session properties are always null for multi-session machines.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionSupport<SessionSupport>

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

o SingleSession - Single-session only machine.

o MultiSession - Multi-session capable machine.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionUid<Int64>

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

Session properties are always $null for multi-session machines.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionUserName<String>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-SessionUserSID<String>

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

Session properties are always $null for multi-session machines.

Required? false
Default Value  
Accept Pipeline Input? false

-SID<String>

Gets machines with a specific machine SID.

Session properties are always null for multi-session machines.

Required? false
Default Value  
Accept Pipeline Input? false

-SummaryState<DesktopSummaryState>

Gets machines with a specific summary state.

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

Required? false
Default Value  
Accept Pipeline Input? false

-SupportedPowerActions<String[]>

A list of power actions supported by this machine.

Required? false
Default Value  
Accept Pipeline Input? false

-Tag<String>

Gets machines where the session has the given SmartAccess tag.

Required? false
Default Value  
Accept Pipeline Input? false

-UUID<Guid>

Gets machines with the specified value of UUID.

Required? false
Default Value  
Accept Pipeline Input? false

-VMToolsState<VMToolsState>

Gets machines with a specific VM tools state.

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

Required? false
Default Value  
Accept Pipeline Input? false

-WillShutdownAfterUse<Boolean>

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

Required? false
Default Value  
Accept Pipeline Input? false

-WindowsConnectionSetting<WindowsConnectionSetting>

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

o LogonEnabled - All logons are enabled.

o Draining - New logons are disabled, but reconnections to existing sessions are allowed.

o DrainingUntilRestart - Same as Draining, but setting reverts to LogonEnabled when machine next restarts.

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

Required? false
Default Value  
Accept Pipeline Input? false

-AssignedUserSID<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-ReturnTotalRecordCount<SwitchParameter>

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.

Required? false
Default Value False
Accept Pipeline Input? false

-MaxRecordCount<Int32>

Specifies the maximum number of records to return.

Required? false
Default Value 250
Accept Pipeline Input? false

-Skip<Int32>

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

Required? false
Default Value 0
Accept Pipeline Input? false

-SortBy<String>

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.

Required? false
Default Value The default sort order is by name or unique identifier.
Accept Pipeline Input? false

-Filter<String>

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

Required? false
Default Value  
Accept Pipeline Input? false

-Property<String[]>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-AdminAddress<String>

Specifies the address of a XenDesktop controller that the PowerShell snapin will connect to. This can be provided as a host name or an IP address.

Required? false
Default Value Localhost. Once a value is provided by any cmdlet, this value will become the default.
Accept Pipeline Input? false

Input Type

None You cannot pipe input into this cmdlet.

Return Values

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.

Examples

-------------------------- EXAMPLE 1 --------------------------

C:\PS> Get-BrokerMachine -PowerState Suspended 
C:\PS> Get-BrokerMachine -Filter { PowerState -eq 'Suspended' }

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

-------------------------- EXAMPLE 2 --------------------------

C:\PS> Get-BrokerMachine -DNSName '*.mydomain.mycompany.com'

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

-------------------------- EXAMPLE 3 --------------------------

C:\PS> Get-BrokerMachine -Filter { RegistrationState -eq 'Registered' -and HypervisorConnectionUid -eq 5 }

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

-------------------------- EXAMPLE 4 --------------------------

C:\PS> Get-BrokerMachine -MachineName 'MyDomain\X*' | Remove-BrokerDesktopGroup -DesktopGroup 2

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

-------------------------- EXAMPLE 5 --------------------------

C:\PS> Get-BrokerMachine -Filter { DesktopGroupUid -ne $null }

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