Get-Group -ParentID 1 | Lists to wrong Groups
See original GitHub issueDescribe the bug
We have the Core Server Object (Probe, with ID 1). In there is 1 Group with 1 Device. In there are some Sensors.
Our Script is calling the Function:
get-Group -ParentID x
This works with the Probe ID of e.g. “15193”. But it doesn’t work for the ID 1 (Core).
My result of my this code line includes 263 PRTG Groups. Expected is 1 PRTG Group.
Steps to reproduce
get-group -ParentID 1
What is the output of ‘Get-PrtgClient -Diagnostic’?
PSVersion : 5.1.19041.1237
PSEdition : Desktop
OS : Microsoft Windows 10 Pro
PrtgAPIVersion : 0.9.16
Culture : de-CH
CLRVersion : 528372
PrtgVersion : 21.3.70.1629
PrtgLanguage : Unknown
Additional context
We got totally 402 PRTG Groups. So it isn’t listing all the groups. I couldn’t define, how this is filtered. It isn’t a wildcard filter with “1” or something like this. Because in the result are Groups with a Parent ID’s that dosn’t contain any “1” too.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
c# - LINQ query output groups and subgroups in JSON
5) For each Group, if the parent's ID is null, add the Group to the Roots list. 6) For each Group in the...
Read more >Groups API
Get a list of visible groups for the authenticated user. When accessed without authentication, only public groups are returned.
Read more >Incorrect "UserOrGroupId" in share object for criteria-based ...
I have a number of criteria-based sharing rules on that object, and they are properly sharing the records to the appropriate groups specified...
Read more >Use REST API to get group SharePoint 2010
I have a group on my site - I want users to be able to add and remove themselves from this group via...
Read more >groups_get_groups( array|string $args = '' )
groups_get_groups( array|string $args = '' ). Get a collection of groups, based on the parameters passed. Description. Parameters. $args.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lordmilko - Update: It is confirmed, there is a Bug in the API. With the exception of the “tags” filter, every filter actually uses wildcards unintentionally. I will be informed, when the issue is solved.
Now, the PRTG Server is on the same version as yours.
Then I ran the same Query:
And I got the same wrong result with the parameter “ParentID=1”.
The API request direct in the browser with the parameter e.g. “ParentID=12073” worked as expected. The Command “get-group” in PowerShell works here too.
So, I will open a ticket at Paessler and ask them for their input.