Unless you’ve been living under a rock for the last few years, you know that PowerShell is the future for Microsoft. With products like Service Manager Automation and Azure Automation, a solid PowerShell foundation will be required for a lot of tasks.
When System Center 2012 was released the Service Manager PowerShell modules received a huge overhaul. There is almost nothing you can’t do using the provided Cmdlets. However, aside from the few examples on TechNet, there is not much documentation on working with the Service Manager Cmdlets. The purpose of this blog series will be to get you familiar with working with the Service Manager Cmdlets, and show you some of the great things you can accomplish using them.
All articles in their series are linked below. Be sure to read the overview below and check back often for new content and updates.
- Getting Started with Service Manager PowerShell
- Get Work Item Information
- Get Configuration Item Information
- Get Relationships
- Modifying Work/Configuration Items
- Working with Relationships
- Get List Items
- Creating Configuration Items
- Creating Work Items
- Creating PowerShell Workflows
Series Overview
This series is not designed to be an introduction to PowerShell or Service Manager, just the Service Manager PowerShell modules. I assumes that you are familiar with Service Manager, and have a basic working knowledge of PowerShell. I will explain what the commands are doing, and I will provide links to additional resources where needed. This series will assume that you are familiar with running basic PowerShell commands and using PowerShell ISE. Some of the common PowerShell concepts we will use are variables, arrays, hash tables, foreach loops, and if else statements. Don’t worry if you are not experienced in all of these areas, you should still be able to follow along. I will explain what the commands are doing and provide links to additional information where needed.
I also recommend that you learn how to use the Get-Help and Get-Member cmdlets. They are not unique to Service Manager, and can be helpful with any PowerShell project.
Get-Help will return the help information for a Cmdlet.
Get-Member will list the properties and methods of a command or object.
Terminology – For those of you who are new to Service Manager, I suggest reviewing the Service Manager Glossary. One item that is not in the glossary that you will often see is Work Item. In Service Manager this can refer to Change Management, Incident Management, Problem Management, Release Management, Service Request fulfillment, and all Activity types. Basically everything under the Work Items workspace, in the console.
All code examples used in the series can also be found at https://gist.github.com/mdowst