Citrix Virtual Apps and Desktops SDK

Set-BrokerMachine

Sets properties on a machine.

Syntax

Set-BrokerMachine
   [-InputObject] <Machine[]>
   [-PassThru]
   [-AssignedClientName <String>]
   [-AssignedIPAddress <String>]
   [-ColorDepth <ColorDepth>]
   [-Description <String>]
   [-HostedMachineId <String>]
   [-HypervisorConnectionUid <Int32>]
   [-IconUid <Int32>]
   [-InMaintenanceMode <Boolean>]
   [-IsReserved <Boolean>]
   [-PublishedName <String>]
   [-SecureIcaRequired <Boolean>]
   [-LoggingId <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->
Set-BrokerMachine
   [-MachineName] <String>
   [-PassThru]
   [-AssignedClientName <String>]
   [-AssignedIPAddress <String>]
   [-ColorDepth <ColorDepth>]
   [-Description <String>]
   [-HostedMachineId <String>]
   [-HypervisorConnectionUid <Int32>]
   [-IconUid <Int32>]
   [-InMaintenanceMode <Boolean>]
   [-IsReserved <Boolean>]
   [-PublishedName <String>]
   [-SecureIcaRequired <Boolean>]
   [-LoggingId <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

The Set-BrokerMachine cmdlet sets properties on a machine or set of machines. You can specify a single machine by name or multiple machine instances can be passed to the command by piping or using the -InputObject parameter.

Examples

EXAMPLE 1

This example specifies a machine by name and sets its hypervisor connection.

Set-BrokerMachine -MachineName 'MyDomain\MyMachine' -HypervisorConnectionUid 3
<!--NeedCopy-->

EXAMPLE 2

This example finds all machines in domain MyDomain and sets their hypervisor connections.

$machines = Get-BrokerMachine -MachineName 'MyDomain\*'
Set-BrokerMachine -InputObject $machines -HypervisorConnectionUid 3
<!--NeedCopy-->

EXAMPLE 3

This example also finds all machines in domain MyDomain and sets their hypervisor connections.

Get-BrokerMachine -MachineName 'MyDomain\*' | Set-BrokerMachine -HypervisorConnectionUid 3
<!--NeedCopy-->

Parameters

-InputObject

The machine instances whose properties you want to set.

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

-MachineName

The machine whose properties you want to set.

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

-PassThru

This cmdlet does not generate any output, unless you use the PassThru parameter, in which case it returns the affected record.

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

-AssignedClientName

Changes the client name assignment of the machine. Set this to $null to remove the assignment. You can assign machines to multiple users, a single client IP address, or a single client name, but only to one of these categories at a time.

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

-AssignedIPAddress

Changes the client IP address assignment of the machine. Set this to $null to remove the assignment. You can assign machines to multiple users, a single client IP address, or a single client name, but only to one of these categories at a time.

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

-ColorDepth

The color depth setting configured on the machine, possible values are:

$null, FourBit, EightBit, SixteenBit, and TwentyFourBit.

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

-Description

Description of the machine.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False
Disallowed characters: All ASCII control characters
Introduced in: Citrix Virtual Apps and Desktop 7 2209

-HostedMachineId

The unique ID by which the hypervisor recognizes the machine.

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

-HypervisorConnectionUid

The hypervisor connection that runs the machine. This may only be set for VMs which are not provisioned by MCS.

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

-IconUid

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

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

-InMaintenanceMode

Sets whether the machine is in maintenance mode or not. A machine in maintenance mode is not available for new sessions, and for managed machines all automatic power management is disabled.

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

-IsReserved

Specifies whether the machine should be reserved for special use. A machine cannot be reserved if it is already a member of a desktop group.

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

-PublishedName

The name of the machine that is displayed in StoreFront, if the machine has been published. It can be set only for private desktops.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False
Disallowed characters: /;:#.*?=<>\|[]()"'\ and all ASCII control characters

-SecureIcaRequired

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

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

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

You can pipe in the machines whose properties you want to set.

Outputs

None or Citrix.Broker.Admin.SDK.Machine

This cmdlet does not generate any output, unless you use the PassThru parameter, in which case it generates a Citrix.Broker.Admin.SDK.Machine object.

Set-BrokerMachine