Automation Machine 2014 Reporting

In my last blog post I discussed a reporting script that was made for Automation Machine but also functions in XenApp environments without Automation Machine to manage the environment. This version however is only compatible with Automation Machine 2012 and a couple of earlier versions. The latest version (Automation Machine 2014) has a completely different framework so the script i wrote is incompatible.

So for Automation Machine 2014 I’ve rewritten the script and created an Automation Machine 2014 package for it. Allowing you to change options much easier using simple checkboxes and drop down menus. So instead of opening the script and writing down some settings and changing some text from true to false you can simply configure all the settings, schedule the script and wait for it to run.

AM2014 Reporting
The package as shown in the Automation Machine 2014 GUI

You can download the package here.

Reporting script for SBC farms

A lot of RDS and XenApp farm (SBC in general) are on a reboot schedule. Meaning they reboot regularly, mostly daily or weekly. This is done to ensure stability of the servers and to have a maintenance window in which we can install or upgrade software. Specifically we use Automation Machine Maintenance for this. AM Maintenance is used to provide high availability of the SBC farm. Maintenance accomplishes this by rebooting the server in 2 separate groups.

Rebooting and deploying software automatically without having to perform any actions outside of office hours is a nice feature. It does impose some risks. For multiple reasons the servers might not be up and running properly after the reboot and/or after deploying new or updated software. You could do a manual check each time the farm is rebooted but that sounds like a lot work and is very repetitive. To me, that sounded like something that can be automated. Ideally you would like a report each morning with a list of server and metrics.

With this in mind i wrote a Powershell script which does just that. It creates a list of server, retrieves a bunch of metrics and bundles them in a nice report using HTML. That’s all nice but you’d like to have it available for reading somewhere. So i also made it save to a location (locally or on a share) and it e-mails the report to one or more recipients.

The script currently has the following features (you can enable and disable them to suit your needs):

Server NameXenApp PoSh SDK or Automation Machine 2012You can choose to use XenApp or Automation Machine to retrieve the servernames
Collection NameXenApp PoSh SDK or Automation Machine 2012You can choose to use XenApp or Automation Machine the retrieve the collection
Server StatusICMP trafficUses test-connection (ping)
Logon StatusWMI
Server IPICMP traffic
Server ListenerXenApp PoSh SDK
Last Boot TimeWMI
Install TimeWMI
CitrixXenApp PoSh SDKEnables or disables importing the Citrix XenApp PoSh SDK
Data CollectorsXenApp PoSh SDK
Load EvaluatorsXenApp PoSh SDK
Session CountXenApp PoSh SDK
Startup ErrorAutomation Machine 2012
Cycle ErrorAutomation Machine 2012
S4MaticAutomation Machine 2012
AmTasksAutomation Machine 2012

To give you an idea of what this will look like:

Reporting script output

You can download the script here. Or if you don’t like downloading the reporting script directly. You can check out the code below and copy it yourself.