Thursday, June 07, 2012

Retrieving Citrix user accounts via PowerShell

Here's a neat little two liner to pull all the AD accounts associated with Citrix applications:

$accounts = Get-XAApplicationReport * | select-object Accounts

$accounts | foreach {$_.accounts | select-object AccountDisplayName} | export-csv "%userprofile%\desktop\app.csv" -noclobber

Awesome.