Forum Discussion
Cole_McDonald
6 years agoProfessor
OK...
Doing a get on the device got me a list of systemproperties that had the type listed in the returned JSON object.
With that information, this works for the name and the hostname, but not the displayname:
# Change Properties
# Construct URL
$resourcePath = "/device/devices/2332"
$url = $URLRoot + $resourcePath
# Construct Data Body
$data = `
@"
{
`"name`" : `"Server Name`",
`"systemProperties`" : [
{
`"type`" : `"system`" ,
`"name`" : `"system.displayname`" ,
`"value`" : `"Server Name`"
}, {
`"type`" : `"system`" ,
`"name`" : `"system.hostname`" ,
`"value`" : `"Server Name`"
}
]
}
"@
write-output "Making Request: `n $data"
$response = Send-Request `
-accesskey $accessKey `
-accessid $accessId `
-URL $url `
-data $data `
-httpVerb "PATCH"
write-output "response: `n $response"
Why is system.displayname different than all of the other properties?
Related Content
- 6 months ago
- 8 months ago
- 5 months ago