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

New Post: Add property to objecttemplate using Add()

$
0
0
Ok I found out how, but now the next step is to update the template within the management pack ??

#Create template property object
    $propClass = [Microsoft.EnterpriseManagement.Configuration.ManagementPackObjectTemplateProperty]
    $propObject = New-Object $propClass

    #Add new item to property object
    $propObject.Path = "`$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$"
    $propObject.MixedValue = "SR{0}"
    
    #Add property to template
    $template.PropertyCollection.Add($propObject)

Viewing all articles
Browse latest Browse all 306

Trending Articles