Create Live Maps Unity Services in PowerShell

This time I am writing a technical article on how to create Live Maps Unity Services using PowerShell.

Why would we want to create Live Maps Services using PowerShell?

Live Maps Unity comes with an Authoring Console that makes creating Service very easy. But in some scenarios, you don’t want a human to create services. One of those scenarios could be that there is a System Center Orchestrator run book that creates Live Maps Services based on the Service Catalog in Service Manager, ServiceNow, or another BSM solution. Another scenario would be that you need to create a lot of Live Maps Services at once.

How does it work?

I really like PowerShell it is powerful in helping you automate simple and complex tasks and they made it easy to execute methods from .NET assemblies.

The Live Maps Authoring Console is written in .NET code and it only uses the SCOM SDK to make changes in SCOM. On the machine that the Live Maps Authoring Console is installed, you can open PowerShell and start doing the same as what’s possible using the Authoring Console UI.

I must say that you have to be careful calling .NET code in PowerShell. First, you need very detailed knowledge about how the classes and methods in the .NET assembly’s work and you have to keep in mind that the methods you call are not part of a SDK. This means the interface and behaviour of the .NET code can be changed after each release.

Explaining the PowerShell example script

At the bottom of this article, you can find a link to the example PowerShell script that can let you create services. The definition of those services are read from an xml file.

The script needs two parameters to operate. To check them out, click here and read the complete version of our blog.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.