Book Image

Microsoft System Center 2016 Service Manager Cookbook - Second Edition

By : Steve Buchanan, Steve Beaumont, Anders Asp, Dieter Gasser, Andreas Baumgarten
Book Image

Microsoft System Center 2016 Service Manager Cookbook - Second Edition

By: Steve Buchanan, Steve Beaumont, Anders Asp, Dieter Gasser, Andreas Baumgarten

Overview of this book

Keep your organization up to speed with the Microsoft System Center 2016 Service Manager Cookbook. Over 100 practical recipes for SCSM 2016 give you all the tools to master IT service management.
Table of Contents (23 chapters)
Microsoft System Center 2016 Service Manager Cookbook - Second Edition
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Creating new work items with SMLets


When automating your ITIL processes, there will be situations where you will need to create new work items programmatically. For instance, you might have a scheduled change once a month or you would like to automatically create incidents when you discover an error in the event log of some LOB application.

In this recipe, we will take a look at how we can create a new service request with included activities directly from PowerShell.

The end result would look like this:

Getting ready

Make sure that you've followed the Downloading and installing SMLets recipe earlier in this chapter. It's also very good if you have tried the other recipes that have something to do with PowerShell and/or SMLets, as the syntax for what we are going to do here can be quite complex otherwise.

How to do it...

Using SMLets we will create a new service request that includes two manual activities. This service request is a part of the backup-teams routine to perform restore tests of...