Skip to content

Commit 11bece4

Browse files
authored
Merge pull request #2924 from microsoftgraph/WeeklyExamplesUpdate/202408230311
[v2] Examples Update
2 parents fd0f41e + 32dea43 commit 11bece4

File tree

60 files changed

+495
-36
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+495
-36
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 will### example
11-
Lines changed: 1 addition & 0 deletions
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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
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.Functions
6+
7+
Get-MgBetaDeviceManagementVirtualEndpointCloudPcRemoteActionResult -CloudPCId $cloudPCId
8+
9+
```
10+
This example shows how to use the Get-MgBetaDeviceManagementVirtualEndpointCloudPcRemoteActionResult Cmdlet.
11+
Lines changed: 1 addition & 0 deletions
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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

src/Groups/beta/examples/Get-MgBetaGroupSiteContentModelByName.md

Whitespace-only changes.
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.Identity.DirectoryManagement
6+
7+
Get-MgBetaAdminPeople
8+
9+
```
10+
This example shows how to use the Get-MgBetaAdminPeople 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.Identity.DirectoryManagement
6+
7+
Get-MgBetaAdminPeopleItemInsight
8+
9+
```
10+
This example shows how to use the Get-MgBetaAdminPeopleItemInsight 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.Identity.DirectoryManagement
6+
7+
Get-MgBetaAdminPeopleProfileCardProperty
8+
9+
```
10+
This example shows how to use the Get-MgBetaAdminPeopleProfileCardProperty 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.Identity.DirectoryManagement
6+
7+
Get-MgBetaAdminPeoplePronoun
8+
9+
```
10+
This example shows how to use the Get-MgBetaAdminPeoplePronoun Cmdlet.
11+
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
### Example 1: Using the Get-MgBetaAdministrativeUnitScopedRoleMember Cmdlet
2-
```powershell
3-
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
4-
Get-MgBetaAdministrativeUnitScopedRoleMember -AdministrativeUnitId $administrativeUnitId -ScopedRoleMembershipId $scopedRoleMembershipId
5-
```
6-
This example shows how to use the Get-MgBetaAdministrativeUnitScopedRoleMember Cmdlet.
7-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
8-
### Example 2: Using the Get-MgBetaAdministrativeUnitScopedRoleMember Cmdlet
1+
### Example 1: Code snippet
2+
93
```powershell
4+
105
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
6+
117
Get-MgBetaAdministrativeUnitScopedRoleMember -AdministrativeUnitId $administrativeUnitId
8+
129
```
1310
This example shows how to use the Get-MgBetaAdministrativeUnitScopedRoleMember Cmdlet.
14-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11+
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
### Example 1: Code snippet
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
56
67
Get-MgBetaContactTransitiveMemberOf -OrgContactId $orgContactId
8+
79
```
810
This example shows how to use the Get-MgBetaContactTransitiveMemberOf Cmdlet.
911

