SCO 2012 R2: System Management Automation Part 2 – The PowerShell Module

 

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 use the PowerShell Module.

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

Lets go!

 

Start by Installing the PowerShell Module on your lab machine, i have installed all parts of SCO R2 on the same lab server.

All PowerShell cmdlets need a web service URL and port to work in this article i will use splatting to make it easier

Import Module

Get Commands in module

Get SMA Runbooks using standard parameters

Get SMA Runbooks using splatting

When using these cmdlets, splatting is very usefull. Splatting enables you to define some parameters once, but use it in multiple commands.

This technique will be used for the rest of the commands.

Start SMA Runbook using ID

Start SMA Runbook using Name

Get SMA Runbook Worker Deployments

Get SMA Jobs

Other Cmdlets included in module:

These is a lot of cmdlets included in the module, please do not ask me what they are for, since i don’t know yet!

but if you dicover anything, feel very free to share it in comments or email!

Almost all cmdlets use the same technique and need the webservice url and port

Edit-SmaRunbook

Get-SmaAdminConfiguration

Get-SmaCertificate

Get-SmaConnection

Get-SmaConnectionField

Get-SmaConnectionType

Get-SmaCredential

Get-SmaJob

Get-SmaJobOutput

Get-SmaModule

Get-SmaRunbook

Get-SmaRunbookWorkerDeployment

Get-SmaSchedule

Get-SmaVariable

Import-SmaModule

Import-SmaRunbook

New-SmaConnection

New-SmaRunbookWorkerDeployment

Publish-SmaRunbook

Remove-SmaCertificate

Remove-SmaConnection

Remove-SmaCredential

Remove-SmaModule

Remove-SmaRunbook

Remove-SmaSchedule

Remove-SmaVariable

Resume-SmaJob

Set-SmaAdminConfiguration

Set-SmaCertificate

Set-SmaConnectionFieldValue

Set-SmaCredential

Set-SmaSchedule

Set-SmaVariable

Start-SmaRunbook

Stop-SmaJob

Suspend-SmaJob

 

Have fun! I am personally looking very much forward to dicovering more about SMA!

By | 2013-07-26T09:00:08+00:00 July 26th, 2013|Automation|0 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 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

Leave A Comment