Citrix CVAD (Virtual Apps & Desktops) PowerShell and Citrix ADC (NetScaler) CLI: searchable, copy-ready commands for everyday admin tasks.
advertisement
Run on a Delivery Controller with Citrix snap-ins, or from a remote machine with the CVAD SDK installed. Use Add-PSSnapin Citrix.* to load snap-ins in on-prem environments.
π§ Setup
Add-PSSnapin Citrix.*Load all Citrix CVAD snap-ins (on-prem DDC)
Get-Service -Name 'BrokerAgent' -ComputerName vda01 | Restart-ServiceRestart Citrix Broker Agent service on a VDA
Get-Service -Name 'picaSvc2','BrokerAgent','CitrixTelemetryService' -ComputerName vda01 | Select Name, StatusCheck key Citrix services on a VDA
π Health Checks
Get-BrokerController | Select DNSName, State, ActiveSiteServicesDelivery Controller status
Test-BrokerDBConnection -DBConnection (Get-BrokerDBConnection)Test database connectivity from DDC
Get-BrokerMachine | Group-Object RegistrationState | Select Name, CountMachine count by registration state
Get-BrokerDesktopGroup | Select Name, TotalDesktops, DesktopsAvailable, DesktopsDisconnected, DesktopsInUseDelivery group capacity at a glance
π§ ADC Troubleshooting
show ns eventsRecent system events and alerts
show audit messagesAdmin audit trail, who changed what and when
show monitor MY_MONITORHealth monitor status and recent probe results
start nstrace -size 0 -mode TCPDUMP -filter "PORT 443"Start packet capture on port 443
stop nstraceStop capture, saved to /var/nslog/
ping 10.0.0.1 -S 10.0.0.5Ping from a specific source IP (e.g. a SNIP)
CVAD on-prem vs Citrix DaaS (Cloud)
Citrix CVAD (Virtual Apps and Desktops) is the on-premises product with Delivery Controllers running on Windows Server. Citrix DaaS is the cloud-hosted management plane where DDCs are managed by Citrix. On-prem uses Add-PSSnapin Citrix.* on a DDC; DaaS uses the Citrix DaaS PowerShell SDK which authenticates via OAuth to citrix.cloud.com. Most cmdlet names are identical between the two, but connection setup differs.
Key port flows to understand
VDA β DDC: TCP 80 and 443 (registration and brokering)
ADC β VDA health probes: typically TCP 80 or custom port
Understanding these flows is essential when troubleshooting firewall blocks between client launches and VDA sessions.
Always save the ADC config
Changes to the Citrix ADC running config are in-memory only. A reboot without save ns config loses all changes. On HA pairs, saving on the primary node also propagates to the secondary, but only after the save command is run on the primary node.