9 min read
Citrix StoreFront Customization with PowerShell: Complete Guide
How to automate Citrix StoreFront configuration, store creation, and customization using PowerShell. Includes scripts for multi-site deployments.
CitrixStoreFrontPowerShellCustomization
Automating StoreFront Deployments
Citrix StoreFront is the web front-end for CVAD — where users authenticate and launch their apps/desktops. While the management console works for single-server setups, PowerShell is essential for multi-server deployments, DR scenarios, and consistent configuration across environments.
Loading the StoreFront Module
powershell
# Import StoreFront PowerShell modules
$installPath = "C:\Program Files\Citrix\Receiver StoreFront"
$modules = @(
"\Scripts\ImportModules.ps1"
)
foreach ($mod in $modules) {
. "$installPath$mod"
}Create a New Store
powershell
# Create a new StoreFront deployment
$hostUrl = "https://storefront.corp.local"
$siteId = 1
# Create the authentication service
$auth = Add-STFAuthenticationService -VirtualPath "/Citrix/Authentication"
# Add Citrix farms
$farm = New-Object Citrix.StoreFront.Model.Store.FarmConfiguration
$farm.FarmName = "Production"
$farm.FarmType = "XenDesktop"
$farm.Servers = @("ddc01.corp.local", "ddc02.corp.local")
$farm.Port = 443
$farm.TransportType = "HTTPS"
$farm.SSLRelayPort = 443
# Create the store service
$store = Add-STFStoreService -VirtualPath "/Citrix/Store" \
-AuthenticationService $auth \
-FarmConfiguration $farm \
-Friendly "Production Store"
# Create the Receiver for Web site
$rweb = Add-STFWebReceiverService -VirtualPath "/Citrix/StoreWeb" \
-StoreService $store
Write-Host "StoreFront store created at: $hostUrl/Citrix/StoreWeb"Configure Authentication Methods
powershell
# Get the authentication service
$auth = Get-STFAuthenticationService -VirtualPath "/Citrix/Authentication"
# Enable domain pass-through + explicit (username/password)
Set-STFExplicitCommonOptions -AuthenticationService $auth \
-Protocols @("ExplicitForms", "IntegratedWindows")
# Enable domain pass-through for internal users
Enable-STFAuthenticationServiceProtocol -AuthenticationService $auth \
-Name "IntegratedWindows"
# Configure password change
Set-STFExplicitCommonOptions -AuthenticationService $auth \
-AllowUserPasswordChange "Always"Customize the Receiver for Web Appearance
powershell
# Get the Receiver for Web service
$rweb = Get-STFWebReceiverService -VirtualPath "/Citrix/StoreWeb"
# Set workspace control (reconnect at logon)
Set-STFWebReceiverService -WebReceiverService $rweb \
-SessionStateTimeout 20 \
-DefaultIISSite $true
# Configure workspace control
$wc = Get-STFWebReceiverWorkspaceControl -WebReceiverService $rweb
Set-STFWebReceiverWorkspaceControl -WebReceiverService $rweb \
-Enabled $true \
-AutoReconnectAtLogon $true \
-LogoffAction "Disconnect" \
-ShowReconnectButton $trueMulti-Server Propagation
powershell
# Propagate configuration to all servers in the group
$group = Get-STFServerGroup
Publish-STFServerGroupConfiguration -ServerGroup $group
# Verify all servers are in sync
$members = Get-STFServerGroupMember
foreach ($member in $members) {
Write-Host "$($member.HostName): $($member.SyncStatus)"
}Backup and Restore
powershell
# Export StoreFront configuration
Export-STFConfiguration -TargetFolder "C:\SF-Backup" -ZipFileName "sf-config-$(Get-Date -Format yyyyMMdd).zip"
# Import on another server (DR scenario)
Import-STFConfiguration -ConfigurationZip "C:\SF-Backup\sf-config-20260223.zip" \
-HostBaseUrl "https://storefront-dr.corp.local"Automate StoreFront with VDIVibes AI
Building StoreFront configurations from scratch? VDIVibes AI generates complete PowerShell scripts for store creation, authentication setup, and multi-site propagation.