Quantcast
Channel: SCSM PowerShell Cmdlets
Viewing all articles
Browse latest Browse all 306

Created Unassigned: New-SCSMServiceOffering with Related Service [11634]

$
0
0
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

Viewing all articles
Browse latest Browse all 306

Trending Articles



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