SCO 2012 R2: System Management Automation Part 3 – The Web Service

The new preview of System Center Orchestrator 2012 R2, comes with a new part called "System Management Automation"

Not much info has been released about what it is, or what it can be used for.

update: more information have been released by microsoft. Start here

It seems to me to be a new runbook engine, with a completely new type of runbooks. I can’t wait to get more info about what it is , and what it is for.

It has 3 parts which is installed seperately:

  • Web Service
  • Runbook Worker
  • PowerShell Module

I will try to post some of my exploration of this new part of Orchestrator.

This will be a series of blog articles.

So far these have been planned:

SCO 2012 R2: System Management Automation Part 1 – Overview and Setup
SCO 2012 R2: System Management Automation Part 2 – The PowerShell Module
SCO 2012 R2: System Management Automation Part 3 – The Web Service
SCO 2012 R2: System Management Automation Part 4 – Using the Web Service in Visual Studio 2012

In this article i’ll show how to  browse the new SMA Webservice .

The idea is to give you a chance to play around with it, and any kind of comments/feedback is very welcomed!

 

Accessing the Web Service root:

 

The new SMA Web service is installed default on port 9090

Toaccess it in Internet Explorer complete the following steps:

  • Open Internet Explorer
  • Type in URL for your service, in my setup is it:

https://scor2.cloud.local:9090/00000000-0000-0000-0000-000000000000/

Replace the servername with your servername to connect to your web service.

The GUID is a GUID of the tenant to connect to. The default (All runbooks) is called 00000000-0000-0000-0000-000000000000. If you create a tenant, it will get a GUID , and you can use this GUID to only show the information and content of this tenant.

  • If you receive a certificate warning, ignore it by selecting "Continue to this website"

image

  • By now, you should see a list of the root functionality in the web service:

image

Accessing different parts of the webservice

 

The Webservice contains the following collections:

  • Jobs
  • Runbooks
  • RunbookVersions
  • JobContexts
  • JobParameters
  • Schedules
  • Modules
  • ConnectionFields
  • ConnectionFieldNames
  • ConnectionFieldValues
  • Connections
  • ConnectionTypes
  • Variables
  • Credentials
  • Certificates
  • Activities
  • ActivityParameterSets
  • ActivityParameters
  • ActivityOutputTypes
  • Statistics
  • AdminConfigurations
  • Deployment

Each of these collections, contains information about the specific subject. eg. The Runbooks collection, contains a liste of all runbooks.

To access one of these collections, add the collection name to the URL.

https://scor2.cloud.local:9090/00000000-0000-0000-0000-000000000000/Runbooks

This will diplay an xml file of that contains information about the runbooks. Internet Explorer will parse it as it was a RSS feed, and therefore you will see a result similar to this, if any runbooks exist:

image

to see the "real" values and information

  • Right Click in the window
  • Select View Source

The source will open in notepad, unfortunately i can be difficult to read.

image

since this is XML a nice trick is to save it as a .xml file and open it in Internet Explorer (or even better; a xml notepad)

image

The xml contains a lot of information, and often you can also find URLs for more info. eg. in this view you can see a URL to get more information about the specific runbook:

image

to access the specific runbooks, in this case the URL is

https://scor2.cloud.local:9090/00000000-0000-0000-0000-000000000000/Runbooks(guid’9a3d0067-1cc0-4812-9653-57103a5cae5e’)

This link can be used to start/stop runbook and much more, by executing its methods, but in Internet Explorer we can only access information and not trigger any methods.

To do this you will have to use code in visual studio (More information in next article!)

or PowerShell. If you want to do it from powershell, you should use the cmdlets available, since they make your life much easier! If there is interest in a article about how to use it directly via custom powershell code, i will write this too 🙂

You can also use the webservice in Excel and get the data directly inserted into excel sheets! to do this, follow the same procedure as the "old" web service which i have described in this article:

System Center Orchestrator 2012 Beta: Creating an overview of RunBooks using Orchestrator Web Service and PowerPivot For Excel

By | 2013-08-08T10:50:44+00:00 August 8th, 2013|Automation|7 Comments

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 https://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

7 Comments

  1. Tri Tran December 27, 2013 at 8:33 - Reply

    Hi.
    Can you help me !
    I builing a Azure lab. I have a error when install SMA: “This application requires Windows Server 2012 R2 or later.”. But, i install SMA with Windows Server 2012 R2 Std.

    Thanks.

    PS:
    A part of log file:
    ========
    Action start 13:59:41: SetWEBENDPOINT.
    MSI (s) (68:C8) [13:59:41:806]: Skipping action: SetWEBSERVICEPORT (condition is false)
    MSI (s) (68:C8) [13:59:41:806]: Doing action: LaunchConditions
    Action ended 13:59:41: SetWEBENDPOINT. Return value 1.
    Action start 13:59:41: LaunchConditions.
    MSI (s) (68:C8) [13:59:41:808]: Product: System Center 2012 R2 Service Management Automation Web Service — This application requires Windows Server 2012 R2 or later.

    Action ended 13:59:41: LaunchConditions. Return value 3.
    Action ended 13:59:41: INSTALL. Return value 3.
    MSI (s) (68:C8) [13:59:41:810]: Note: 1: 1708
    MSI (s) (68:C8) [13:59:41:810]: Product: System Center 2012 R2 Service Management Automation Web Service — Installation failed.
    MSI (s) (68:C8) [13:59:41:811]: Windows Installer installed the product. Product Name: System Center 2012 R2 Service Management Automation Web Service. Product Version: 7.2.1563.0. Product Language: 1033. Manufacturer: Microsoft Corporation. Installation success or error status: 1603.
    ========

    • Jakob Gottlieb Svendsen
      Jakob Gottlieb Svendsen January 2, 2014 at 11:46 - Reply

      i am sorry but i have not experienced the problem you have. I have installed on windows 2012 R2 standard without any problems :/

      Are you running the setup in compatability mode?

      • Azure user September 5, 2014 at 8:15 - Reply

        Hi Tri Tran,

        I am facing same issue now. were you able to solve it ?

        • Simon Abraham November 27, 2016 at 12:38 - Reply

          I also had this problem; I could not reinstall as I had other services running on there. After quite a bit of investigation, it turned out to be a stupid blunder…. in the fact the service account had the default setting of change password on first logon and this produces the 1603 error.

          Once I changed it (and told it not to expire) the installer completed successfully.

  2. Dmitry Kotov April 29, 2014 at 7:28 - Reply

    Hello! Thank you for interesting articles. Looking forward for last chapter to find out how to start runbook using powershell and REST api (I presume via Invoke-RestMethod?).

  3. Laurie Rhodes February 28, 2015 at 23:38 - Reply

    Hi Tri: the message “This application requires Windows Server 2012 R2 or later” from within the Web Service Installer will also be generated if you try to install on a Domain Controller – regardless of the version of Windows Server you are using. This is because the LaunchConditions of the MSI use the MSINTProductType property (https://msdn.microsoft.com/en-us/library/aa370329%28v=vs.85%29.aspx).

    Thanks for everything Jakob – your blogs are great resource!

  4. […] of a treatment system for illness and its sequelae that is unsatisfactory for meeting specific stress management techniques athletes well being ambitions. Nutrition management in the nursing interventions classification, a nursing […]

Leave A Comment