During the Tech Preview of Workflow Studio, the most popular posts I had were around using Workflow Studio to create a green data center:
- Green Data Center - Support for Wake On LANhttp://community.citrix.com/x/RQUgAg
- Green Data Center - Getting the power back on
http://community.citrix.com/x/AQUgAg
- Green Data Center - Shutting Down a Windows Server
http://community.citrix.com/x/9IUNAg
- Green Data Center - Shutting Down a XenServer Host
http://community.citrix.com/x/1IAVAg
I wanted to review these very popular posts and talk about how the most recent versions of Workflow Studio can be leveraged for these tasks.
Wake On LAN
Support for WakeOnLAN was included in the activity library pack made available in April with version 1.1. The WakeOnLAN activity is in the 'Networking' library and in the 'Networking' folder in the Designer once installed:

Shutting Down a Windows Server
In the Tech Preview post, I talked about two methods of shutting down a computer. One of those two methods - LaunchProcess - is available as part of the library pack that was released in April (under Windows), but also in that pack is a Shutdown activity that manages this for you. The Shutdown Windows activity is in the Networking library with Wake On LAN.
Shutting Down a XenServer host
In the Tech Preview post, I talked about several activities for interfacing with XenServer VMs and the XenServer host. These activities are all part of the library pack from April. These activities are in the 'Citrix XenServer' library and in the 'Citrix XenServer' folder in the Designer once installed:

The host activities Disable-Host and Shutdown-Host that were in the Tech Preview post are not available yet, but will be in the next update to this library.
If you are using Workflow Studio to manage power in your environment, drop me a line and let me know how it is going. If you aren't using it, let me know what we can do to make it easier for you.
In a previous post I covered how to integrate Wake On LAN into your workflow, but how many people are currently using Wake On LAN or at least know that the majority of their servers support it?
In previous posts I have explored using Workflow Studio to Shut down a Windows host and also how to Shut down a XenServer host. Getting the power off is a big step in being greener, but if you could just turn off machines and leave them off permanently then you wouldn't need Workflow Studio
Next we have to look at how to get those hosts powered back on.
There are a lot of different options out there for power management, but the one thing that is fairly consistently avaiable is Wake On LAN (WOL). In this post I am going to look at how WOL technology can be leveraged by Workflow Studio. Most modern server NICs have some form of WOL support (though you may have to turn it on in the BIOS.) This allows you to start up any machine that you know the MAC address for. Heare are some details on WOL from Intel and the Wikipedia WOL page has a good overview and a lot of links to free utilities and sample code.
Now that we have an understanding of how we want to start our server we can add it in as a task in Workflow Studio. There isn't a native WOL task in Workflow Studio (not yet anyway), but it is pretty easy to call one of the tools mentioned in the Wikipedia article with a "Launch Process" task. I started with that, but didn't like having to require one of these to be installed, so I went looking at the code samples. I finally found a great implementation of WOL in PowerShell by /\/\o\/\/ The PowerShell Guy. Paste that code in a PowerShell Script task and you have an embedded Wake On LAN task.
The next step is to put all this together into a single workflow with some business logic about when you want to start and stop your servers. I want to hear from you - what metrics would you want to use to drive a "Green" workflow? Is Wake On LAN supported in your data center? What issues do you have that this kind of a workflow could help with?