• Glen (Xapity)

SCSM PowerShell Links



We have been working with PowerShell recently and wanted to gather the PowerShell links and resources that were specific to Microsoft Service Manager. These are in no particular order and hopefully you will find them useful.

If we have missed any you think would benefit the SCSM community, drop us an email info@xapity.com

Microsoft Service Manager Cmdlets

https://technet.microsoft.com/system-center-docs/sm/Manage/List-of-the-Service-Manager-Cmdlets

Microsoft provide a large number of PowerShell Cmdlets for SCSM. Here you will find a full reference list of the Out of the Box PowerShell scripts.

SMLets https://smlets.codeplex.com/

The SMLets are extremely useful and will let you make use of many extra commands in your scripts. Many of the scripts listed here will require the SMLets.

These posts by Travis Wright on the Official System Center Service Manager Blog have examples and details and step-by-steps on using the SMLets.

Xapity Posts

A list of our posts related to PowerShell:

A System Engineers Blog

http://www.zgc.se/

Thomas Strömberg’s very useful blog on SCSM and automation.

1. Service Manager PowerShell examples

  • Add an analyst comment to an Incident

  • Add an end user comment to Incident

  • Add an end user comment to Service Request

  • Apply a template to an incident

  • Upload an attachment to a service request

  • Set affected service when creating an incident

  • Populate AD-user class with email-address from Active Directory (AD)

2. Close ALL work items in SCSM with PowerShell

3. SCSM workflow to add UserInput to work item description

4. SCSM: Update child Incidents with parent ID in the title using PowerShell

5. Close ALL work items in SCSM with PowerShell

LazyWinAdmin Blog

http://www.lazywinadmin.com/

Another great blog on Powershell by MVP Francois-Xavier Cat. It has some nice SCSM specific examples: 1. My first steps PowerShell / SCSM

  • Get the Service Requests objects

  • Get the Service Requests created in the last 2 days

  • Get the Service Requests created in the last 2 days Status : In Progress

  • Get related object(s) of the Service Request

  • Get relationship object(s) of the Service Request

  • Get relationship object(s) TargetObject and RelationshipID of the Service Request

  • Get relationship object(s) and filter on Active Directory objects

2. Retrieving Active Directory Object Classes PowerShell / SCSM

  • Finding the real class of an object

  • Adding a property Class

3. Change the Status of a Manual Activity or a Service Request PowerShell / SCSM 4. Get the Work Item parent of an Activity PowerShell / SCSM 5. Get Manual Activities Completed in the last month PowerShell / SCSM 6. Get Manual Activities Completed per Assigned user in the last month PowerShell / SCSM 7. Finding the GUID of an object PowerShell / SCSM

  • Getting the GUID for a WorkItem

  • Incident Request

  • Service Request

  • Review Activity

  • Manual Activity

  • Runbook Activity

  • Getting the GUID for other objects

  • Domain User

  • Domain Computer

8. Get Review Activities Rejected in the last 60 days PowerShell / SCSM

Catapult Systems Blog: SCSM PowerShell: Series Overview

http://blogs.catapultsystems.com/mdowst/archive/2015/06/19/scsm-powershell-series-overview/ Matthew Dowst at Catapult Systems has written a great series of blogs on SCSM PowerShell: 1. Getting Started with Service Manager PowerShell 2. Get Work Item Information

  • Finding the Class

  • Querying Work Items

  • Formatting Your Output

  • Saving Your Results

  • Filtering Your Results

  • Working with Results

3. Configuration Item Information Get 4. Get Relationships 5. Modifying Work/Configuration Items 6. Working with Relationships 7. Get List Items 8. Creating Configuration Items 9. Creating Items Work

  • Create Work Items

  • Work Item class’s prefix settings

10. Creating PowerShell Workflows

  • Creating PowerShell Workflows

  • Script Performance

  • Script Portability

  • Error Checking

  • Putting it all Together Creating PowerShell Workflows

Litware

http://blogs.litware.se/

General Service Manager blog. They have the following PowerShell posts: 1. Manage Attachments from Service Get-FileAttachments.ps1 – Retrieve file 2. SMLets – Enum and wildcards 3. TypeProjections SMLets – Performance Tip 4. Affected User SMTP Address

System Center Central

http://www.systemcentercentral.com/

A general System Center blog site had the following posts: 1. Day 18 - PowerShell and System Center Service Manager 2012––Getting Started

  • Create a new incident in SCSM and writes out the Incident ID

2. Day 18 - PowerShell and System Center Service Manager 2012–SMLets 3. Day 78 - Using PowerShell to create a Service Request using a Template 4. SCSM 2012 QuickTip: Retrieving the Assigned User Info for a Work Item via PowerShell

SCUtils

https://www.scutils.com

Another great blog series on Service Manager with some nice scripts that can be downloaded: 1. How to change URLs in SCSM 2012 notifications templates using PowerShell 2. Add Comment about Review Decision 3. About the type of the parameter of the Powershell script in the Service Manager Authoring Tool 4. How to acknowledge First Response Time for Service Requests in Microsoft System Center 2012 Service Manager 5. How to completely remove Exchange Connector’s instances in Service Manager 2012 6. How to get InstanceID to download a file attachment from a SCSM 2012 portal 7. Getting any SCSM entity by Guid 8. Creating a sealed management pack with SCSM outriggers using PowerShell

System Center Me

http://systemcenterme.com/

A System Center Blog by Jonathan Andersson. 1. Create Request Offering with PowerShell in Service Manager 2012 2. Tiny script that shows all SCSM 2012 Tier Queues that are empty 3. Get the SCSM View ElementID from MP with PowerShell 4. Web page displaying amount of SCSM Incidents, Service Requests and Change Requests 5. Change status in Service Manager 2012 with PowerShell 6. Create Management Pack and Template in Service Manager with PowerShell

Risual Blogs

http://risualblogs.com/blog/

1. Correctly Filtering with SCSM, PowerShell and SMLets

Stefan Johner

http://blog.jhnr.ch/

Has started an SCSM Script Repository https://github.com/sjohner/SCSM-ScriptRepository

Xapity

Read more Xapity PowerShell for SCSM blogs


Xapity PowerShell Activity

The Xapity PowerShell Activity is a new Activity for SCSM that enables PowerShell scripts to be run in SCSM workflows. Automate more of your processes directly in SCSM.

Scripts are stored and updated from a central script repository. The scripts execution output can be viewed and if a failure occurs, an Email Notification can be sent.



Xapity - Innovative Software for SCSM - Discover our Products

#SCSM #PowerShell #Tips #PowerShellActivity

1,015 views

© 2020 Xapity PTY LTD ABN: 81 611 883 482

  • White RSS Icon
  • White YouTube Icon
  • White Vimeo Icon
  • Facebook Clean
  • Twitter Clean