You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: microsoftgraph/docs-conceptual/use-query-parameters.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Use query parameters to customize PowerShell query outputs"
3
3
description: "Learn how to use optional query parameters in Microsoft Graph PowerShell SDK to customize the output"
4
4
ms.topic: conceptual
5
-
ms.date: 05/26/2023
5
+
ms.date: 08/16/2023
6
6
author: msewaweru
7
7
manager: CelesteDG
8
8
ms.author: eunicewaweru
@@ -20,15 +20,15 @@ Microsoft PowerShell SDK cmdlets may support one or more of the following OData
20
20
>[!TIP]
21
21
>OData query options in the Microsoft Graph API use lowercase names and specify the dollar ($) prefix while in Microsoft Graph PowerShell SDK, their names are Pascal-cased and prefixed with a hyphen (-). For example, `$count` and `$orderBy` are to Microsoft Graph API while `-Count` and `-OrderBy`, respectively, are to Microsoft Graph PowerShell SDK.
22
22
23
-
|Name|Description|Example|
24
-
|--------|----|-----|
25
-
|[-Count](#count-parameter)|Retrieves the total count of matching resources|`Get-MgUser -ConsistencyLevel eventual -Count count`<br>`$count`|
26
-
|[-Expand](#expand-parameter)| Retrieves related resources|<code>Get-MgGroup -GroupId '0e06b38f-931a-47db-9a9a-60ab5f492005' -Expand members | Select -ExpandProperty members</code>|
|[-Top](#top-parameter)| Sets the page size of results. |`Get-MgUser -Top 10`|
32
32
33
33
## Count parameter
34
34
@@ -74,7 +74,7 @@ Id DeletedDateTime
74
74
e6d486c1-20f3-426d-bc5d-736c8f467254
75
75
```
76
76
77
-
With some resource collections, you can also specify the properties to be returned in the expanded resources by adding the `-Select`parameter. The following example performs the same query as the previous example but uses a ['Select`](#select-parameter) statement to limit the properties returned for the expanded child items to the **Id** only.
77
+
With some resource collections, you can also specify the properties to be returned in the expanded resources by adding the `Select`statement. The following example performs the same query as the previous example but uses a `Select` statement to limit the properties returned for the expanded child items to the **Id** only.
78
78
79
79
```powershell
80
80
Get-MgGroup -GroupId '0e06b38f-931a-47db-9a9a-60ab5f492005' -Expand members |
@@ -161,14 +161,14 @@ Id DisplayName Mail UserPrinci
161
161
>[!Note]
162
162
>Support for `-Search` varies by module and some properties support `-Search` only in [advanced queries](/graph/aad-advanced-queries?tabs=powershell).
163
163
164
-
## Select parameter
164
+
## Property parameter
165
165
166
-
Use the `-Select` query parameter to return a set of properties that are different from the default set for an individual resource or a collection of resources. With `-Select`, you can specify a subset or a superset of the default properties.
166
+
Use the `-Property` query parameter to return a set of properties that are different from the default set for an individual resource or a collection of resources. With `-Property`, you can specify a subset or a superset of the default properties.
167
167
168
168
For example, when retrieving a list of all the users, you can specify that only the **Id** and **DisplayName** properties be returned:
We recommend that you use `-Select` to limit the properties returned by a query to those properties needed by your app. This is especially true of queries that might potentially return a large result set. Limiting the properties returned in each row will reduce network load and help improve your app's performance.
185
+
We recommend that you use `-Property` to limit the properties returned by a query to those properties needed by your app. This is especially true of queries that might potentially return a large result set. Limiting the properties returned in each row will reduce network load and help improve your app's performance.
186
186
187
-
Some Azure AD resources that derive from [DirectoryObject](/graph/api/resources/directoryobject), like [User](/graph/api/resources/user) and [Group](/graph/api/resources/group), return a limited, default subset of properties on reads. For these resources, you must use `-Select` to return properties outside of the default set.
187
+
Some Azure AD resources that derive from [DirectoryObject](/graph/api/resources/directoryobject), like [User](/graph/api/resources/user) and [Group](/graph/api/resources/group), return a limited, default subset of properties on reads. For these resources, you must use `-Property` to return properties outside of the default set.
0 commit comments