This project is read-only.

New-SCSMServiceOffering with Related Service


When using the Relatedservice parameter on the New-SCSMServiceoffering cmdlet it gives the below NullreferenceException, the command creates a ServiceOffering if the relatedservice parameter is left out of the command.

PS> New-SCSMServiceOffering -Category General -DisplayName TestPS -RelatedService $Serivce -Title TestPS -ManagementPack $MP
New-SCSMServiceOffering : Object reference not set to an instance of an object.
At line:1 char:1
  • New-SCSMServiceOffering -Category General -DisplayName TestPS -RelatedService $S ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [New-SCSMServiceOffering], NullReferenceException
    • FullyQualifiedErrorId : System.NullReferenceException,SMLets.NewSCSMServiceOfferingCommand
Here is the contents of the $Service object that I am passing into the New-SCSMServiceOffering.

PS> $Service

ClassName DisplayName LastModified

Microsoft.SystemCenter.BusinessService Telepresence 3/14/2014 10:42:05 AM