Set acls remotely to a VDI / RDSH Delivery Group 7 Comments

In the same way as the previous blog post, some more automation to maintain a VDI/RDSH environment, and get back to a controlled and clean environment. This blog is a follow up to Remotely clean up Virtual Machines drives – XenDesktop , Expand virtual machines hard disk – automation , XenDesktop XenApp 7.x – vmware / ad / delivery group notes and descriptions sync . I had to automate an action to place ACLs on the D: drive using Powershell and icacls. This script is using XenDesktop / XenApp command to list all the Virtual Machines with SessionSupport value equal to SingleSession, it means the VDI only in my case. If you want to check the list of Virtual Machines you targeted you can use this command : If you want to target a specific XenDesktop Delivery Group, then just adapt the previous line : Once you know the target, you can execute the following script. Using this script assume Virtual Machines are switched on. If you have suggestion, and/or comment, share your though !

Remotely clean up Virtual Machines drives – XenDesktop 10 Comments

Following up the previous blogs XenDesktop XenApp 7.x – vmware / ad / delivery group notes and descriptions sync and Expand virtual machines hard disk – automation and continue in automated task, I had to clean up the D: drive of different XenDesktop Delivery Group. As there was no security restriction on the D: drive some users used it as a repository for some of their project... That caused some issues : Users complain of losing their working data from a session to another (pooled VDI, new logon = new vm) Some disk space notification where displayed to random users... Calls where raise to the helpdesk support team Beside hiding the D: drive to avoid non necessary access (ie : non system access) check this blog to do so : Citrix XenApp – Hiding system drives part 1/2 an automated task had to be performed to "clean" this D: drive The variable $XDDC is the FQDN of a Delivery Controler, $Exclusion is the files and folder you want to exclude from being removed. For example : the directories "logs" "pvsvm" "System Volume Information" "$RECYCLE.BIN" and the files "dedicateddumpfile.sys" "pagefile.sys" and "vdiskdif.vhdx" will be ignore from the delete process. Most of these files and directory are system protected anyway it's more to avoir error during script execution. Once you have a clear list of what you need and want to keep you can proceed to the next step.   This script will clean everything which is not in the $Exclusion list so be careful when you run the script. This script assume all the targeted VM are switched ON of course. Leave a comment bellow if you have an idea how to improve this script !

XenApp 6.5 to XenApp 7.5 Migration (Machine) 24 Comments

Citrix will very soon offer a lot of scripts and tools to give the ability to migrate policies from a XenApp 6.5 farm to a XenApp 7.5, I'm currently testing all these Powershell script to check it out and maybe use it by including it in our migration process. What Citrix haven't give us yet is a tool to move an existing XenApp 6.5 server to a XenApp 7.5 Site, steps are fairly simple and can be automatize : Leave XenApp 6.5 Farm **Reboot** Uninstall XenApp 6.5 **Reboot** Install XenApp 7.5 VDA This is not what I recommend to do because removing a piece of software to replace by another always leave some dirty little things everywhere... This is the reason I prefer to start from scratch and migrate application; sometime it's not possible and we need to go fast, so these few steps are easy to customize and integrate in every deployment system in place. The first step is to leave the XenApp 6.5 farm : To complete this farm leave script, you need to reboot the XenApp server. The second step is to uninstall XenApp 6.5 using this command line : To complete this step the XenApp server needs to reboot again. The last step is to deploy the new VDA (XenApp / XenDesktop 7.5) using this command line : Update 25 April 2014 If you plan to move your XenApp 6.5 servers to XenApp 7.5 you need to clean a bit more than simply XenApp, I had a lot of comments about Edgesight agent, Citrix Profile Management etc... and my answer if yes you need to uninstall each of these component to avoid any conflict with the VDA. For example Esgesight can be uninstall using the following command line : This is it ! I think Citrix will offer a "graphic" tool in some point, but I needed to have that ready now, so I share it ! Resources : XenApp and XenDesktop 7.5 edocs XenApp Uninstallation Best Practices

Windows Server 2012 – Migrating FSMO Roles 6 Comments

I installed one AD when Microsoft Windows Server 2012 was still in Release Candidate with the Datacenter edition, of course since few days my DC was rebooting every hour, the trial licence did expire few days ago.. So I had to install a new DC and promote it the transfer all FSMO roles from my "old" server to the new one. First thing I had to do is to add this new server to the existing forest as a new domain controller : I did it using the gui but you can also use PowerShell to get the same result : Now the server has been added to the forest as a new domain controller, on the new server after launching PowerShell command line, i used the Move-ADDirectoryServerOperationMasterRole command to transfer all the FSMO roles. EAch role corresponding to a number :   Role Name Number PDCEmulator 0 RIDMaster 1 InfrastructureMaster 2 SchemaMaster 3 DomainNamingMaster 4 So my command line looked like that This is it ! Don't forget to demote the "old" domain controller before getting rid of it. I wanted to blog about that because I'm not manipulating Active Directory controller every day and here is my scratch notebook so, this is to keep track on what I'm doing and share information.