Citrix Virtual Apps and Desktops SDK

Add-BrokerUser

Creates an association between a user and another broker object

Syntax

Add-BrokerUser
   [-InputObject] <User[]>
   [-ApplicationGroup <ApplicationGroup>]
   [-Application <Application>]
   [-SessionLinger <SessionLinger>]
   [-SessionPreLaunch <SessionPreLaunch>]
   [-Machine <Machine>]
   [-PrivateDesktop <PrivateDesktop>]
   [-LoggingId <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->
Add-BrokerUser
   [-Name] <String>
   [-ApplicationGroup <ApplicationGroup>]
   [-Application <Application>]
   [-SessionLinger <SessionLinger>]
   [-SessionPreLaunch <SessionPreLaunch>]
   [-Machine <Machine>]
   [-PrivateDesktop <PrivateDesktop>]
   [-LoggingId <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

The Add-BrokerUser cmdlet adds broker user objects to another specified object, such as a broker private desktop. This depends on the target object type:

  • Machine - assign the broker machine to the specified user(s); when the

    machine is subsequently added to a desktop group, the desktop is also assigned to the same user(s).

  • PrivateDesktop - assign the desktop to the specified user(s).
  • Application - assign the application to the specified user(s).
  • Application group - assign the applications in the application group to the specified user(s).

Examples

EXAMPLE 1

Assign the specified private desktop to the specified user.

Add-BrokerUser "DOMAIN\UserName" -PrivateDesktop "DOMAIN\MachineName"
<!--NeedCopy-->

EXAMPLE 2

Assign the specified application to the specified user.

Add-BrokerUser "DOMAIN\UserName" -Application "ApplicationName"
<!--NeedCopy-->

Parameters

-InputObject

The user objects to add.

Type: User[]
Position: 2
Default value: None
Required: True
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name

The name of the user or users to be added.

Type: String
Position: 2
Default value: None
Required: True
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-ApplicationGroup

The application group to which the user is to be assigned.

Type: ApplicationGroup
Position: Named
Default value: None
Required: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Application

The application to which the user is to be assigned.

Type: Application
Position: Named
Default value: None
Required: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SessionLinger

The session linger setting to which the user is to be assigned.

Type: SessionLinger
Position: Named
Default value: None
Required: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SessionPreLaunch

The session pre-launch setting to which the user is to be assigned.

Type: SessionPreLaunch
Position: Named
Default value: None
Required: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Machine

The machine to which the user is to be assigned

Type: Machine
Position: Named
Default value: None
Required: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PrivateDesktop

The desktop to which the user is to be assigned

Type: PrivateDesktop
Position: Named
Default value: None
Required: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LoggingId

Specifies the identifier of the high level operation that this cmdlet call forms a part of. Desktop Studio and Desktop Director typically create High Level Operations. PowerShell scripts can also wrap a series of cmdlet calls in a High Level Operation by way of the Start-LogHighLevelOperation and Stop-LogHighLevelOperation cmdlets.

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

Citrix.Broker.Admin.SDK.USer

You can pipe the users to be added to Add-BrokerUser.

Outputs

None

By default, this cmdlet returns no output.

Notes

Specify one of the -Machine or -PrivateDesktop or -Application parameters only.

Add-BrokerUser