Citrix Virtual Apps and Desktops SDK

Remove-BrokerUser

Remove broker user objects from another broker object

Syntax

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

Description

The Remove-BrokerUser cmdlet removes broker user objects from another specified object, such as a broker private desktop, to which the user had previously been added.

To delete a user entirely, specify the user without any associated object and the -Force parameter. If there are active sessions, licenses, or machine commands for the user; the cmdlet will not proceed with the deletion. If the user is referenced by other broker objects (such as applications, private desktops, etc.) the cmdlet will fail.

The Remove-BrokerUser -AllObjects cmdlet will remove the broker user from all supported relationships. This includes: Applications, ApplicationGroups, Machines, PrivateDesktops, SessionLinger, and SessionPreLaunch.

Examples

EXAMPLE 1

Remove the assignment of the specified private desktop to the specified user.

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

Parameters

-InputObject

Specifies the user objects to remove.

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

-Name

Specifies the user objects to remove, based on their Name property.

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

-AllObjects

When specified, all broker object relationships which the user is associated with will be removed. This includes: Applications, ApplicationGroups, Machines, PrivateDesktops, SessionLinger, and SessionPreLaunch.

Type: SwitchParameter
Position: Named
Default value: False
Required: False
Accept pipeline input: False
Accept wildcard characters: False
Introduced in: Citrix Virtual Apps and Desktop 7 2511

-Force

Required to be set when running Remove-BrokerUser with no relationships specified.

Type: SwitchParameter
Position: Named
Default value: False
Required: False
Accept pipeline input: False
Accept wildcard characters: False
Introduced in: Citrix Virtual Apps and Desktop 7 2511

-ApplicationGroup

The application group from which to remove the user

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

-Application

The application from which to remove the user

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

-SessionLinger

The desktop group session linger setting from which to remove the user.

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

-SessionPreLaunch

The desktop group session pre-launch setting from which to remove the user.

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

-Machine

The machine from which to remove the user

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

-PrivateDesktop

The desktop from which to remove the user

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, -SkipCertificateValidation, -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 removed to Remove-BrokerUser.

Outputs

None

By default, this cmdlet returns no output.

Notes

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

Remove-BrokerUser