Skip to content

Set-LMDeviceGroup #51

Open
Open
@aggie87

Description

@aggie87

There may be a problem sending an empty hash to the -Properties parameter when using the -PropertyMethod Refresh

Set-LMDeviceGroup -id 3406 -Properties @{} -Debug -PropertiesMethod Refresh               
DEBUG: Invoked Command: Set-LMDeviceGroup
DEBUG: Bound Parameters: [Id:3406] [Properties:System.Collections.Hashtable] [Debug:True] [PropertiesMethod:Refresh]
DEBUG: Invoked URL: https://xxxxsandbox.logicmonitor.com/santaba/rest/device/groups/3406?opType=refresh
DEBUG: Request Payload: 
{}
DEBUG: Request Headers: [User-Agent:Logic.Monitor-PowerShell-...] [Authorization:xxxxxxxxxxxxxxxxxxxx...] [Content-Type:application/json] [X-Version:3]

shouldn't the payload should look like the following to "clear out" the custom properties?

Set-LMDeviceGroup -id 3406 -Properties @{} -Debug -PropertiesMethod Refresh               
DEBUG: Invoked Command: Set-LMDeviceGroup
DEBUG: Bound Parameters: [Id:3406] [Properties:System.Collections.Hashtable] [Debug:True] [PropertiesMethod:Refresh]
DEBUG: Invoked URL: https://xxxxsandbox.logicmonitor.com/santaba/rest/device/groups/3406?opType=refresh
DEBUG: Request Payload: 
{
    "customProperties": [
    ]
}
DEBUG: Request Headers: [User-Agent:Logic.Monitor-PowerShell-...] [Authorization:xxxxxxxxxxxxxxxxxxxx...] [Content-Type:application/json] [X-Version:3]

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions