Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft System Center Powershell Essentials

You're reading from   Microsoft System Center Powershell Essentials Efficiently administer, automate, and manage System Center environments using Windows PowerShell

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher Packt
ISBN-13 9781784397142
Length 140 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (10) Chapters Close

Preface 1. Setting up the Environment to Use PowerShell 2. Administration of Configuration Manager through PowerShell FREE CHAPTER 3. Scenario-based Scripting for SCCM Administration 4. Administration of Operations Manager through PowerShell 5. Scenario-based Scripting for SCOM Administration 6. Administration of Service Manager through PowerShell 7. Scenario-based Scripting for SCSM Administration 8. Best Practices Index

Auto closing the resolved incidents and closing the completed changes


To perform these operations, we will leverage the external module available as SMlet from CodePlex. We can perform the same using legacy modules, but SMlets have extensive functionalities already implemented that bring ease to our task automation. We need to download the SMlets installer from http://smlets.codeplex.com/ on the Service Manager server along with the Service Manager authoring console from http://www.microsoft.com/en-us/download/details.aspx?id=10639 for SCSM 2010, and http://www.microsoft.com/en-us/download/details.aspx?id=28726 for SCSM 2012.

You can implement the following two .ps1 files to auto close the completed changes and resolved incidents after a certain number of days. For example, in the following example, we are taking 7 days to auto close the changes and incidents. The number of days are dynamic and can be set differently for various environments by changing the –168 part (168/24=7 days) in the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime