Quantcast
Channel: The Official System Center Service Manager Blog
Viewing all articles
Browse latest Browse all 562

Using SMLets Beta 3 Post #6–Getting the Owner of a Service

$
0
0

Customer asks how to get the owner of a service using SMLets on this forum thread:

http://social.technet.microsoft.com/Forums/en-US/systemcenterservicemanager/thread/c146d523-3c71-40e4-8617-c20de8bd4ba0

No problem!  This is really just a variation on the following blog post:

http://blogs.technet.com/b/servicemanager/archive/2011/04/21/using-smlets-beta-3-post-2-using-get-scsmenumeration-get-scsmrelationshipobject-get-scsmrelationshipclass-to-automatically-resolve-incidents-when-all-child-activities-are-completed.aspx

In this example first we need to get the service using Get-SCSMObject and Get-SCSMClass.  The class in this case is System.Service (that will get all services created in SCSM and imported from SCOM.  In this case I chose to get the object using the display name.  You could get it in other ways using other properties too.

Then we need to get the related object using the Get-SCSMRelatedObject cmdlet.  We pass the service as the source object and specify the GUID for the System.ConfigItemOwnedByUser relationship type.

The whole solution looks like this:

image


Viewing all articles
Browse latest Browse all 562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>