The Nerdio Compass Citrix Export tool allows you to export snapshots from your Citrix environment for import and analysis in Nerdio Compass. You can download the Export tool in Nerdio Compass from System > Support.
Downloading the Export tool provides you with a single, unified PowerShell script that provides four distinct operational modes:
-
GUI mode - Interactive WPF interface for visual exports with real-time progress
-
Export mode - Headless export of Citrix configuration to JSON files
-
Anonymize mode - Replace personally identifiable information (PII) with synthetic values
-
Reverse mode - Restore original values from anonymized exports using a mapping file
-
PowerShell Version: 5.1 or later (both Windows PowerShell 5.1 and PowerShell 7+)
Important
Export mode supports PowerShell 5.1 only.
-
Citrix SDK Required: Citrix Remote PowerShell SDK (https://download.apps.cloud.com/CitrixPoshSdk.exe) for Export mode
-
Platforms Supported:
-
Windows PowerShell 5.1 Desktop edition (GUI mode)
-
PowerShell 7+ (anonymise, reverse modes)
-
-
Network: Connectivity to Citrix Cloud (for DaaS) or network access to CVAD delivery controllers
-
Permissions: Read access to Citrix configuration; write access to output directories
The default mode when running the script without parameters. Launches a WPF "Citrix Snapshot Export" window with:
-
SDK status checking and validation
-
Real-time progress logging with color-coded output
-
Light/dark theme support
-
Optional on-the-fly anonymization
-
Automatic ZIP packaging for Compass portal upload
Requirements:
-
PowerShell 5.1 Desktop edition
-
Citrix Remote PowerShell SDK installed
Example:
.\Invoke-CitrixCompassExport.ps1
For step-by-step instructions, see [TODO: link to "Use the Nerdio Compass Citrix Export tool to connect to your Citrix environment and export a snapshot"].
Exports Citrix DaaS or CVAD configuration data to JSON files without user interaction.
Exported Resources:
-
Delivery groups
-
Access policies
-
Machine catalogs
-
MCS virtual machines
-
Machines (physical and provisioned)
-
Personal/private desktops
-
Applications
-
Hypervisor connections
-
Zones
-
Users
-
Images
-
GPO policies
-
System metadata (
snapshot.json)
Requirements:
-
PowerShell 5.1 Desktop edition
-
Citrix Remote PowerShell SDK
-
Citrix Cloud credentials (for DaaS) or delivery controller access (for CVAD)
Example - Citrix Cloud:
.\Invoke-CitrixCompassExport.ps1 -Export -Path 'C:\Exports\Citrix' -CustomerId 'tfhkctx001'
Example - CVAD On-Premises:
.\Invoke-CitrixCompassExport.ps1 -Export -Cvad -Path 'C:\Exports\Citrix' -AdminAddress 'ddc.contoso.com'
Replaces PII with synthetic values while maintaining referential integrity. Creates a GUID-keyed mapping file for reversal.
PII Categories Anonymized:
-
User Principal Names (UPNs) - replaced with generated
user@domain.comaddresses -
Full names - replaced with random first/last name combinations
-
SAM names - replaced with sequential
USER####identifiers -
Security Identifiers (SIDs) - replaced with synthetic
S-1-5-21-...format -
Machine names - replaced with sequential
MACHINE####identifiers -
Active Directory groups - replaced with sequential
GROUP####identifiers -
Azure OIDs - replaced with
OID:/azuread/[guid]format -
Tenant IDs - replaced with random GUIDs
-
Identity claims - parsed and anonymized by type
-
Email addresses (fallback) - replaced via regex matching on unmapped properties
Idempotency:
Re-running with the same mapping file produces identical results (no new mappings created).
Example:
.\Invoke-CitrixCompassExport.ps1 -Anonymise -Path 'C:\Exports\Citrix' -OutputPath 'C:\Exports\Citrix-Anon'
-Export-
Mandatory switch to run in headless export mode.
-Path(default:$PSScriptRoot\Export)-
Directory where JSON export files are written. Directory is created if it does not exist.
-Path 'C:\Exports\Citrix'
-CustomerId-
Citrix Cloud Customer ID (CCID) for DaaS authentication. Required for Citrix Cloud exports; not used with
-Cvad.-CustomerId 'tfhkctx001'
-Cvad-
Switch to export from Citrix Virtual Apps and Desktops (on-premises) instead of Citrix Cloud. Omit for DaaS exports.
-Cvad
-AdminAddress(default:localhost)-
Delivery controller address. Only required when not running directly on a CVAD delivery controller.
-AdminAddress 'ddc.contoso.com'
-ProgressCallback(optional)-
ScriptBlock invoked with each progress message (used internally by the GUI). Signature:
{ param([string]$message) ... }
-Anonymise-
Mandatory switch to run in anonymization mode.
-Path-
Directory containing JSON files to anonymize.
-OutputPath-
Directory for anonymized output. If omitted, files are updated in place. Useful for preserving originals.
-OutputPath 'C:\Exports\Citrix-Anon'
-Domain(default:company.com)-
Domain suffix for generated email/UPN replacements.
-Domain 'contoso.com'
-MappingFile(default:pii-anonymization-map.jsonin output directory)-
Path to the GUID-keyed mapping JSON file. Loaded if present; created or updated after processing.
-MappingFile 'C:\Maps\anonymization-map-2026-09-02.json'
-Filter(default:*.json)-
File name filter passed to
Get-ChildItemfor JSON file discovery. -Recurse(default:$true)-
When
$true, searches subdirectories recursively for JSON files.-Recurse $false
-Reverse-
Mandatory switch to run in reversal mode.
-Path-
Directory containing anonymized JSON files to reverse.
-OutputPath-
Directory for restored output. Required (reversal never updates files in place).
-MappingFile(default:pii-anonymization-map.jsonin-Path)-
Path to the mapping file created by anonymization. Must exist.
-Filter(default:*.json)-
File name filter for JSON discovery.
-Recurse(default:$true)-
When
$true, searches subdirectories recursively.
Example 1. GUI Export (Interactive)
.\Invoke-CitrixCompassExport.ps1
Launches the interactive WPF window for guided export configuration and real-time progress monitoring.
Example 2. Headless DaaS Export
.\Invoke-CitrixCompassExport.ps1 -Export -Path 'C:\Exports\MyCustomer' -CustomerId 'tfhkctx001'
Exports Citrix Cloud (DaaS) configuration for customer ID tfhkctx001 to C:\Exports\MyCustomer.
Example 3. CVAD On-Premises Export
.\Invoke-CitrixCompassExport.ps1 -Export -Cvad -Path 'C:\Exports\CVAD-Lab' -AdminAddress 'ddc.lab.contoso.com'
Exports on-premises CVAD configuration from the specified delivery controller.
Example 4. Anonymize with Custom Domain
.\Invoke-CitrixCompassExport.ps1 -Anonymise -Path 'C:\Exports\Citrix' -OutputPath 'C:\Exports\Citrix-Anon' -Domain 'customer.local'
Anonymizes export files, writing output to a separate directory with custom domain for generated email addresses.
Example 5. Preview Anonymization (WhatIf)
.\Invoke-CitrixCompassExport.ps1 -Anonymise -Path 'C:\Exports\Citrix' -OutputPath 'C:\Exports\Citrix-Anon' -WhatIf
Previews what anonymization would write without modifying any files. Useful for validation before processing large datasets.
Example 6. Reverse Anonymization
.\Invoke-CitrixCompassExport.ps1 -Reverse -Path 'C:\Exports\Citrix-Anon' -OutputPath 'C:\Exports\Citrix-Restored'
Restores original values using the mapping file found in C:\Exports\Citrix-Anon.
Example 7. Load Functions for Programmatic Use
.\Invoke-CitrixCompassExport.ps1 -FunctionsOnly
Defines all functions without launching GUI or export. Used internally for background runspace operations.
JSON files created in the export directory:
|
File |
Content |
|---|---|
|
|
Published applications |
|
|
Machine catalogs |
|
|
Delivery groups (desktop groups) |
|
|
Access policy rules |
|
|
Desktop usage statistics |
|
|
Group Policy Object policies |
|
|
Hypervisor connections |
|
|
Machines (all types) |
|
|
Private desktops |
|
|
Citrix users |
|
|
Zones |
|
|
Image definitions and versions |
|
|
Personal desktops |
|
|
MCS-provisioned virtual machines |
|
|
Metadata (source system, timestamp, version, anonymization state) |
Anonymized JSON Files
Same structure as export files, with PII replaced by synthetic values.
pii-anonymization-map.json
GUID-keyed mapping file containing:
-
original- Original PII value -
anonymized- Generated replacement -
type- Category (upn, fullname, samname, sid, machinename, etc.)
Example mapping entry:
{
"550e8400-e29b-41d4-a716-446655440000": {
"original": "john.smith@contoso.com",
"anonymized": "kwxz.pqmr@company.com",
"type": "upn"
}
}
snapshot.json contains:
{
"schemaVersion": "1.0",
"source": "daas" | "cvad",
"collectedAtUtc": "2026-09-02T14:30:45.123Z",
"scriptVersion": "2.3.0",
"anonymised": false | true
}
The anonymised flag is set to true only when the entire anonymization pass completes successfully with no skipped files.
The Citrix Remote PowerShell SDK defaults to returning 250 records per query. For environments with many machines, applications, catalogs, users, or GPO policies, the script automatically requests all records using -MaxRecordCount [Int32]::MaxValue to prevent silent truncation.
If exports are incomplete:
-
Verify the Site database command timeout on Delivery Controllers is sufficient for large queries
-
Monitor database performance during export
-
Split very large environments into regional exports if necessary
Running anonymization multiple times with the same mapping file produces identical output:
# First run - creates mapping .\Invoke-CitrixCompassExport.ps1 -Anonymise -Path 'C:\Export1' -OutputPath 'C:\AnonOutput' -MappingFile 'C:\Maps\map.json' # Second run - loads existing mapping, no new entries created .\Invoke-CitrixCompassExport.ps1 -Anonymise -Path 'C:\Export2' -OutputPath 'C:\AnonOutput' -MappingFile 'C:\Maps\map.json'
Useful for batch processing multiple exports with consistent anonymization rules.
The snapshot.json file flags anonymised: false if the anonymization pass is incomplete:
-
JSON files could not be parsed
-
User confirmed
-WhatIfwithout writing changes -
Non-default
-Filterused -
-Recursedisabled (nested files not processed)
This prevents partial anonymization from being misrepresented as complete.
- Error:
"Failed to load Citrix PowerShell snap-ins" -
-
Ensure Citrix Remote PowerShell SDK is installed
-
Verify running on Windows PowerShell 5.1 Desktop edition (not ISE, not Core)
-
Check SDK version compatibility with Citrix Cloud or CVAD release
-
- Error:
"Authentication failed to Citrix Cloud" -
-
Verify CustomerId is correct
-
Check network connectivity to Citrix Cloud
-
Ensure credentials in the security credential store are valid
-
Confirm the account has Citrix Cloud administrative rights
-
- Error:
"Delivery controller unreachable" -
-
Verify AdminAddress is correct and resolvable
-
Check firewall rules (default Citrix port 80/443)
-
Confirm account has CVAD administrative access
-
- Incomplete export (< expected record count)
-
-
Increase Site database command timeout on Delivery Controllers
-
Check Citrix logs for query timeouts
-
Try exporting specific components individually for diagnostics
-
Verify network latency to delivery controllers
-
- Error:
"Could not parse as JSON" -
-
Verify files in -Path are valid JSON
-
Check for invalid UTF-8 encoding
-
Ensure files are not locked by another process
-
- Error:
"Mapping file not found" -
-
Confirm -MappingFile path exists and contains valid JSON
-
If first run, omit -MappingFile to auto-create in output directory
-
Verify the file is readable by the current user
-
- Warning:
"snapshot.json keeps 'anonymised: false'" -
-
Some JSON files failed to parse or were skipped
-
Revisit -Filter and -Recurse settings
-
Check for permission issues on nested files
-
Review verbose output (
-Verbose) for specific skipped files
-
- Error:
"Mapping file not found" -
-
Confirm the mapping file created during anonymization still exists
-
Check file path matches exactly
-
Verify file is readable
-
- Restored values don't match originals
-
-
Confirm mapping file has not been modified since anonymization
-
Ensure reverse -Path contains the exact anonymized files processed during anonymization
-
Check for manual edits to anonymized JSON (breaks reversal)
-
-
Large Environments: Export time depends on environment size, network latency, and Delivery Controller database performance
-
Anonymization: Scales linearly with total JSON file size; processing speed ~50-100 MB/minute
-
Reversal: Typically faster than anonymization (direct lookup vs. collision checking)
-
Memory: Script loads entire JSON objects into memory; for very large exports (>1 GB), consider splitting into regions
-
Mapping File Protection: The mapping file is the sole reversal key. Protect it as confidential material
-
In-Place Anonymization: When omitting -OutputPath, original files are overwritten; commit to version control first if reversal may be needed
-
Secure Transfer: When sharing anonymized exports, use encrypted channels (SFTP, HTTPS)
-
Metadata Leakage:
snapshot.jsoncontains non-sensitive provenance (version, timestamp); no PII is included
Comments (0 comments)