Citrix Virtual Apps and Desktops 2411 SDK

Get-BrokerPrivateDesktop

Get private desktops configured for this site.

Syntax

Get-BrokerPrivateDesktop
   [[-MachineName] <String>]
   [-AgentVersion <String>]
   [-AssignedClientName <String>]
   [-AssignedIPAddress <String>]
   [-ColorDepth <ColorDepth>]
   [-ControllerDNSName <String>]
   [-Description <String>]
   [-DesktopGroupUid <Int32>]
   [-DNSName <String>]
   [-HostedMachineId <String>]
   [-HostedMachineName <String>]
   [-HostingServerName <String>]
   [-HypervisorConnectionUid <Int32>]
   [-IconUid <Int32>]
   [-InMaintenanceMode <Boolean>]
   [-IPAddress <String>]
   [-IsAssigned <Boolean>]
   [-LastDeregistrationReason <DeregistrationReason>]
   [-LastDeregistrationTime <DateTime>]
   [-LastHostingUpdateTime <DateTime>]
   [-OSType <String>]
   [-OSVersion <String>]
   [-PowerState <PowerState>]
   [-PublishedName <String>]
   [-RegistrationState <RegistrationState>]
   [-SecureIcaRequired <Boolean>]
   [-SID <String>]
   [-Tag <String>]
   [-WillShutdownAfterUse <Boolean>]
   [-AssignedUserSID <String>]
   [-Property <String[]>]
   [-ReturnTotalRecordCount]
   [-MaxRecordCount <Int32>]
   [-Skip <Int32>]
   [-SortBy <String>]
   [-Filter <String>]
   [-FilterScope <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->
Get-BrokerPrivateDesktop
   [-Uid] <Int32>
   [-Property <String[]>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

This cmdlet is deprecated, please use the Get-BrokerMachine cmdlet instead.

Retrieve private desktops matching the specified criteria. If no parameters are specified, this cmdlet enumerates all private desktops.

Get-BrokerPrivateDesktop returns configuration information only for private desktops (a DesktopKind of ‘Private’). For more state information about desktops, or other types of desktop, use the Get-BrokerMachine cmdlet instead.

For information about advanced filtering options, see about_Broker_Filtering; for more information about desktops, see about_Broker_Desktops.

————————– BrokerPrivateDesktop Object

Private desktops are machines that have been configured with a DesktopKind of ‘Private’. They are allocated to either a user/users or a client name/address (but cannot be allocated to both).

  • AgentVersion (System.String)

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

  • AssignedClientName (System.String)

    Client name the desktop has been assigned to.

  • AssignedIPAddress (System.String)

    IP Address the desktop has been assigned to.

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

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

  • ControllerDNSName (System.String)

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

  • Description (System.String)

    Description of the private desktop.

  • DesktopGroupUid (System.Int32)

    Uid of the desktop group the desktop has been assigned to.

  • DNSName (System.String)

    The DNS host name of the desktop.

  • HostedMachineId (System.String)

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

  • HostedMachineName (System.String)

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

  • HostingServerName (System.String)

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

  • HypervisorConnectionUid (System.Int32?)

    The UID of the hypervisor connection that the desktop has been assigned to, if managed.

  • IconUid (System.Int32?)

    The UID of the desktop’s icon that is displayed in StoreFront. If this is $null then the desktop will use the icon specified by the desktop group.

  • InMaintenanceMode (System.Boolean)

    Denotes whether the desktop is in maintentance mode.

  • IPAddress (System.String)

    The IP address of the desktop.

  • IsAssigned (System.Boolean)

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

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

    The reason for the last deregistration of the desktop 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 desktop from the controller.

  • LastHostingUpdateTime (System.DateTime?)

    Time of last update to any hosting data for this desktop reported by the hypervisor connection.

  • MachineName (System.String)

    DNS host name of the machine associated with the desktop.

  • OSType (System.String)

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

  • OSVersion (System.String)

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

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

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

  • PublishedName (System.String)

    The name of the desktop that is displayed in StoreFront, if the desktop is published.

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

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

  • SecureIcaRequired (System.Boolean?)

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

  • SID (System.String)

    Security identifier of the private desktop.

  • Uid (System.Int32)

    Unique identifier of the private desktop.

  • WillShutdownAfterUse (System.Boolean)

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

Examples

EXAMPLE 1

Get all private desktops that are turned on, or are turning on (assuming unmanaged desktops are powered on).

$list = 'Unmanaged','On','TurningOn','Resuming'
Get-BrokerPrivateDesktop -Filter { PowerState -in $list } | ft -a DNSName,PowerState
<!--NeedCopy-->

EXAMPLE 2

Retrieve all private desktops tagged with the ‘TestTag’ tag.

Get-BrokerPrivateDesktop -Tag TestTag
<!--NeedCopy-->

Parameters

-Uid

Gets desktops by Uid.

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

-MachineName

Gets desktops by 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 desktops with a specific Citrix Virtual Delivery Agent (VDA) version.

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

-AssignedClientName

Gets desktops assigned to a specific client name.

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

-AssignedIPAddress

Gets desktops assigned to a specific IP address.

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

-ColorDepth

Gets desktops 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 desktops by the 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

-Description

Gets desktops by description.

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

-DesktopGroupUid

Gets desktops 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

-DNSName

Gets desktops by DNS name.

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

-HostedMachineId

Gets desktops by the 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 desktops by the 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 desktops 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

-HypervisorConnectionUid

Gets desktops by the uid of the hosting hypervisor connection.

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

-IconUid

Gets desktops by configured icon. Note that desktops 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

-InMaintenanceMode

Gets desktops by the InMaintenanceMode setting.

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

-IPAddress

Get desktops by their IP address.

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

-IsAssigned

Gets desktops depending on whether they are assigned or not. Private desktops can be assigned to either a user/users or client names/addresses.

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

-LastDeregistrationReason

Gets desktops 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 desktops 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

-LastHostingUpdateTime

Gets desktops by the time that the hosting information was last updated.

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

-OSType

Gets desktops 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 desktops 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

-PowerState

Gets desktops by power state.

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

Type: PowerState
Accepted values: Unmanaged, Unknown, Unavailable, Off, On, Suspended, TurningOn, TurningOff, Suspending, Resuming, NotSupported, VirtualMachineNotFound
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-PublishedName

Gets desktops by published name.

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

-RegistrationState

Gets desktops by registration state.

Valid values are Registered, Unregistered, and AgentError.

Type: RegistrationState
Accepted values: Unregistered, Initializing, Registered, AgentError
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SecureIcaRequired

Gets desktops configured with a particular SecureIcaRequired setting. Note that the desktop 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

-SID

Gets desktops by machine SID.

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

-Tag

Gets desktops tagged with the given tag.

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

-WillShutdownAfterUse

Gets desktops depending on whether they will be automatically shut down when the current session ends or not.

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

-AssignedUserSID

Gets desktops with the given assigned user (specified by SID).

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

-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
Introduced in: Citrix Virtual Apps and Desktop 7 2106

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

Get-BrokerPrivateDesktop returns an object for each matching private desktop.

Notes

To compare dates/times, use -Filter and relative comparisons. See about_Broker_Filtering for details.

Get-BrokerPrivateDesktop