Almost christmas!


Today brings another example for handling Service Manager in in Service Management Automation (SMA), a part for Windows Azure Pack. More info:

SMA is based on PowerShell workflow, so this could be used in other scenarios than within SMA.

This example is a runbook I use to complete an activity in service manager, in the end of most of my Service Manager runbooks.

I do this cause I want to speed up the processing and not wait for the “Check SMA Runbook Activity Complete” workflow that runs every 5 minutes but completing the Runbook activity manually


NB! This runbook is using the GUID of the Activity to get the instance.

This can be used for any type of Activity/Class that contains a Status property of the type ActivityStatusEnum


Download “” – Downloaded 223 times – 838 B

Setup / Import

  1. Download or create Set-SCSMActivityStatusCompleted.ps1
  2. Open WAP Admin Portal
  3. Go to Automation
  4. Import Runbook

Creating Assets

This runbook uses 2 assets.

  • “SCSM Server” – a variable that contains the dns name of the scsm server
  • “SCSM Access Account” – a credential which contains the account to connect to the SCSM server.

To create the assets you can use the PowerShell code I posted in my last blog

you can find it here


To make this work in your environment, change the web service end point to point at your SMA server

and change the SCSM information to your servername and account info


Notice that this runbook is using the Import-Module to import the SCSM module from your installation directory.

Please change this to fit your installation.

NB! there are several different ways to do this. This example has been simplified to make it easier to use.

Using the runbook

This is a example runbook that is designed to be triggered from SCSM. Inputs include the SMA Activity  GUID which we use as input


Next time I will show an example of integrating this runbook into Windows Azure Pack – GridPro – Request Management.

Merry Christmas!!!