Fairly new to powershell and NPM,
We are running NPM 11.5, Just upgraded from 11.0.1 and SDK 1.10.16
Since the addition of custom fields being added to groups, does anyone have examples of how to add custom properties using powershell?
Fairly new to powershell and NPM,
We are running NPM 11.5, Just upgraded from 11.0.1 and SDK 1.10.16
Since the addition of custom fields being added to groups, does anyone have examples of how to add custom properties using powershell?
Hello, to edit the group Custom property you need to know the group uri and to edit the value specify the "/CustomProperties" in addition.
Let's say I created group Custom property, called "grcp", the update statement will look like:
$grCPUri = ((get-swisdata $swis "select top 1 uri from orion.groups") + "/CustomProperties")
Set-SwisObject $swis -Uri $grCPUri -Properties @{grcp='sadf2'}
to create the new one use the verb "CreateCustomProperty" from the Orion.GroupCustomProperties entity.
Example with some dummy values:
Invoke-SwisVerb $swis "Orion.GroupCustomProperties" "CreateCustomProperty" @('GroupCP2','DescrCP1', 'memo', '20', '', 'bps', 'Header', 'left', 'bps', 'bps') | Out-Null
I hope it helps.
Honza
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.