Skip to content
Open
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
@@ -0,0 +1,11 @@
### Example

```powershell
Import-Module Microsoft.Graph.Beta.Applications
Get-MgBetaServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId
```
This example shows how to use the Get-MgBetaServicePrincipalSynchronizationTemplate Cmdlet.

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

```powershell

Import-Module Microsoft.Graph.Bookings

Get-MgVirtualEventTownhallRegistrationConfiguration -VirtualEventTownhallId $virtualEventTownhallId

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

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

```powershell

Import-Module Microsoft.Graph.DeviceManagement.Administration

Get-MgDeviceManagementVirtualEndpointServicePlan

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

30 changes: 30 additions & 0 deletions src/Files/beta/examples/Lock-MgBetaDriveItem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
### Example 1: Acquire a lock on an unlocked file

```powershell

Import-Module Microsoft.Graph.Beta.Files

$params = @{
durationMinutes = 30
}

Lock-MgBetaDriveItem -DriveId $driveId -DriveItemId $driveItemId -BodyParameter $params

```
This example will acquire a lock on an unlocked file

### Example 2: Refresh an existing lock the caller already holds

```powershell

Import-Module Microsoft.Graph.Beta.Files

$params = @{
durationMinutes = 10
}

Lock-MgBetaDriveItem -DriveId $driveId -DriveItemId $driveItemId -BodyParameter $params

```
This example will refresh an existing lock the caller already holds

1 change: 1 addition & 0 deletions src/Files/beta/examples/Lock-MgBetaDriveRoot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions src/Files/beta/examples/Lock-MgBetaGroupDriveItem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions src/Files/beta/examples/Lock-MgBetaGroupDriveRoot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions src/Files/beta/examples/Lock-MgBetaUserDriveItem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions src/Files/beta/examples/Lock-MgBetaUserDriveRoot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

11 changes: 11 additions & 0 deletions src/Files/beta/examples/Publish-MgBetaDriveItemLock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Files

Publish-MgBetaDriveItemLock -DriveId $driveId -DriveItemId $driveItemId

```
This example shows how to use the Publish-MgBetaDriveItemLock Cmdlet.

40 changes: 40 additions & 0 deletions src/Files/beta/examples/Set-MgBetaDriveItemSensitivityLabel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Files

$params = @{
sensitivityLabelId = "5feba255-812e-446a-ac59-a7044ef827b5"
assignmentMethod = "standard"
justificationText = "test_justification"
appliedByUser = @{
id = "4a2ec3c4-1b2d-3e4f-5a6b-7c8d9e0f1a2b"
}
}

Set-MgBetaDriveItemSensitivityLabel -DriveId $driveId -DriveItemId $driveItemId -BodyParameter $params

```
This example shows how to use the Set-MgBetaDriveItemSensitivityLabel Cmdlet.

### Example 2: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Files

$params = @{
sensitivityLabelId = "5feba255-812e-446a-ac59-a7044ef827b5"
assignmentMethod = "standard"
justificationText = "test_justification"
appliedByUser = @{
userPrincipalName = "adelev@contoso.com"
}
}

Set-MgBetaDriveItemSensitivityLabel -DriveId $driveId -DriveItemId $driveItemId -BodyParameter $params

```
This example shows how to use the Set-MgBetaDriveItemSensitivityLabel 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 @@

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 @@

40 changes: 40 additions & 0 deletions src/Files/v1.0/examples/Set-MgDriveItemSensitivityLabel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Files

$params = @{
sensitivityLabelId = "5feba255-812e-446a-ac59-a7044ef827b5"
assignmentMethod = "standard"
justificationText = "test_justification"
appliedByUser = @{
id = "4a2ec3c4-1b2d-3e4f-5a6b-7c8d9e0f1a2b"
}
}

Set-MgDriveItemSensitivityLabel -DriveId $driveId -DriveItemId $driveItemId -BodyParameter $params

```
This example shows how to use the Set-MgDriveItemSensitivityLabel Cmdlet.

### Example 2: Code snippet

