Part 2 was posted, featuring GPO Import and more:
Part 3 was posted, featuring Environmental Settings, Microsoft USV Settings, and more:
I am not going to explain here how Citrix Windows Environment Manager (WEM) works, what it is, etc. There are many blog posts or other websites doing a much better job at that than I ever could.
If you ever worked with WEM, and specifically, adding a new environment, you know how adding all the actions could get a little tedious.
It got tedious for me after adding the second Application action.
Normally you open the Citrix WEM console, go to Actions – Applications, and click Add to add a new application shortcut. This will show an Application template in which you have to fill in or select the properties for the shortcut:
That’s nice and all if you want to add a few shortcuts as Actions for this environment. But imagine you have an environment with a lot of applications.
Furthermore, if you want to have the icons for all your applications for instance, you can only use this method to add shortcuts if the WEM console is installed on the machine where all the applications are deployed.
The same goes for all the other types of Actions, but those are out of scope for this blog post.
Here’s where my Powershell module kicks in. This post focusses on creating an XML file for Application Actions in WEM.
The module contains a function called New-VUEMApplicationsXML. The parameters and usage is explained with Get-Help New-VUEMApplicationsXML -Detailed:
You can use this function anywhere, no dependencies on WEM whatsoever, as long as the Citrix.WEM module is present.
This means you can take your image, deploy it to a VM, including all applications, copy the Powershell module to the VM, import the module, and with a single command import all start menu shortcuts into an WEM compatible XML file.
Example of importing a Windows 10 Start Menu with lots of shortcuts:
NOTE: This video was created based on the initial release of the module. In that release you created the xml file by piping the output to a file using Out-File. This is no longer needed as the function now does that for you.
The video shows the command in action without using any parameters. In this case the command will process all .lnk files in “C:\ProgramData\Microsoft\Windows\Start Menu” and “\Microsoft\Windows\Start Menu”.
If you specify the -Path parameter, and the parameter points to a path, the command will process .lnk files in that path. If the parameter points to a file, the command will process that file only.
You can turn off recursive processing by specifying -Recurse $false. This only works if the Path parameter is specified, and points to a path.
If you want to process other file types besides .lnk files, you must specify the -FileTypes parameter, comma-seperating the filetypes you want to process. Only valid if the Path parameter is specified, and points to a path.
By default all Application actions will be generated to be Enabled. If you want all actions to be disabled, use the -Disable switch.
The script defaults to the current folder for output and uses the mandatory VUEMApplications.xml filename. You can override this behaviour by specifying the -OutputPath and -OutputFileName parameters.
You can download the latest version of the module on GitHub: https://github.com/msfreaks/Citrix.WEM
Until next time,