What shoud be value for -Parent parameter for Add-SCSMEnumeration command

Apr 29, 2012 at 3:08 PM

I am adding a new value to an existing dropdown list using a cmlets in powershell , what value should be provided to the -Parent parameter for Add-SCSMEnumeration command.How to retrieve the value which should be provided for -Parent parameter.

I tried providing it EnumTypeName , EnumTypeId, ManagementPackId from EnumType Table , but still it is giving error.

Add-SCSMEnumeration : Cannot bind parameter 'Parent'. Cannot convert the "2374E644-12CF-5AFB-0BD0-C924BFB0E17A" value of
 type "System.String" to type "Microsoft.EnterpriseManagement.Configuration.ManagementPackEnumeration".

May 11, 2012 at 4:57 PM

Here's an example of adding an enum value to the IncidentSourceEnum, notice that you need a MangementPack and the parent enumeration, in this case, I'm using IncidentSourceEnum, but the principle is the same


PS> $mp = Get-SCSMManagementPack anmpforEnum
PS> Get-SCSMEnumeration incidentsourceenum$

ordinal name               displayname
------- ----               -----------
        IncidentSourceEnum Incident Source

PS> $parentEnum = Get-SCSMEnumeration incidentsourceenum$
PS> Add-SCSMEnumeration -Parent $parentEnum -ManagementPack $mp `
>> -Name IncidentSourceEnum.AddedEnum `
>> -DisplayName "Additional Incident Source" `
>> -Ordinal 50
PS> get-scsmenumeration incidentsourceenum

ordinal name                         displayname
------- ----                         -----------
20      IncidentSourceEnum.Portal    Portal
0       IncidentSourceEnum.Console   Console
15      IncidentSourceEnum.Phone     Phone
5       IncidentSourceEnum.DCM       Configuration Manager (DCM)
50      IncidentSourceEnum.AddedEnum Additional Incident Source
        IncidentSourceEnum           Incident Source
25      IncidentSourceEnum.SCOM      Operations Manager
30      IncidentSourceEnum.System    System
10      IncidentSourceEnum.Email     E-Mail