📜 ⬆️ ⬇️

XenApp: transfer of servers to a new domain

Formulation of the problem:


Move the server and farm XenApp 6 and XenApp 6.5 to another domain.

Lyrical digression


By itself, the task is absolutely not difficult, given that there is a special article on the developer's site. But this article does not answer how to change the properties of all published applications. To do it manually with a large number of published applications, it is still fun. Therefore, in this article I will try to combine the information scattered on the Internet and try to warn you against possible problems.


Go


Before you change the domain, you need to understand that all published applications will remain with information about users from the old domain. If there are 5 or 10 such applications, it will not be difficult for us to change the properties of all applications manually. But if the number of published applications passes for a hundred, then you need to think about some kind of automation of this process. So, for starters, we export all published applications. I drew all the information from here (English). All the work will be done for us by a PS script written by Kevin McLeman. In order for the script to work, we need the Citrix XenApp PowerShell SDK:

  1. Install the Citrix XenApp PowerShell SDK. After installation, we will have Citrix snap-ins for PowerShell.
  2. Open PowerShell and execute:
    Add-PSSnapin Citrix.* Get-PSSnapin Citrix.* 

    It should turn out like this:
    image
  3. Run the downloaded script with the following parameters:
     XAApps.ps1 -CSV “c:\Test.csv” -Export -WorkerGroups -Servers 
    Where c: \ test.csv is the path and file name where the applications will be exported.
    The –WorkerGroups parameter instructs the script to export information about Worker Groups as well.
    By analogy, the –Servers parameter causes the script to export server information.
    After starting the script, you can sit back and relax, the process is not fast. In my case, 150 applications were exported for about half an hour.
  4. After the export process for published applications has ended, open the Citrix Access Management Console, Administrators tab, add a local administrator.
  5. We open the console from the local administrator
  6. Disable the ability to login to the server
  7. Change the domain in which the server is located
  8. Reboot server
  9. Login as local administrator
  10. Open the services, find the Citrix Independent Management Architecture service and re-register it so that it runs on behalf of the Network Service (you need to make the password field empty), as indicated in the screenshot:
    image
  11. We open the console from the local administrator
  12. Add to the domain administrator administrators
  13. Delete all published applications
  14. Remove all servers from the farm
  15. We change the domain on the servers and enter them back into the farm
  16. Open with any editor the file created in step three and replace (ctrl-h) the users of the old domain with the new one (in my case the users were the roam \ vin_medical_qa domain group, and slslab \ vin_medical_qa became); As you understand, in this file you can change everything you need, since the file is a typical CSV, all values ​​are written separated by commas, the values ​​of each column are described in the first line. Save changes
  17. Open PowerShell and execute:
     Add-PSSnapin Citrix.* Get-PSSnapin Citrix.* 
  18. Run the script from the third paragraph with the following parameters:
     XAApps.ps1 -CSV “c:\Test.csv” –Import 
    Where c: \ test.csv is the path and file name of the file created in clause 16
    Fortunately, imports are much faster than exports. Therefore, in a minute or two all your applications will appear with new properties.

Possible rake


When copying applications from one server to several, you need to ensure that the BrowserName for applications with the same name is different.
')

Bibliography:



PS: Now I understand how hard it is to write articles, considering that this is my first experience, do not kick too strictly. Any questions and suggestions are welcome.

Source: https://habr.com/ru/post/191978/


All Articles