Service Management Automation: Runbook/Workflow for getting selected object(s) in an SCSM Request Offering Query Result Question

Hello Everyone!

Today It is my turn to write in the Coretech christmas calendar!

Currently I am working a lot in Service Management Automation (SMA), a part for Windows Azure Pack. More info: http://aka.ms/introToSMA

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

The first example i want to show is an easy way to get the selected object(s) in a Service Manager Request Offering

Download “Get-SCSMCIFromUserInput.zip” Get-SCSMCIFromUserInput.zip – Downloaded 96 times – 789 B

Setup / Import

  1. Download or create Get-SCSMCIFromUserInput.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 following PowerShell code

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

Runbook

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 service request GUID which we use to send to the Get-SCSMCIFromUserInput.

Merry Christmas!!!

By | 2017-08-22T09:25:51+00:00 December 12th, 2014|Automation, Windows Azure Pack (WAP)|1 Comment

About the Author:

Jakob Gottlieb Svendsen

Twitter: @JakobGSvendsen

Jakob Gottlieb Svendsen is a Microsoft Cloud and Data Center Management MVP (http://mvp.microsoft.com/en-us/default.aspx), Working as Global Lead Developer, Senior Consultant and Trainer at CTGlobal, where he is one of the driving forces in keeping CTGlobal a System Center Gold Partner and member of the System Center Alliance.

Since he started at Coretech in 2007, he has focused on Scripting and Development, primarily developing tools, extensions and scripts for the System Center Suite. His main area is Automation (including OMS/Azure Automation, Service Management Automation, PowerShell and Orchestrator). Another area is Windows Azure Pack / Azure Stack, where he does implementation, development, workshops and presentations. He is a world-wide renowned voice in the Automation field.

He is passionately devoted to the community, to which he contributes by being a moderator at TechNet and sharing his knowledge at http://blog.ctglobalservices.com/jgs

  • Co-founder: PowerShell User Group Denmark
  • Speaker at MMS 2016, Minneapolis (www.mmsmoa.com)
  • SCU Europe 2014, 2015, 2016 (www.systemcenteruniverse.ch)
  • Microsoft TechEd North America 2014, Houston
  • NIC 2012,2013,2014,2015, Oslo (www.nic.com)
  • Microsoft CampusDays 2011, 2013, Copenhagen
  • Microsoft TechDays 2015, Sweden (www.techdays.se)
  • Microsoft Partner Event: New in SC2012 SP1
  • User group meetings (PSUG.DK , SCUG.DK/BE/NO, AZMUG + more)
  • Microsoft Certified Trainer.
  • Microsoft Scripting Guys Forum Moderator

Main working areas:

  • Automation (Azure Automation, SMA, SCO)
  • Windows Azure Pack / Azure Stack
  • System CenterVisual Studio Team Services / Team Foundation Server
  • Development:C#.Net, VB.NET, VBScript, PowerShell, Service Manager, OpsMgr, ConfigMgr
  • Orchestrator
  • Windows Azure Pack / Azure Stack

Training:

  • Azure Automation
  • Service Management Automation
  • System Center Orchestrator
  • PowerShell, VBScript, C#.Net, VB.Net
  • Windows Azure Pack / Azure Stack Development Workshops

One Comment

  1. Lance January 2, 2015 at 19:37 - Reply

    Thanks Jakob, This is useful. I was looking at a way to get user input from an SCSM request offering and this looks like it would work. We were originally thinking of building the user input into a string array and then converting this string array into a hashtable or idictionary object to pass to start-smarunbook.

    Lance

Leave A Comment