Skip to main content
PowerShellXenApp 6.5

Configure Citrix XenApp Configuration Logging with PowerShell

By September 30, 2013September 12th, 2022No Comments

We can never stop having more fun with Powershell and here we take a look at creating Configuration Logging Reports from Citrix XenApp 6.5. We first look at what the GUI Appcenter can offer and it is not bad we can save our reports in XML, but no other format. Powershell then opens up a range of formatting option and is really quite simple with a little practice.

if ( (Get-PSSnapin -Name citrix.common.commands -ErrorAction SilentlyContinue) -eq $null )
{
    Add-PSSnapin citrix.common.commands
}

Get-Command -Module citrix.common.commands
Add-Content c:conn.udl -Value $null; Start-Process c:conn.udl
Get-CtxConfigurationLogReport -DataLinkPath C:conn.udl
Get-CtxConfigurationLogReport -DataLinkPath C:conn.udl | format-table
Get-CtxConfigurationLogReport -DataLinkPath C:conn.udl | format-table -Property Date,account,tasktype,itemtype,itemname,description
Get-CtxConfigurationLogReport -DataLinkPath C:conn.udl -ItemType LoadManager | format-table -Property Date,account,tasktype,itemtype,itemname,description
Get-CtxConfigurationLogReport -DataLinkPath C:conn.udl -ItemType LoadManager | Export-Csv c:file.csv

You can see then that we need to work with the Snapin “citrix.common.commands“, we check if the snapin is loaded if not we load it. 

Get-Command will show the avilable commands from the given module.
The clever bit is populating our Connection File for the database, the UDL file. The add-content line achieves this though a GUI. We only need to create this file once so can be done ahead of time and not run on each event. With that done we can then use the Get-CtxConfigurationLogReport to display the log and then start filtering and choosing formatting options. Have fun!