1 minute read

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.

First, if you don't have the SCSM console installed locally, you'll need to install the SDK Download: http://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx

Make sure to select only the feature: .NET Framework 4.5.1 during the installation Browse to one of the following locations: \</i>\c$\Program Files\Microsoft System Center\Service Manager 2010\SDK Binaries\

or

\\c$\Program Files\Microsoft System Center 2012 R2\Service Manager\SDK Binaries\

And copy the following files to the C:\Windows\Assembly directory Microsoft.EnterpriseManagement.Core.dll Microsoft.EnterpriseManagement.ServiceManager.dll

You can use the following command (make sure to run powershell as admin)

Get-ChildItem *core*, *service* | Copy-Item -dest C:\Windows\assembly

Register the DLL

Download and Install the SMlets module from the following link: https://smlets.codeplex.com/

Once installed, Edit the following file (make sure you do Run As Admin) C:\Program Files\Common Files\SMLets\Smlets.psm1

Comment the lines 4 to 6:

Comment the line 46 and add the following line

$GLOBAL:smdefaultcomputer = "SCSM_SERVER_FQDN"

Finally we can test to use the SMlets module

# Import the SMlets Module
Import-Module -Name SMLets

# Query an Incident ticket
Get-SCSMObject -Class (Get-SCSMClass -Name System.WorkItem.Incident$) -filter "DisplayName -like 'IR31437*'"

Leave a comment