A comprehensive PowerShell monitoring solution for Citrix Provisioning Services (PVS) that provides deep analysis of vDisk replication status and load balancing configuration across your PVS farm.
PVS-RADAR (Provisioning Services Replication Analysis & Disk Assessment Reporter) is a PowerShell based monitoring tool that provides detailed analysis and reporting of vDisk replication status at the version level. It helps identify potential high availability risks, ensures optimal load balancing configuration, and provides actionable recommendations for maintaining robust PVS farm health.
- Version-Level Replication Monitoring: Checks replication status for each individual vDisk version (not just the vDisk as a whole)
- Active Version Focus: Only monitors versions in production/test mode (
Access=0), ignoring maintenance mode versions - Load Balancing Analysis: Identifies vDisks ready for load balancing vs. those locked to single servers
- Multiple Output Formats: Console output, structured JSON reports, and Windows EventLog integration
- Comprehensive Logging: Daily log files with detailed operation tracking
- Customizable Thresholds: Configurable minimum server and connection requirements
- Risk Assessment: Identifies high-risk configurations before they cause service disruptions
- Citrix PVS Console: Must be installed on the machine running the script
- PowerShell: Version 5.1 or later
- Permissions:
- PVS farm administrator rights or read access to PVS database
- Local administrator rights (for EventLog source registration)
- Network Access: Connectivity to PVS servers (and subsequentially their database)
- Clone this repository or download the script:
git clone https://github.com/MathiasK-SVA/pvs-radar.git
cd pvs-radar-
Ensure the Citrix PVS Console is installed on your system
-
Verify PowerShell execution policy allows script execution:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser.\PVS-RADAR.ps1 -PvsServer "PVS01" -SiteName "Production".\PVS-RADAR.ps1 `
-PvsServer "PVS01" `
-SiteName "Production" `
-WriteToEventLog `
-OutputJson "C:\Reports\PVS-Status-$(Get-Date -Format 'yyyyMMdd-HHmm').json" `
-ShowDetails `
-MinimumServers 3 `
-MinConnections 5 `
-LogPath "C:\Logs\PVS".\PVS-RADAR.ps1 `
-PvsServer "PVS01" `
-SiteName "Production" `
-MinimumServers 2 `
-MinConnections 10 `
-ShowDetails| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
PvsServer |
String | β | - | PVS server to connect to |
SiteName |
String | β | - | PVS site name to monitor |
MinimumServers |
Int | β | 2 | Minimum servers required for safe load balancing |
MinConnections |
Int | β | 0 | Minimum active connections to include vDisk in analysis |
ShowDetails |
Switch | β | - | Show detailed version-level information |
WriteToEventLog |
Switch | β | - | Create Windows EventLog entries for replication issues |
OutputJson |
String | β | - | Full path for JSON report output |
LogPath |
String | β | $env:TEMP |
Directory for daily log files |
Username |
String | β | - | PVS connection username (if not using current credentials) |
Domain |
String | β | - | Domain for PVS connection |
Password |
String | β | - | Password for PVS connection |
Real-time status information with color-coded status indicators:
- [OK]: Properly configured and replicated
- [WARN]: Load balanced but has replication risks
- [READY]: Well replicated but could enable load balancing
- [PROBLEM]: Single server with replication issues
Structured data export containing comprehensive analysis results:
{
"ScriptInfo": {
"ScriptName": "PVS-RADAR",
"ScriptFullName": "Provisioning Services Replication Analysis & Disk Assessment Reporter",
"Version": "2.0",
"RunTime": "2025-01-15 14:30:00",
"PvsServer": "PVS01",
"SiteName": "Production"
},
"Servers": [...],
"VDisks": [
{
"Name": "WIN10-Image",
"TotalConnections": 25,
"ActiveVersions": 2,
"VersionDetails": [
{
"Version": "10",
"DeviceCount": 15,
"ReplicationCount": 2,
"IsReplicationSufficient": true,
"MissingServers": []
}
]
}
],
"Summary": {...}
}- Source: "PVS-RADAR"
- Log: Application EventLog
- Event ID: 2001
- Type: Warning (for replication issues)
Sample EventLog entry:
PVS-RADAR: vDisk Replication Issue Detected
vDisk Name: WIN10-Image
Version: 10
Missing from servers: PVS03, PVS04
This vDisk version is not sufficiently replicated across the PVS farm.
Generated by PVS-RADAR (Provisioning Services Replication Analysis & Disk Assessment Reporter)
Located in specified LogPath with format: PVS-RADAR-YYYY-MM-DD.log
[2025-01-15 14:30:15] [INFO] PVS-RADAR started - Server: PVS01, Site: Production
[2025-01-15 14:30:16] [INFO] Found 4 servers in site 'Production'
[2025-01-15 14:30:20] [WARN] Issue detected - vDisk: WIN10-Image, Status: [WARN]
- Replication Status: Checks if each version exists on minimum required servers
- Sync State: Verifies versions are up-to-date (State=0) on each server
- Device Connections: Counts active connections per version
- Access Mode: Only considers production/test versions (Access=0)
- Current Configuration: Identifies load-balanced vs. single-server assignments
- Readiness Analysis: Determines which vDisks can safely enable load balancing
- Risk Identification: Highlights load-balanced vDisks with replication gaps
- β Healthy: Load balanced + all versions well replicated
β οΈ At Risk: Load balanced but some versions under-replicated- π‘ Ready: Single server but all versions well replicated
- π΄ Problem: Single server + replication issues
Use the JSON output and exit codes for monitoring system integration:
$result = .\PVS-RADAR.ps1 -PvsServer "PVS01" -SiteName "Production" -OutputJson "status.json"
if ($LASTEXITCODE -eq 0) {
# Process JSON for metrics
$data = Get-Content "status.json" | ConvertFrom-Json
# Send metrics to monitoring system
}Create a scheduled task for regular analysis:
# Example scheduled task command
"C:\Scripts\PVS-RADAR.ps1" -PvsServer "PVS01" -SiteName "Production" -WriteToEventLog -OutputJson "\\MonitoringShare\PVS\status-$(Get-Date -Format 'yyyyMMdd-HHmm').json""PVS Snap-In not found"
- Ensure Citrix PVS Console is installed
- Verify the DLL path:
$env:ProgramFiles\Citrix\Provisioning Services Console\Citrix.PVS.SnapIn.dll
"Access Denied" errors
- Run PowerShell as Administrator (for EventLog source registration)
- Verify PVS permissions for the user account
"No servers found in site"
- Verify site name spelling and case sensitivity
- Ensure connectivity to PVS database server
EventLog registration fails
- Requires local administrator rights
- EventLog entries will be skipped if registration fails
Enable verbose output for troubleshooting:
.\PVS-RADAR.ps1 -PvsServer "PVS01" -SiteName "Production" -Verbose- Regular Analysis: Run at least daily to catch replication issues early
- Threshold Tuning: Adjust
MinimumServersbased on your farm size and SLA requirements - Automated Alerting: Use EventLog integration with monitoring systems
- Trend Analysis: Archive JSON reports to track replication health over time
- Maintenance Windows: Schedule during low-usage periods for comprehensive
ShowDetailsruns
- Fork the repository
- Create a feature branch (
git checkout -b feature/improvement) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/improvement) - Create a Pull Request
- Follow PowerShell best practices and style guidelines
- Add appropriate error handling and logging
- Update documentation for new features
- Test with multiple PVS farm configurations
This project is licensed under the MIT License - see the LICENSE file for details.
- Citrix Systems for the PVS PowerShell SDK
- Community contributors who provided testing and feedback
- Issues: Report bugs via GitHub Issues
- Discussions: Use GitHub Discussions for questions
- Documentation: Check the Wiki for detailed guides