10-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11-
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
6+
7+
Get-MgBetaDeviceMemberOfAsGroup -DeviceId $deviceId -CountVariable CountVar -Sort "displayName" -Filter "startswith(displayName, 'A')" -ConsistencyLevel eventual
8+
9+
10+
```
11+
This example shows how to use the Get-MgBetaDeviceMemberOfAsGroup Cmdlet.
12+
Lines changed: 1 addition & 0 deletions
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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
6+
7+
Get-MgBetaDeviceTransitiveMemberOfAsGroup -DeviceId $deviceId -CountVariable CountVar -Sort "displayName" -Filter "startswith(displayName, 'a')" -ConsistencyLevel eventual
8+
9+
10+
```
11+
This example shows how to use the Get-MgBetaDeviceTransitiveMemberOfAsGroup Cmdlet.
12+
Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1-
### Example 1: Using the Get-MgBetaDeviceUsageRights Cmdlet
1+
### Example 1: Get all usage rights for a device
2+
23
```powershell
4+
35
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
6+
47
Get-MgBetaDeviceUsageRights -DeviceId $deviceId
8+
59
```
6-
This example shows how to use the Get-MgBetaDeviceUsageRights Cmdlet.
7-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
8-
### Example 2: Using the Get-MgBetaDeviceUsageRights Cmdlet
10+
This example will get all usage rights for a device
11+
12+
### Example 2: Get usage rights for a device with specific service identifiers and states
13+
914
```powershell
15+
1016
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
17+
1118
Get-MgBetaDeviceUsageRights -DeviceId $deviceId -Filter "state in ('active', 'suspended') and serviceIdentifier in ('ABCD')"
19+
1220
```
13-
This example shows how to use the Get-MgBetaDeviceUsageRights Cmdlet.
14-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
21+
This example will get usage rights for a device with specific service identifiers and states
22+
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-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfiguration
8+
9+
```
10+
This example shows how to use the Get-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfiguration Cmdlet.
11+
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-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfigurationTrustedCertificateAuthority -CertificateBasedApplicationConfigurationId $certificateBasedApplicationConfigurationId
8+
9+
```
10+
This example shows how to use the Get-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfigurationTrustedCertificateAuthority Cmdlet.
11+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
### Example 1: Retrieve deleted groups
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
6+
7+
Get-MgBetaDirectoryDeletedItemAsGroup
8+
9+
```
10+
This example will retrieve deleted groups
11+
12+
### Example 2: Retrieve the count of deleted user objects and order the results by the deletedDateTime property
13+
14+
```powershell
15+
16+
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
17+
18+
Get-MgBetaDirectoryDeletedItemAsGroup -CountVariable CountVar -Sort "deletedDateTime asc" -Property "id,displayName,deletedDateTime"
19+
20+
```
21+
This example will retrieve the count of deleted user objects and order the results by the deleteddatetime property
22+

src/Identity.DirectoryManagement/beta/examples/Get-MgBetaDirectoryDeviceLocalCredential.md

Whitespace-only changes.
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-MgBetaDirectoryExternalUserProfile
8+
9+
```
10+
This example shows how to use the Get-MgBetaDirectoryExternalUserProfile 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.Identity.DirectoryManagement
6+
7+
Get-MgBetaDirectoryInboundSharedUserProfile
8+
9+
```
10+
This example shows how to use the Get-MgBetaDirectoryInboundSharedUserProfile 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.Identity.DirectoryManagement
6+
7+
Get-MgBetaDirectoryOnPremiseSynchronization -OnPremisesDirectorySynchronizationId $onPremisesDirectorySynchronizationId
8+
9+
```
10+
This example shows how to use the Get-MgBetaDirectoryOnPremiseSynchronization 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.Identity.DirectoryManagement
6+
7+
Get-MgBetaDirectoryOutboundSharedUserProfile
8+
9+
```
10+
This example shows how to use the Get-MgBetaDirectoryOutboundSharedUserProfile 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.Identity.DirectoryManagement
6+
7+
Get-MgBetaDirectoryOutboundSharedUserProfileTenant -OutboundSharedUserProfileUserId $outboundSharedUserProfileUserId
8+
9+
```
10+
This example shows how to use the Get-MgBetaDirectoryOutboundSharedUserProfileTenant 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.Identity.DirectoryManagement
6+
7+
Get-MgBetaDirectoryPendingExternalUserProfile
8+
9+
```
10+
This example shows how to use the Get-MgBetaDirectoryPendingExternalUserProfile Cmdlet.
11+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
### Example 1: Get the list of recommendations
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
6+
7+
Get-MgBetaDirectoryRecommendation
8+
9+
```
10+
This example will get the list of recommendations
11+
12+
### Example 2: Get a recommendation object without its associated resources by the recommendationType
13+
14+
```powershell
15+
16+
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
17+
18+
Get-MgBetaDirectoryRecommendation -Filter "recommendationType eq 'turnOffPerUserMFA'"
19+
20+
```
21+
This example will get a recommendation object without its associated resources by the recommendationtype
22+
23+
### Example 3: Get a recommendation object with its associated impacted resources
24+
25+
```powershell
26+
27+
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
28+
29+
Get-MgBetaDirectoryRecommendation -Filter "id eq '0cb31920-84b9-471f-a6fb-468c1a847088_Microsoft.Identity.IAM.Insights.TurnOffPerUserMFA'" -ExpandProperty "impactedResources"
30+
31+
```
32+
This example will get a recommendation object with its associated impacted resources
33+
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-MgBetaDirectoryRecommendationImpactedResource -RecommendationId $recommendationId
8+
9+
```
10+
This example shows how to use the Get-MgBetaDirectoryRecommendationImpactedResource 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.Beta.Identity.DirectoryManagement
6+
7+
Get-MgBetaDirectorySubscription
8+
9+
```
10+
This example shows how to use the Get-MgBetaDirectorySubscription Cmdlet.
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
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.Identity.DirectoryManagement
6+
7+
Get-MgBetaDomainRootDomain -DomainId $domainId
8+
9+
```
10+
This example shows how to use the Get-MgBetaDomainRootDomain Cmdlet.
11+
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
### Example 1: Using the Get-MgBetaOrganizationSettingContactInsight Cmdlet
1+
### Example 1: Code snippet
2+
23
```powershell
4+
35
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
6+
47
Get-MgBetaOrganizationSettingContactInsight -OrganizationId $organizationId
8+
59
```
610
This example shows how to use the Get-MgBetaOrganizationSettingContactInsight Cmdlet.
7-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11+

0 commit comments

Comments
 (0)