Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2] Examples Update #2924

Merged
merged 3 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +0,0 @@
### Example

```powershell

Import-Module Microsoft.Graph.Beta.Applications

Get-MgBetaServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId

```
This example will### example

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.DeviceManagement.Functions

Get-MgBetaDeviceManagementVirtualEndpointCloudPcRemoteActionResult -CloudPCId $cloudPCId

```
This example shows how to use the Get-MgBetaDeviceManagementVirtualEndpointCloudPcRemoteActionResult Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaAdminPeople

```
This example shows how to use the Get-MgBetaAdminPeople Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaAdminPeopleItemInsight

```
This example shows how to use the Get-MgBetaAdminPeopleItemInsight Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaAdminPeopleProfileCardProperty

```
This example shows how to use the Get-MgBetaAdminPeopleProfileCardProperty Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaAdminPeoplePronoun

```
This example shows how to use the Get-MgBetaAdminPeoplePronoun Cmdlet.

Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
### Example 1: Using the Get-MgBetaAdministrativeUnitScopedRoleMember Cmdlet
```powershell
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
Get-MgBetaAdministrativeUnitScopedRoleMember -AdministrativeUnitId $administrativeUnitId -ScopedRoleMembershipId $scopedRoleMembershipId
```
This example shows how to use the Get-MgBetaAdministrativeUnitScopedRoleMember Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 2: Using the Get-MgBetaAdministrativeUnitScopedRoleMember Cmdlet
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaAdministrativeUnitScopedRoleMember -AdministrativeUnitId $administrativeUnitId

```
This example shows how to use the Get-MgBetaAdministrativeUnitScopedRoleMember Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaContactTransitiveMemberOf -OrgContactId $orgContactId

```
This example shows how to use the Get-MgBetaContactTransitiveMemberOf Cmdlet.

To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDeviceMemberOfAsGroup -DeviceId $deviceId -CountVariable CountVar -Sort "displayName" -Filter "startswith(displayName, 'A')" -ConsistencyLevel eventual


```
This example shows how to use the Get-MgBetaDeviceMemberOfAsGroup Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDeviceTransitiveMemberOfAsGroup -DeviceId $deviceId -CountVariable CountVar -Sort "displayName" -Filter "startswith(displayName, 'a')" -ConsistencyLevel eventual


```
This example shows how to use the Get-MgBetaDeviceTransitiveMemberOfAsGroup Cmdlet.

Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
### Example 1: Using the Get-MgBetaDeviceUsageRights Cmdlet
### Example 1: Get all usage rights for a device

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDeviceUsageRights -DeviceId $deviceId

```
This example shows how to use the Get-MgBetaDeviceUsageRights Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 2: Using the Get-MgBetaDeviceUsageRights Cmdlet
This example will get all usage rights for a device

### Example 2: Get usage rights for a device with specific service identifiers and states

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDeviceUsageRights -DeviceId $deviceId -Filter "state in ('active', 'suspended') and serviceIdentifier in ('ABCD')"

```
This example shows how to use the Get-MgBetaDeviceUsageRights Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
This example will get usage rights for a device with specific service identifiers and states

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfiguration

```
This example shows how to use the Get-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfiguration Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfigurationTrustedCertificateAuthority -CertificateBasedApplicationConfigurationId $certificateBasedApplicationConfigurationId

```
This example shows how to use the Get-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfigurationTrustedCertificateAuthority Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Example 1: Retrieve deleted groups

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryDeletedItemAsGroup

```
This example will retrieve deleted groups

### Example 2: Retrieve the count of deleted user objects and order the results by the deletedDateTime property

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryDeletedItemAsGroup -CountVariable CountVar -Sort "deletedDateTime asc" -Property "id,displayName,deletedDateTime"

```
This example will retrieve the count of deleted user objects and order the results by the deleteddatetime property

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryExternalUserProfile

```
This example shows how to use the Get-MgBetaDirectoryExternalUserProfile Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryInboundSharedUserProfile

```
This example shows how to use the Get-MgBetaDirectoryInboundSharedUserProfile Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryOnPremiseSynchronization -OnPremisesDirectorySynchronizationId $onPremisesDirectorySynchronizationId

```
This example shows how to use the Get-MgBetaDirectoryOnPremiseSynchronization Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryOutboundSharedUserProfile

```
This example shows how to use the Get-MgBetaDirectoryOutboundSharedUserProfile Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryOutboundSharedUserProfileTenant -OutboundSharedUserProfileUserId $outboundSharedUserProfileUserId

```
This example shows how to use the Get-MgBetaDirectoryOutboundSharedUserProfileTenant Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryPendingExternalUserProfile

```
This example shows how to use the Get-MgBetaDirectoryPendingExternalUserProfile Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
### Example 1: Get the list of recommendations

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryRecommendation

```
This example will get the list of recommendations

### Example 2: Get a recommendation object without its associated resources by the recommendationType

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryRecommendation -Filter "recommendationType eq 'turnOffPerUserMFA'"

```
This example will get a recommendation object without its associated resources by the recommendationtype

### Example 3: Get a recommendation object with its associated impacted resources

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryRecommendation -Filter "id eq '0cb31920-84b9-471f-a6fb-468c1a847088_Microsoft.Identity.IAM.Insights.TurnOffPerUserMFA'" -ExpandProperty "impactedResources"

```
This example will get a recommendation object with its associated impacted resources

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectoryRecommendationImpactedResource -RecommendationId $recommendationId

```
This example shows how to use the Get-MgBetaDirectoryRecommendationImpactedResource Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDirectorySubscription

```
This example shows how to use the Get-MgBetaDirectorySubscription Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaDomainRootDomain -DomainId $domainId

```
This example shows how to use the Get-MgBetaDomainRootDomain Cmdlet.

Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
### Example 1: Using the Get-MgBetaOrganizationSettingContactInsight Cmdlet
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

Get-MgBetaOrganizationSettingContactInsight -OrganizationId $organizationId

```
This example shows how to use the Get-MgBetaOrganizationSettingContactInsight Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

Loading
Loading