```powershell

Import-Module Microsoft.Graph.Files

$params = @{
sensitivityLabelId = "5feba255-812e-446a-ac59-a7044ef827b5"
assignmentMethod = "standard"
justificationText = "test_justification"
appliedByUser = @{
userPrincipalName = "adelev@contoso.com"
}
}

Set-MgDriveItemSensitivityLabel -DriveId $driveId -DriveItemId $driveItemId -BodyParameter $params

```
This example shows how to use the Set-MgDriveItemSensitivityLabel 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 @@

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
Expand Up @@ -4,7 +4,7 @@

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

Remove-MgBetaDirectoryTenantGovernancePolicyTemplate -GovernancePolicyTemplateId $governancePolicyTemplateId
Remove-MgBetaDirectoryTenantGovernancePolicyTemplate -TenantGovernancePolicyTemplateId $tenantGovernancePolicyTemplateId

```
This example shows how to use the Remove-MgBetaDirectoryTenantGovernancePolicyTemplate Cmdlet.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Identity.DirectoryManagement

Get-MgDirectoryRecoveryJob

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

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

```powershell

Import-Module Microsoft.Graph.Identity.DirectoryManagement

Get-MgDirectoryRecoverySnapshot

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

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

```powershell

Import-Module Microsoft.Graph.Identity.DirectoryManagement

Get-MgDirectoryRemoteTenantGroup

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

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

```powershell

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

$params = @{
subject = @{
"@odata.type" = "#microsoft.graph.identityGovernance.provisioningObjectWorkflowSubject"
id = "b74f0fae-b1f3-4c96-9bf0-d4d8a8e37cbe"
attributeSetEntries = @(
@{
name = "department"
value = "Engineering"
}
@{
name = "jobTitle"
value = "Software Engineer"
}
)
}
}

Initialize-MgBetaIdentityGovernanceLifecycleWorkflowAndWait -WorkflowId $workflowId -BodyParameter $params

```
This example shows how to use the Initialize-MgBetaIdentityGovernanceLifecycleWorkflowAndWait 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.Governance

Invoke-MgBetaAcceptIdentityGovernanceAccessReviewDefinitionInstanceStageRecommendation -AccessReviewScheduleDefinitionId $accessReviewScheduleDefinitionId -AccessReviewInstanceId $accessReviewInstanceId -AccessReviewStageId $accessReviewStageId

```
This example shows how to use the Invoke-MgBetaAcceptIdentityGovernanceAccessReviewDefinitionInstanceStageRecommendation Cmdlet.

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

```powershell

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

$params = @{
subjects = @(
@{
"@odata.type" = "#microsoft.graph.user"
id = "b59552b8-fa7b-4f68-8496-0a529aace8c0"
}
@{
"@odata.type" = "#microsoft.graph.user"
id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
)
}

Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflow -WorkflowId $workflowId -BodyParameter $params

```
This example shows how to use the Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflow 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,22 @@
### Example 1: Workflow with task failures

```powershell

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

Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflowTaskFailure -WorkflowId $workflowId

```
This example will workflow with task failures

### Example 2: Workflow with no task failures

```powershell

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

Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflowTaskFailure -WorkflowId $workflowId

```
This example will workflow with no task failures

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
### Example 1: Create a user-centric (catalog) access review definition

```powershell

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

$params = @{
displayName = "Catalog access review"
descriptionForAdmins = "Quarterly user-centric review of catalog resources"
scope = @{
"@odata.type" = "#microsoft.graph.principalResourceMembershipsScope"
principalScopes = @(
@{
"@odata.type" = "#microsoft.graph.accessReviewPrincipalScope"
scopeType = "allUsers"
}
)
resourceScopes = @(
@{
"@odata.type" = "#microsoft.graph.accessReviewResourceScope"
resourceId = "c6010d0c-ff41-4929-9776-fa03a03dd5ac"
scopeType = "catalog"
}
)
}
reviewers = @(
@{
"@odata.type" = "#microsoft.graph.accessReviewReviewerScope"
scopeType = "manager"
}
)
settings = @{
mailNotificationsEnabled = $true
reminderNotificationsEnabled = $true
justificationRequiredOnApproval = $true
instanceDurationInDays = 6
recommendationsEnabled = $true
recurrence = @{
pattern = @{
type = "absoluteMonthly"
interval = 1
}
range = @{
type = "noEnd"
startDate = "2026-08-31"
}
}
}
}

New-MgBetaIdentityGovernanceAccessReviewUnifiedDefinition -BodyParameter $params

```
This example will create a user-centric (catalog) access review definition

Loading
Loading