Showing posts with label SCORCH. Show all posts
Showing posts with label SCORCH. Show all posts

2016/02/23

PowerShell/SCSM - Get the Work Item parent of an Activity


In the last couple of months, I have been busy on some projects involving System Center Service Manager (SCSM), System Center Orchestrator (SCORCH) and Cireson Portal/Asset Management and I had to script a couple of repetitive tasks using PowerShell.

The following solution allows you to retrieve the parent Work Item of an Activity.

This is useful when you are using a Runbook Activity in your workflow that will invoke a Runbook inside System Center Orchestrator.

Example: In the case where you have a Work Item, a Service Request for instance, with bunch of activities (Review Activity (RA), Manual Activity (MA), Runbook Activity (RBA), etc... ). You could have a Runbook Activity (RBA) calling a System Center Orchestrator runbook.



From a SCORCH perspective it would be useful to find which Work Item the runbook activity belongs to if you want to perform some actions on the Work Item itself and other Activities.
Example: Edit the Work Item Title, Add a reviewer, Skip any Activities with a particular stage, etc...

Here is a PowerShell function that can just do this job for you: Get-SCSMWorkItemParent.


2014/09/08

PowerShell/SCSM - Install and Config the SMlets Module

If you follow my blog, you might have noticed that I recently started to post about SCSM. We just finished to migrate to a new SCSM environment in Azure (Iaas) while using Cireson Portal as a front end.

Of course of lot of the automation part is handled by SCORCH in the background which rely on a lot of PowerShell :-)  (We don't use SMA yet, but I will soon look into it)

Anyway I just wanted to post a quick article on how to configure SMlets on a workstation to be able to query SCSM.

2014/08/24

PowerShell/SCSM - Retrieving Active Directory Object Classes


Following my previous post, today I continue my SCSM journey. I had to create a new automation workflow using SCSM and SCORCH to give the ability to a portal user to add an Active Directory Account to one or more group(s).

Once you get the input of the user, the selected user account and groups impacted by the request are added to the Service Request Related Item, in the Configuration Item field.

Finding this information with PowerShell was not easy. Also Users and Groups are tagged as "User Class" and we want to avoid querying the Active Directory to verify is a user is really a user and a group... really a group object.