Allen,
No consulting and no support on this PowerShell - use on a test system and all other stern warnings
Start your PowerShell off by pulling in the CSV file and calling out the headers - I found this was needed even though it should have been able to handle headers in the file. Then you can
Here's what I used in front of the sample Groups.ps1 to import groups in.
Import-CSV -header ContainerID,Owner,Status,Name,Frequency,Description,PollingEnabled c:\groups_solarwinds.csv | Foreach-Object{
$groupname = @{Name = "$($_.Name)"; Status ="$($_.Status)"; Description = "$($_.Description)"; Frequency= "$($_.Frequency)"}
$members = @{ Name = "$($groupname.Name)"; Definition = "filter:/Orion.Nodes[StartsWith(CustomProperties.system,'$($groupname.Name)')]" }
You would need to do the same ForEach to build the variables you need ($nodeid and $customprops) before rolling through each row in your csv.
# build the node URI
$uri = "swis://localhost/Orion/Orion.Nodes/NodeID=$nodeId/CustomProperties";
# set the custom property
Set-SwisObject $swis -Uri $uri -Properties $customProps
I have to finish a migration but need this also - I might get some time next week to finish and test it...