Is there a list of which properties are immutable? Here's the list I'm working with currently (some names have been changed to protect the innocent) :
type name value
---- ---- -----
system system.collector false
system system.collectordesc *******
system system.collectorid 6
system system.collectorplatform windows
system system.collectorversion 28002
system system.deviceGroupId 174,12,5
system system.deviceId 2092
system system.devicetype 0
system system.displayname *******
system system.domain <domain>.local
system system.enablenetflow false
system system.groups <company>/Data Center - MN,Devices...
system system.hostname *******
system system.ips *******
system system.model PowerEdge R610
system system.netscaninfo Discovered by Collector (id=5) via Net...
system system.prefcollectordesc <domain>\<collector name>
system system.prefcollectorid 6
system system.resourceCreatedOn 1548440971
system system.staticgroups <company>/Data Center - MN
system system.sysinfo Microsoft Windows Server 2008 R2 Enter...
system system.sysname *******
system system.systemtype x64-based PC
system system.totalphysicalmemory 119.99GB
I'm trying to force a device to move to a different Collector. Since the Collectors don't seem to know which devices are looking at them, I'm assuming the change has to be made on the device itself... I have everything working on my simplified autobalancer except for the payload. (the built in autobalancing collector groups don't seem to work yet). Here's what I've got for the payload:
$resourcePath = "/device/devices/$($toMove.id)"
$data = @"
{
`"Name`" : `"<system name>`" ,
`"systemProperties`" : [
{
`"type`" : `"system`" ,
`"name`" : `"system.collectorid`" ,
`"value`" : `"5`"
},
{
`"type`" : `"system`" ,
`"name`" : `"system.prefcollectorid`" ,
`"value`" : `"5`"
}
]
}
"@
# Make Request
$response = Send-Request `
-company $company `
-accessid $accessID `
-accesskey $accessKey `
-resourcePath $resourcePath `
-data $data `
-httpVerb "PATCH"
It doesn't complain about the request... but doesn't make any changes.