Hello Team,
You may be already know this power shell script. But I just want to share my script; it will be helpful for you in future, if you encounter this kind of scenario.
Scenario: Some team wants to test the published icons in the some environment and want me to add one user to those icons. There are 161 icons. So, in order to add one user to 161 icons will take lot of time. So in order to achieve this, I have followed the steps below.
1. Log in to Citrix Pre prod environment.
2. Open Power shell script.
3. Run the command.
- Add-PSSnapin Citrix*
· $application=Get-XAApplication -FolderPath "applications\Business Objects\Non-HRT\SUNECDCXA104" (where Applications\ Business Objects\Non-HRT\SUNECDCXA104 is the folder structure in our farm)
· $displayname=$application|select Adobe (I have selected the first published application in that folder structure “SUNECDCXA104”)
· foreach ($app in $application){
Add-XAApplicationAccount -BrowserName $app.browsername -Accounts "NAEAST\R054234" |select accounts, BrowserName, Folderpath
}
Result: User account will be added to all published applications under that folder. Ran the same command from different folder structures.
Accounts BrowserName FolderPath
-------- ----------- ----------
{NAEAST\U150189, NAEAST\W348222, NAE... XA104 Applications/Business Objects/Non-HR.
No comments:
Post a Comment