PowerShell is a great way to get detailed settings to document environments with relatively few lines of scripting. All the major players (Microsoft, VMware, Citrix, etc.) have PowerShell support now. Carl Webster is a very detailed and talented writer and has written a very in-depth article series detaining how to PowerShell your way through documenting a Citrix XenDesktop 4 Farm. This is a great resource with lots of detail taking you all the way through the process.