Skip to content

Commit 2bb827a

Browse files
authored
Merge pull request #3294 from microsoftgraph/WeeklyExamplesUpdate/202504250309
[v2] Examples Update
2 parents b339b37 + d0bf0e8 commit 2bb827a

15 files changed

+192
-11
lines changed
Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +0,0 @@
1-
### Example
2-
3-
```powershell
4-
5-
Import-Module Microsoft.Graph.Beta.Applications
6-
7-
Get-MgBetaServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId
8-
9-
```
10-
This example shows how to use the Get-MgBetaServicePrincipalSynchronizationTemplate Cmdlet.
11-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.DeviceManagement
6+
7+
Get-MgBetaDeviceManagementManagedDeviceCloudPcRemoteActionResult -ManagedDeviceId $managedDeviceId
8+
9+
```
10+
This example shows how to use the Get-MgBetaDeviceManagementManagedDeviceCloudPcRemoteActionResult Cmdlet.
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.DeviceManagement
6+
7+
Get-MgBetaDeviceManagementManagedDeviceCloudPcReviewStatus -ManagedDeviceId $managedDeviceId
8+
9+
```
10+
This example shows how to use the Get-MgBetaDeviceManagementManagedDeviceCloudPcReviewStatus Cmdlet.
11+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1+
### Example 1: Check group memberships for a directory object
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.DirectoryObjects
6+
7+
$params = @{
8+
groupIds = @(
9+
"f448435d-3ca7-4073-8152-a1fd73c0fd09"
10+
"bd7c6263-4dd5-4ae8-8c96-556e1c0bece6"
11+
"93670da6-d731-4366-94b5-abed40b6016b"
12+
"f5484ab1-4d4d-41ec-a9b8-754b3957bfc7"
13+
"c9103f26-f3cf-4004-a611-2a14e81b8f79"
14+
)
15+
}
16+
17+
Confirm-MgBetaDirectoryObjectMemberGroup -DirectoryObjectId $directoryObjectId -BodyParameter $params
18+
19+
```
20+
This example will check group memberships for a directory object
121

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.DirectoryObjects
6+
7+
Get-MgBetaDirectoryObject -DirectoryObjectId $directoryObjectId
8+
9+
```
10+
This example shows how to use the Get-MgBetaDirectoryObject Cmdlet.
11+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.DirectoryObjects
6+
7+
$params = @{
8+
ids = @(
9+
"84b80893-8749-40a3-97b7-68513b600544"
10+
"5d6059b6-368d-45f8-91e1-8e07d485f1d0"
11+
"0b944de3-e0fc-4774-a49a-b135213725ef"
12+
"b75a5ab2-fe55-4463-bd31-d21ad555c6e0"
13+
)
14+
types = @(
15+
"user"
16+
"group"
17+
"device"
18+
)
19+
}
20+
21+
Get-MgBetaDirectoryObjectById -BodyParameter $params
22+
23+
```
24+
This example shows how to use the Get-MgBetaDirectoryObjectById Cmdlet.
25+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
### Example 1: Retrieve changes for a collection of users and groups
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.DirectoryObjects
6+
7+
Get-MgBetaDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')"
8+
9+
```
10+
This example will retrieve changes for a collection of users and groups
11+
12+
### Example 2: Retrieve a collection of changes for a directory object
13+
14+
```powershell
15+
16+
Import-Module Microsoft.Graph.Beta.DirectoryObjects
17+
18+
Get-MgBetaDirectoryObjectDelta -Filter "id eq '87d349ed-44d7-43e1-9a83-5f2406dee5bd'"
19+
20+
```
21+
This example will retrieve a collection of changes for a directory object
22+
23+
### Example 3: Retrieve changes to specific properties for a collection of users and groups
24+
25+
```powershell
26+
27+
Import-Module Microsoft.Graph.Beta.DirectoryObjects
28+
29+
Get-MgBetaDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" -Property "microsoft.graph.user/surname,microsoft.graph.group/displayName"
30+
31+
```
32+
This example will retrieve changes to specific properties for a collection of users and groups
33+
34+
### Example 4: Retrieve specific properties only if they changed for a collection of users and groups
35+
36+
```powershell
37+
38+
Import-Module Microsoft.Graph.Beta.DirectoryObjects
39+
40+
Get-MgBetaDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" -Property "microsoft.graph.user/surname,microsoft.graph.group/displayName"
41+
42+
```
43+
This example will retrieve specific properties only if they changed for a collection of users and groups
44+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1+
### Example 1: Check group memberships for a directory object
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.DirectoryObjects
6+
7+
$params = @{
8+
securityEnabledOnly = $false
9+
}
10+
11+
Get-MgBetaDirectoryObjectMemberGroup -DirectoryObjectId $directoryObjectId -BodyParameter $params
12+
13+
```
14+
This example will check group memberships for a directory object
115

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1+
### Example 1: Check group memberships for a directory object
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.DirectoryObjects
6+
7+
$params = @{
8+
groupIds = @(
9+
"f448435d-3ca7-4073-8152-a1fd73c0fd09"
10+
"bd7c6263-4dd5-4ae8-8c96-556e1c0bece6"
11+
"93670da6-d731-4366-94b5-abed40b6016b"
12+
"f5484ab1-4d4d-41ec-a9b8-754b3957bfc7"
13+
"c9103f26-f3cf-4004-a611-2a14e81b8f79"
14+
)
15+
}
16+
17+
Confirm-MgDirectoryObjectMemberGroup -DirectoryObjectId $directoryObjectId -BodyParameter $params
18+
19+
```
20+
This example will check group memberships for a directory object
121

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
6+
7+
Get-MgBetaAdminPeopleNamePronunciation
8+
9+
```
10+
This example shows how to use the Get-MgBetaAdminPeopleNamePronunciation Cmdlet.
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Security
6+
7+
Get-MgBetaSecurityCaseEdiscoveryCaseMember -EdiscoveryCaseId $ediscoveryCaseId
8+
9+
```
10+
This example shows how to use the Get-MgBetaSecurityCaseEdiscoveryCaseMember Cmdlet.
11+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Teams
6+
7+
Confirm-MgTeamScheduleTimeCard -TeamId $teamId -TimeCardId $timeCardId
8+
9+
```
10+
This example shows how to use the Confirm-MgTeamScheduleTimeCard Cmdlet.
11+

0 commit comments

Comments
 (0)