I had a need to add a certain security group to every single published application in a XenApp 6.5 farm today. Create a new file with the extension .ps1 and copy and paste this in:
1 2 3 4 5 |
Add-PSSnapin Citrix.Xenapp.Commands foreach($application in Get-XAApplication) { Add-XAApplicationAccount $application.DisplayName "domain\yoursecuritygroup" } |
Then run the PowerShell script. It will enumerate all apps in your farm and add the security group or user ID you specified to each app. Don’t worry, it won’t overwrite any existing users or groups for the apps, it will only add.
When you check the app properties now, you will see the new group added to all apps. Hope this helps!
Jason Samuel is a visionary product leader and trusted advisor with a proven track record of shaping strategy and driving technology innovation. With extensive expertise in enterprise end-user computing, security, cloud, automation, and virtualization technologies, Jason has become a globally recognized authority in the IT industry. His career spans consulting for hundreds of Fortune 500 enterprises across diverse business sectors worldwide, delivering cutting-edge digital solutions from Citrix, Microsoft, VMware, Amazon, Google, and NVIDIA that seamlessly balance security with exceptional user experiences.
Jason’s leadership is amplified by his dedication to knowledge-sharing as an author, speaker, podcaster, and mentor within the global IT and technology community. Recognized with numerous prestigious awards, Jason’s contributions underscore his commitment to advancing technology and empowering organizations to achieve transformative results. Follow him on LinkedIn.
Lauren Dunnevant
April 28, 2016 at 1:05 PM
The equivalent in 7.x would be:
Get-BrokerApplication | Add-BrokerUser -Name 'domain\username'
You can also be more specific with regards to a folder name, for example:
Get-BrokerApplication -Name 'Foldername\*' | Add-BrokerUser -Name 'domain\username'
Hope this is useful to someone!
David Worthley
May 24, 2018 at 1:33 PM
Thanks @Lauren Dunnevant. I had to comment because I was looking for exactly this. This works! and saved me a lot of time.