Remko Weijnen's Blog (Remko's Blog)

About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like

Archive for March, 2012

From a script I needed to schedule a project in RES Automation Manager 2011 for a particular server.

imageThis can be done with the WMC.exe commandline tool as documented in the Admin Guide. However we must specify the agent’s GUID instead of it’s name. We can of course use the AM console to get the agent’s GUID but it’s more flexible to script this.

imageUnfortunately there’s no API we can call so I am directly quering the AM database using a PowerShell script.

The script read the database server and database name from the registry so it assumes you have the AM console installed.


PowerShell RegEx Fun

I am writing a script that is going to automate a number of manual steps involved in creating a new image with Citrix PVS.

First step is to copy the most recent base image which is kept in a folder structure. The folder name is always YYYY-MM-DD (description):


I needed to determine the most recent folder and didn’t want to rely on creation date. Instead I walk the directory tree and filter the date out of the filename with a regular expression:


imageYesterday I wrote about the Windows 8 CP WebSetup installer and told you that the Application Compatibility check creates a few XML files in the folder %AppData%\Local\Microsoft\WebSetup\Panther.

So what can we do with them?

The XML files are created by a separate exe in the WebsetupExpanded folder called WicaInventory.exe with the arguments: /apps /fast /ext “exe,sys” /output <XML file> /log <LOG file>

In my case the commandline was:

Let’s see what’s in WICA_Programs_REMKOLAPTOP.xml.



  • Filed under: Windows 8
  • Donate