locked
Service Manager 2012 SP1: Create a new user config item - creating relationship for smtp address RRS feed

  • Question

  • Hi,

    I've been going round in circles with this for most of the afternoon.  Essentially I need to script a way of using powershell for SC Orchestrator to run as an action to create new user CI objects in the Service Manager CMDB.  I can do this fine using the 'Create Object' activity from the SM IP.  However the tricky bit is adding the SMTP notification.  It seems I can't use 'Create Relationship' activity to do this from the same IP, and looking round the web there doesn't seem to be a straight forward way of scripting it programmatically.

    I've taken a look at Anton's solution from http://social.technet.microsoft.com/Forums/en-US/customization/thread/9f0deab3-48c9-430e-a47e-f8a6a8361f85, however when I run the powershell script it bombs out with "You cannot call a method on a null-valued expression" at line 3 character 60. This happens to be this part of the script:

     $userRefProj = $managementGroup.EntityTypes.GetTypeProjections() | ? {$_.Name -eq "System.User.Preferences.Projection"}

    I'm not new to poweshell, however troubleshooting or creating a new method for achieving my goal is pushing beyond the limitations of my knowledge.

    Systems are System Centre 2012 SP1 on Server 2008 R2.

    Any and all help would be great.

    thanks,

    Tim

    Monday, June 10, 2013 5:57 PM

Answers

All replies