Get-DeviceGroupCollection
SYNOPSIS​
Get device group collection
SYNTAX​
Get-DeviceGroupCollection
[[-QueryTemplate] <String>]
[[-OrderBy] <String>]
[[-Query] <Object[]>]
[[-Name] <String>]
[[-Type] <String>]
[[-FragmentType] <String>]
[[-Owner] <String>]
[-ExcludeRootGroup]
[[-Group] <Object[]>]
[-SkipChildrenNames]
[-WithChildren]
[-WithChildrenCount]
[-WithGroups]
[-WithParents]
[-PageSize <Int32>]
[-WithTotalPages]
[-WithTotalElements]
[-CurrentPage <Int32>]
[-TotalPages <Int32>]
[-IncludeAll]
[-Raw]
[-OutputFile <String>]
[-OutputFileRaw <String>]
[-OutputTemplate <String>]
[-Proxy]
[-NoProxy]
[-Timeout <String>]
[-NoProgress]
[-Session <String>]
[-SessionUsername <String>]
[-SessionPassword <String>]
[-Output <String>]
[-View <String>]
[-AsHashTable]
[-AsPSObject]
[-Flatten]
[-Compact]
[-NoColor]
[-Cache]
[-NoCache]
[-CacheTTL <String>]
[-Insecure]
[-Help]
[-Examples]
[-Confirm]
[-ConfirmText <String>]
[-WithError]
[-SilentStatusCodes <String>]
[-SilentExit]
[-Dry]
[-DryFormat <String>]
[-Workers <Int32>]
[-Delay <String>]
[-DelayBefore <String>]
[-MaxJobs <Int32>]
[-Progress]
[-AbortOnErrors <Int32>]
[-NoLog]
[-LogMessage <String>]
[-Select <String[]>]
[-Filter <String[]>]
[-Header <String[]>]
[-CustomQueryParam <String[]>]
[<CommonParameters>]
DESCRIPTION​
Get a collection of device groups based on filter parameters
EXAMPLES​
EXAMPLE 1​
Get-DeviceGroupCollection -Name "parent*"
Get a collection of device groups with names that start with 'parent'
PARAMETERS​
-QueryTemplate​
String template to be used when applying the given query. Use %s to reference the query/pipeline input
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-OrderBy​
Order by. e.g. _id asc or name asc or creationTime.date desc
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Query​
Additional query filter
Type: Object[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-Name​
Filter by name
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Type​
Filter by type
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-FragmentType​
Filter by fragment type
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Owner​
Filter by owner
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ExcludeRootGroup​
Filter by group inclusion
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Group​
Filter by group inclusion
Type: Object[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SkipChildrenNames​
Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-WithChildren​
Include names of child assets (only use where necessary as it is slow for large groups)
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-WithChildrenCount​
When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-WithGroups​
When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-WithParents​
Include a flat list of all parents and grandparents of the given object
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-AbortOnErrors​
Abort batch when reaching specified number of errors
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-AsHashTable​
Return output as PowerShell Hashtables
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-AsPSObject​
Return output as PowerShell PSCustomObjects
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Cache​
Enable cached responses
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CacheTTL​
Cache time-to-live (TTL) as a duration, i.e. 60s, 2m
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Compact​
Compact instead of pretty-printed output when using json output. Pretty print is the default if output is the terminal
Type: SwitchParameter
Parameter Sets: (All)
Aliases: Compress
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm​
Prompt for confirmation
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ConfirmText​
Custom confirmation text
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CurrentPage​
Current page which should be returned
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CustomQueryParam​
add custom URL query parameters. i.e. --customQueryParam 'withCustomOption=true,myOtherOption=myvalue'
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Delay​
delay after each request. It accepts a duration, i.e. 1ms, 0.5s, 1m etc.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DelayBefore​
delay before each request. It accepts a duration, i.e. 1ms, 0.5s, 1m etc.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Dry​
Dry run. Don't send any data to the server
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DryFormat​
Dry run output format. i.e. json, dump, markdown or curl
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Examples​
Show examples for the current command
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Filter​
Apply a client side filter to response before returning it to the user
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Flatten​
flatten json output by replacing nested json properties with properties where their names are represented by dot notation
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Header​
custom headers. i.e. --header 'Accept: value, AnotherHeader: myvalue'
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Help​
Show command help
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IncludeAll​
Include all results by iterating through each page
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Insecure​
Allow insecure server connections when using SSL
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-LogMessage​
Add custom message to the activity log
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MaxJobs​
Maximum number of jobs. 0 = unlimited (use with caution!)
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NoCache​
Force disabling of cached responses (overwrites cache setting)
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NoColor​
Don't use colors when displaying log entries on the console
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NoLog​
Disables the activity log for the current command
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NoProgress​
Disable progress bars
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NoProxy​
Ignore the proxy settings
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Output​
Output format i.e. table, json, csv, csvheader
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-OutputFile​
Save JSON output to file (after select/view)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-OutputFileRaw​
Save raw response to file (before select/view)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-OutputTemplate​
jsonnet template to apply to the output
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PageSize​
Maximum results per page
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Progress​
Show progress bar. This will also disable any other verbose output
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Proxy​
Proxy setting, i.e. http://10.0.0.1:8080
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Raw​
Show raw response. This mode will force output=json and view=off
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Select​
Comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber'
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Session​
Session configuration
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SessionPassword​
Override session password
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SessionUsername​
Override session username. i.e. peter or t1234/peter (with tenant)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SilentExit​
Silent status codes do not affect the exit code
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SilentStatusCodes​
Status codes which will not print out an error message
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Timeout​
Request timeout. It accepts a duration, i.e. 1ms, 0.5s, 1m etc.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-TotalPages​
Total number of pages to get
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-View​
Use views when displaying data on the terminal. Disable using --view off
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WithError​
Errors will be printed on stdout instead of stderr
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WithTotalElements​
Request Cumulocity to include the total elements in the response statistics under .statistics.totalElements (introduced in 10.13)
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WithTotalPages​
Request Cumulocity to include the total pages in the response statistics under .statistics.totalPages
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Workers​
Number of workers
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters​
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS​
OUTPUTS​
System.Object​
NOTES​
RELATED LINKS​
https://reubenmiller.github.io/go-c8y-cli/docs/cli/c8y/devicegroups_list