Citrix Virtual Apps and Desktops 2411 SDK

Set-SfOptimalGateway

Set the farms and the optimal gateway to use for launch.

Syntax

Set-SfOptimalGateway
   -SiteId <Int64>
   -ResourcesVirtualPath <String>
   -HostNames <String[]>
   -StaUrls <String[]>
   -Farm <String>
   [-StasBypassDuration <TimeSpan>]
   [-StasUseLoadBalancing]
   [-EnableSessionReliability]
   [-UseTwoTickets]
   [-EnabledOnDirectAccess]
   [-LoggingId <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

Set the farms and the optimal gateway to use for launch.

Examples

EXAMPLE 1

Set-DSOptimalGatewayForFarms -SiteId 1 -ResourcesVirtualPath /Citrix/Store -Hostnames @("gateway1.citrix.com:2222") -StaUrls @("https://server1.citrix.com/staurl") -StasBypassDuration "00.02:00:00" -EnabledOnDirectAccess
<!--NeedCopy-->

Parameters

-SiteId

Site ID within IIS. This is typically 1 for the site in IIS where StoreFront is installed by default.

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

-ResourcesVirtualPath

Path to the store that is to be configured to have a farm to optimal gateway mapping.

Example: “/Citrix/Store”

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

-HostNames

Specifies the fully qualified domain name (FQDN) and port of the optimal NetScaler Gateway appliance.

Example1 for standard vServer port 443: gateway.example.com

Example2 for nonstandard vServer port 500: gateway.example.com:500

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

-StaUrls

Specifies the URLs for XenDesktop, XenApp, and VDI-in-a-Box servers running the Secure Ticket Authority (STA). If using multiple farms, list the STA servers on each using a comma separated list:

Example: “http://xenapp-a.ptd.com/scripts/ctxsta.dll”,”http://xendesktop-a.ptd.com/scripts/ctxsta.dll

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

-Farm

Specificies the set of delivery controllers, as named when they were configured with StoreFront.

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

-StasBypassDuration

Set the time period, in hours, minutes, and seconds, for which an STA is considered unavailable after a failed request.

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

-StasUseLoadBalancing

Set to true: randomly obtains session tickets from all STAs, evenly distributing requests across all the STAs.

Set to false: users are connected to the first available STA in the order in which they are listed in the configuration, minimizing the number of STAs in use at any given time.

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

-EnableSessionReliability

Set to true: keeps disconnected sessions open while Receiver attempts to reconnect automatically. If you configured multiple STAs and want to ensure that session reliability is always available, set the value of the UseTwoTickets attribute to true to obtain session tickets from two different STAs in case one STA becomes unavailable during the session.

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

-UseTwoTickets

Set to true: obtains session tickets from two different STAs in case one STA becomes unavailable during the session.

Set to false: uses only a single STA server.

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

-EnabledOnDirectAccess

Set to true: ensures that when local users on the internal network log on to StoreFront directly, connections to their resources are still routed through the optimal appliance defined for the farm.

Set to false: connections to resources are not routed through the optimal appliance for the farm unless users access StoreFront through a NetScaler Gateway.

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

-LoggingId

Specifies the identifier of the high-level operation this cmdlet call forms a part of. Citrix Studio and 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

None

You can’t pipe objects to this cmdlet.

Outputs

None

By default, this cmdlet returns no output.

Set-SfOptimalGateway