diff --git a/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md b/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md index e69de29bb2d..d05037861a5 100644 --- a/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md +++ b/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md @@ -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. + diff --git a/src/Bookings/v1.0/examples/Get-MgVirtualEventTownhallRegistrationConfiguration.md b/src/Bookings/v1.0/examples/Get-MgVirtualEventTownhallRegistrationConfiguration.md index e69de29bb2d..4fdace90a43 100644 --- a/src/Bookings/v1.0/examples/Get-MgVirtualEventTownhallRegistrationConfiguration.md +++ b/src/Bookings/v1.0/examples/Get-MgVirtualEventTownhallRegistrationConfiguration.md @@ -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. + diff --git a/src/DeviceManagement.Administration/v1.0/examples/Get-MgDeviceManagementVirtualEndpointServicePlan.md b/src/DeviceManagement.Administration/v1.0/examples/Get-MgDeviceManagementVirtualEndpointServicePlan.md index e69de29bb2d..d69368e0713 100644 --- a/src/DeviceManagement.Administration/v1.0/examples/Get-MgDeviceManagementVirtualEndpointServicePlan.md +++ b/src/DeviceManagement.Administration/v1.0/examples/Get-MgDeviceManagementVirtualEndpointServicePlan.md @@ -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. + diff --git a/src/Files/beta/examples/Lock-MgBetaDriveItem.md b/src/Files/beta/examples/Lock-MgBetaDriveItem.md index e69de29bb2d..42caa611aca 100644 --- a/src/Files/beta/examples/Lock-MgBetaDriveItem.md +++ b/src/Files/beta/examples/Lock-MgBetaDriveItem.md @@ -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 + diff --git a/src/Files/beta/examples/Lock-MgBetaDriveRoot.md b/src/Files/beta/examples/Lock-MgBetaDriveRoot.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/beta/examples/Lock-MgBetaDriveRoot.md +++ b/src/Files/beta/examples/Lock-MgBetaDriveRoot.md @@ -0,0 +1 @@ + diff --git a/src/Files/beta/examples/Lock-MgBetaGroupDriveItem.md b/src/Files/beta/examples/Lock-MgBetaGroupDriveItem.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/beta/examples/Lock-MgBetaGroupDriveItem.md +++ b/src/Files/beta/examples/Lock-MgBetaGroupDriveItem.md @@ -0,0 +1 @@ + diff --git a/src/Files/beta/examples/Lock-MgBetaGroupDriveRoot.md b/src/Files/beta/examples/Lock-MgBetaGroupDriveRoot.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/beta/examples/Lock-MgBetaGroupDriveRoot.md +++ b/src/Files/beta/examples/Lock-MgBetaGroupDriveRoot.md @@ -0,0 +1 @@ + diff --git a/src/Files/beta/examples/Lock-MgBetaUserDriveItem.md b/src/Files/beta/examples/Lock-MgBetaUserDriveItem.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/beta/examples/Lock-MgBetaUserDriveItem.md +++ b/src/Files/beta/examples/Lock-MgBetaUserDriveItem.md @@ -0,0 +1 @@ + diff --git a/src/Files/beta/examples/Lock-MgBetaUserDriveRoot.md b/src/Files/beta/examples/Lock-MgBetaUserDriveRoot.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/beta/examples/Lock-MgBetaUserDriveRoot.md +++ b/src/Files/beta/examples/Lock-MgBetaUserDriveRoot.md @@ -0,0 +1 @@ + diff --git a/src/Files/beta/examples/Publish-MgBetaDriveItemLock.md b/src/Files/beta/examples/Publish-MgBetaDriveItemLock.md index e69de29bb2d..e70d4d11aa2 100644 --- a/src/Files/beta/examples/Publish-MgBetaDriveItemLock.md +++ b/src/Files/beta/examples/Publish-MgBetaDriveItemLock.md @@ -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. + diff --git a/src/Files/beta/examples/Set-MgBetaDriveItemSensitivityLabel.md b/src/Files/beta/examples/Set-MgBetaDriveItemSensitivityLabel.md index e69de29bb2d..c60b0e33bbb 100644 --- a/src/Files/beta/examples/Set-MgBetaDriveItemSensitivityLabel.md +++ b/src/Files/beta/examples/Set-MgBetaDriveItemSensitivityLabel.md @@ -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. + diff --git a/src/Files/beta/examples/Set-MgBetaDriveRootSensitivityLabel.md b/src/Files/beta/examples/Set-MgBetaDriveRootSensitivityLabel.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/beta/examples/Set-MgBetaDriveRootSensitivityLabel.md +++ b/src/Files/beta/examples/Set-MgBetaDriveRootSensitivityLabel.md @@ -0,0 +1 @@ + diff --git a/src/Files/beta/examples/Set-MgBetaGroupDriveItemSensitivityLabel.md b/src/Files/beta/examples/Set-MgBetaGroupDriveItemSensitivityLabel.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/beta/examples/Set-MgBetaGroupDriveItemSensitivityLabel.md +++ b/src/Files/beta/examples/Set-MgBetaGroupDriveItemSensitivityLabel.md @@ -0,0 +1 @@ + diff --git a/src/Files/beta/examples/Set-MgBetaGroupDriveRootSensitivityLabel.md b/src/Files/beta/examples/Set-MgBetaGroupDriveRootSensitivityLabel.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/beta/examples/Set-MgBetaGroupDriveRootSensitivityLabel.md +++ b/src/Files/beta/examples/Set-MgBetaGroupDriveRootSensitivityLabel.md @@ -0,0 +1 @@ + diff --git a/src/Files/beta/examples/Set-MgBetaUserDriveItemSensitivityLabel.md b/src/Files/beta/examples/Set-MgBetaUserDriveItemSensitivityLabel.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/beta/examples/Set-MgBetaUserDriveItemSensitivityLabel.md +++ b/src/Files/beta/examples/Set-MgBetaUserDriveItemSensitivityLabel.md @@ -0,0 +1 @@ + diff --git a/src/Files/beta/examples/Set-MgBetaUserDriveRootSensitivityLabel.md b/src/Files/beta/examples/Set-MgBetaUserDriveRootSensitivityLabel.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/beta/examples/Set-MgBetaUserDriveRootSensitivityLabel.md +++ b/src/Files/beta/examples/Set-MgBetaUserDriveRootSensitivityLabel.md @@ -0,0 +1 @@ + diff --git a/src/Files/v1.0/examples/Set-MgDriveItemSensitivityLabel.md b/src/Files/v1.0/examples/Set-MgDriveItemSensitivityLabel.md index e69de29bb2d..456606f364a 100644 --- a/src/Files/v1.0/examples/Set-MgDriveItemSensitivityLabel.md +++ b/src/Files/v1.0/examples/Set-MgDriveItemSensitivityLabel.md @@ -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. + diff --git a/src/Files/v1.0/examples/Set-MgDriveRootSensitivityLabel.md b/src/Files/v1.0/examples/Set-MgDriveRootSensitivityLabel.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/v1.0/examples/Set-MgDriveRootSensitivityLabel.md +++ b/src/Files/v1.0/examples/Set-MgDriveRootSensitivityLabel.md @@ -0,0 +1 @@ + diff --git a/src/Files/v1.0/examples/Set-MgGroupDriveItemSensitivityLabel.md b/src/Files/v1.0/examples/Set-MgGroupDriveItemSensitivityLabel.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/v1.0/examples/Set-MgGroupDriveItemSensitivityLabel.md +++ b/src/Files/v1.0/examples/Set-MgGroupDriveItemSensitivityLabel.md @@ -0,0 +1 @@ + diff --git a/src/Files/v1.0/examples/Set-MgGroupDriveRootSensitivityLabel.md b/src/Files/v1.0/examples/Set-MgGroupDriveRootSensitivityLabel.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/v1.0/examples/Set-MgGroupDriveRootSensitivityLabel.md +++ b/src/Files/v1.0/examples/Set-MgGroupDriveRootSensitivityLabel.md @@ -0,0 +1 @@ + diff --git a/src/Files/v1.0/examples/Set-MgUserDriveItemSensitivityLabel.md b/src/Files/v1.0/examples/Set-MgUserDriveItemSensitivityLabel.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/v1.0/examples/Set-MgUserDriveItemSensitivityLabel.md +++ b/src/Files/v1.0/examples/Set-MgUserDriveItemSensitivityLabel.md @@ -0,0 +1 @@ + diff --git a/src/Files/v1.0/examples/Set-MgUserDriveRootSensitivityLabel.md b/src/Files/v1.0/examples/Set-MgUserDriveRootSensitivityLabel.md index e69de29bb2d..8b137891791 100644 --- a/src/Files/v1.0/examples/Set-MgUserDriveRootSensitivityLabel.md +++ b/src/Files/v1.0/examples/Set-MgUserDriveRootSensitivityLabel.md @@ -0,0 +1 @@ + diff --git a/src/Identity.DirectoryManagement/beta/examples/Remove-MgBetaDirectoryTenantGovernancePolicyTemplate.md b/src/Identity.DirectoryManagement/beta/examples/Remove-MgBetaDirectoryTenantGovernancePolicyTemplate.md index 375e25019e5..2c8a3c25081 100644 --- a/src/Identity.DirectoryManagement/beta/examples/Remove-MgBetaDirectoryTenantGovernancePolicyTemplate.md +++ b/src/Identity.DirectoryManagement/beta/examples/Remove-MgBetaDirectoryTenantGovernancePolicyTemplate.md @@ -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. diff --git a/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryRecoveryJob.md b/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryRecoveryJob.md index e69de29bb2d..9ebdb5c07c5 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryRecoveryJob.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryRecoveryJob.md @@ -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. + diff --git a/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryRecoverySnapshot.md b/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryRecoverySnapshot.md index e69de29bb2d..3bf33ba82c8 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryRecoverySnapshot.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryRecoverySnapshot.md @@ -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. + diff --git a/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryRemoteTenantGroup.md b/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryRemoteTenantGroup.md index e69de29bb2d..e01f3831f29 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryRemoteTenantGroup.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryRemoteTenantGroup.md @@ -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. + diff --git a/src/Identity.Governance/beta/examples/Initialize-MgBetaIdentityGovernanceLifecycleWorkflowAndWait.md b/src/Identity.Governance/beta/examples/Initialize-MgBetaIdentityGovernanceLifecycleWorkflowAndWait.md index e69de29bb2d..bda66db43bd 100644 --- a/src/Identity.Governance/beta/examples/Initialize-MgBetaIdentityGovernanceLifecycleWorkflowAndWait.md +++ b/src/Identity.Governance/beta/examples/Initialize-MgBetaIdentityGovernanceLifecycleWorkflowAndWait.md @@ -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. + diff --git a/src/Identity.Governance/beta/examples/Invoke-MgBetaAcceptIdentityGovernanceAccessReviewDefinitionInstanceStageRecommendation.md b/src/Identity.Governance/beta/examples/Invoke-MgBetaAcceptIdentityGovernanceAccessReviewDefinitionInstanceStageRecommendation.md index e69de29bb2d..752eb7913ef 100644 --- a/src/Identity.Governance/beta/examples/Invoke-MgBetaAcceptIdentityGovernanceAccessReviewDefinitionInstanceStageRecommendation.md +++ b/src/Identity.Governance/beta/examples/Invoke-MgBetaAcceptIdentityGovernanceAccessReviewDefinitionInstanceStageRecommendation.md @@ -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. + diff --git a/src/Identity.Governance/beta/examples/Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflow.md b/src/Identity.Governance/beta/examples/Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflow.md index e69de29bb2d..6c2a064d4bc 100644 --- a/src/Identity.Governance/beta/examples/Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflow.md +++ b/src/Identity.Governance/beta/examples/Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflow.md @@ -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. + diff --git a/src/Identity.Governance/beta/examples/Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowTaskFailure.md b/src/Identity.Governance/beta/examples/Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowTaskFailure.md index e69de29bb2d..8b137891791 100644 --- a/src/Identity.Governance/beta/examples/Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowTaskFailure.md +++ b/src/Identity.Governance/beta/examples/Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowTaskFailure.md @@ -0,0 +1 @@ + diff --git a/src/Identity.Governance/beta/examples/Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflowTaskFailure.md b/src/Identity.Governance/beta/examples/Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflowTaskFailure.md index e69de29bb2d..ebcb439fd14 100644 --- a/src/Identity.Governance/beta/examples/Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflowTaskFailure.md +++ b/src/Identity.Governance/beta/examples/Invoke-MgBetaPreviewIdentityGovernanceLifecycleWorkflowTaskFailure.md @@ -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 + diff --git a/src/Identity.Governance/beta/examples/New-MgBetaIdentityGovernanceAccessReviewUnifiedDefinition.md b/src/Identity.Governance/beta/examples/New-MgBetaIdentityGovernanceAccessReviewUnifiedDefinition.md index e69de29bb2d..308e70534ca 100644 --- a/src/Identity.Governance/beta/examples/New-MgBetaIdentityGovernanceAccessReviewUnifiedDefinition.md +++ b/src/Identity.Governance/beta/examples/New-MgBetaIdentityGovernanceAccessReviewUnifiedDefinition.md @@ -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 + diff --git a/src/Identity.Governance/beta/examples/Stop-MgBetaIdentityGovernanceLifecycleWorkflowProcessing.md b/src/Identity.Governance/beta/examples/Stop-MgBetaIdentityGovernanceLifecycleWorkflowProcessing.md index e69de29bb2d..310d5512192 100644 --- a/src/Identity.Governance/beta/examples/Stop-MgBetaIdentityGovernanceLifecycleWorkflowProcessing.md +++ b/src/Identity.Governance/beta/examples/Stop-MgBetaIdentityGovernanceLifecycleWorkflowProcessing.md @@ -0,0 +1,22 @@ +### Example 1: Successfully cancel a workflow run + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.Governance + +$params = @{ + scope = @{ + "@odata.type" = "#microsoft.graph.identityGovernance.cancelRunsScope" + runs = @( + @{ + id = "8cdf25a8-c9d2-423e-a03d-3f39f03c3e97" + } + ) + } +} + +Stop-MgBetaIdentityGovernanceLifecycleWorkflowProcessing -WorkflowId $workflowId -BodyParameter $params + +``` +This example will successfully cancel a workflow run + diff --git a/src/Identity.Governance/v1.0/examples/Get-MgEntitlementManagementAvailableAccessPackageResourceRoleScope.md b/src/Identity.Governance/v1.0/examples/Get-MgEntitlementManagementAvailableAccessPackageResourceRoleScope.md index e69de29bb2d..5f3597bf57c 100644 --- a/src/Identity.Governance/v1.0/examples/Get-MgEntitlementManagementAvailableAccessPackageResourceRoleScope.md +++ b/src/Identity.Governance/v1.0/examples/Get-MgEntitlementManagementAvailableAccessPackageResourceRoleScope.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +Get-MgEntitlementManagementAvailableAccessPackageResourceRoleScope -AvailableAccessPackageId $availableAccessPackageId + +``` +This example shows how to use the Get-MgEntitlementManagementAvailableAccessPackageResourceRoleScope Cmdlet. + diff --git a/src/Identity.Governance/v1.0/examples/Get-MgEntitlementManagementCatalogResourceUploadSession.md b/src/Identity.Governance/v1.0/examples/Get-MgEntitlementManagementCatalogResourceUploadSession.md index e69de29bb2d..e11fe232f80 100644 --- a/src/Identity.Governance/v1.0/examples/Get-MgEntitlementManagementCatalogResourceUploadSession.md +++ b/src/Identity.Governance/v1.0/examples/Get-MgEntitlementManagementCatalogResourceUploadSession.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +Get-MgEntitlementManagementCatalogResourceUploadSession -AccessPackageCatalogId $accessPackageCatalogId -AccessPackageResourceId $accessPackageResourceId + +``` +This example shows how to use the Get-MgEntitlementManagementCatalogResourceUploadSession Cmdlet. + diff --git a/src/Identity.Governance/v1.0/examples/Invoke-MgFilterEntitlementManagementAccessPackageSuggestionByCurrentUser.md b/src/Identity.Governance/v1.0/examples/Invoke-MgFilterEntitlementManagementAccessPackageSuggestionByCurrentUser.md index e69de29bb2d..ad6135d7e82 100644 --- a/src/Identity.Governance/v1.0/examples/Invoke-MgFilterEntitlementManagementAccessPackageSuggestionByCurrentUser.md +++ b/src/Identity.Governance/v1.0/examples/Invoke-MgFilterEntitlementManagementAccessPackageSuggestionByCurrentUser.md @@ -0,0 +1,11 @@ +### Example 2: Get access package suggestions based on assignment history + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +Invoke-MgFilterEntitlementManagementAccessPackageSuggestionByCurrentUser -ExpandProperty "accessPackage" -On $onId + +``` +This example will get access package suggestions based on assignment history + diff --git a/src/Identity.Governance/v1.0/examples/Invoke-MgPreviewIdentityGovernanceLifecycleWorkflow.md b/src/Identity.Governance/v1.0/examples/Invoke-MgPreviewIdentityGovernanceLifecycleWorkflow.md index e69de29bb2d..dd37761f83b 100644 --- a/src/Identity.Governance/v1.0/examples/Invoke-MgPreviewIdentityGovernanceLifecycleWorkflow.md +++ b/src/Identity.Governance/v1.0/examples/Invoke-MgPreviewIdentityGovernanceLifecycleWorkflow.md @@ -0,0 +1,24 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.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-MgPreviewIdentityGovernanceLifecycleWorkflow -WorkflowId $workflowId -BodyParameter $params + +``` +This example shows how to use the Invoke-MgPreviewIdentityGovernanceLifecycleWorkflow Cmdlet. + diff --git a/src/Identity.Governance/v1.0/examples/Invoke-MgPreviewIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowTaskFailure.md b/src/Identity.Governance/v1.0/examples/Invoke-MgPreviewIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowTaskFailure.md index e69de29bb2d..8b137891791 100644 --- a/src/Identity.Governance/v1.0/examples/Invoke-MgPreviewIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowTaskFailure.md +++ b/src/Identity.Governance/v1.0/examples/Invoke-MgPreviewIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowTaskFailure.md @@ -0,0 +1 @@ + diff --git a/src/Identity.Governance/v1.0/examples/Invoke-MgPreviewIdentityGovernanceLifecycleWorkflowTaskFailure.md b/src/Identity.Governance/v1.0/examples/Invoke-MgPreviewIdentityGovernanceLifecycleWorkflowTaskFailure.md index e69de29bb2d..6f0d154c58c 100644 --- a/src/Identity.Governance/v1.0/examples/Invoke-MgPreviewIdentityGovernanceLifecycleWorkflowTaskFailure.md +++ b/src/Identity.Governance/v1.0/examples/Invoke-MgPreviewIdentityGovernanceLifecycleWorkflowTaskFailure.md @@ -0,0 +1,22 @@ +### Example 1: Workflow with task failures + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +Invoke-MgPreviewIdentityGovernanceLifecycleWorkflowTaskFailure -WorkflowId $workflowId + +``` +This example will workflow with task failures + +### Example 2: Workflow with no task failures + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +Invoke-MgPreviewIdentityGovernanceLifecycleWorkflowTaskFailure -WorkflowId $workflowId + +``` +This example will workflow with no task failures + diff --git a/src/Identity.Governance/v1.0/examples/New-MgEntitlementManagementCatalogResourceUploadSession.md b/src/Identity.Governance/v1.0/examples/New-MgEntitlementManagementCatalogResourceUploadSession.md index e69de29bb2d..10b7a982aae 100644 --- a/src/Identity.Governance/v1.0/examples/New-MgEntitlementManagementCatalogResourceUploadSession.md +++ b/src/Identity.Governance/v1.0/examples/New-MgEntitlementManagementCatalogResourceUploadSession.md @@ -0,0 +1,20 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +$params = @{ + "@odata.type" = "#microsoft.graph.customDataProvidedResourceAccessReviewUploadSession" + data = @{ + "@odata.type" = "#microsoft.graph.customDataProvidedResourcePayloads.accessReviewContextData" + reviewDefinitionId = "9e4b1c6f-2a3d-4f8e-9b7a-5c1e2d3f4a6b" + reviewInstanceId = "15eeb4df-8a4d-4f8e-9b7a-6b3e1c7f5a9d" + } +} + +New-MgEntitlementManagementCatalogResourceUploadSession -AccessPackageCatalogId $accessPackageCatalogId -AccessPackageResourceId $accessPackageResourceId -BodyParameter $params + +``` +This example shows how to use the New-MgEntitlementManagementCatalogResourceUploadSession Cmdlet. + diff --git a/src/Identity.Governance/v1.0/examples/Remove-MgEntitlementManagementCatalogResourceUploadSession.md b/src/Identity.Governance/v1.0/examples/Remove-MgEntitlementManagementCatalogResourceUploadSession.md index e69de29bb2d..5fd73f341bd 100644 --- a/src/Identity.Governance/v1.0/examples/Remove-MgEntitlementManagementCatalogResourceUploadSession.md +++ b/src/Identity.Governance/v1.0/examples/Remove-MgEntitlementManagementCatalogResourceUploadSession.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +Remove-MgEntitlementManagementCatalogResourceUploadSession -AccessPackageCatalogId $accessPackageCatalogId -AccessPackageResourceId $accessPackageResourceId -CustomDataProvidedResourceUploadSessionId $customDataProvidedResourceUploadSessionId + +``` +This example shows how to use the Remove-MgEntitlementManagementCatalogResourceUploadSession Cmdlet. + diff --git a/src/Identity.Governance/v1.0/examples/Stop-MgIdentityGovernanceLifecycleWorkflowProcessing.md b/src/Identity.Governance/v1.0/examples/Stop-MgIdentityGovernanceLifecycleWorkflowProcessing.md index e69de29bb2d..3e1b286c9fb 100644 --- a/src/Identity.Governance/v1.0/examples/Stop-MgIdentityGovernanceLifecycleWorkflowProcessing.md +++ b/src/Identity.Governance/v1.0/examples/Stop-MgIdentityGovernanceLifecycleWorkflowProcessing.md @@ -0,0 +1,22 @@ +### Example 1: Successfully cancel a workflow run + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +$params = @{ + scope = @{ + "@odata.type" = "#microsoft.graph.identityGovernance.cancelRunsScope" + runs = @( + @{ + id = "8cdf25a8-c9d2-423e-a03d-3f39f03c3e97" + } + ) + } +} + +Stop-MgIdentityGovernanceLifecycleWorkflowProcessing -WorkflowId $workflowId -BodyParameter $params + +``` +This example will successfully cancel a workflow run + diff --git a/src/Identity.Governance/v1.0/examples/Update-MgEntitlementManagementCatalogResourceUploadSession.md b/src/Identity.Governance/v1.0/examples/Update-MgEntitlementManagementCatalogResourceUploadSession.md index e69de29bb2d..48ec24d8cfa 100644 --- a/src/Identity.Governance/v1.0/examples/Update-MgEntitlementManagementCatalogResourceUploadSession.md +++ b/src/Identity.Governance/v1.0/examples/Update-MgEntitlementManagementCatalogResourceUploadSession.md @@ -0,0 +1,15 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +$params = @{ + isUploadDone = $true +} + +Update-MgEntitlementManagementCatalogResourceUploadSession -AccessPackageCatalogId $accessPackageCatalogId -AccessPackageResourceId $accessPackageResourceId -CustomDataProvidedResourceUploadSessionId $customDataProvidedResourceUploadSessionId -BodyParameter $params + +``` +This example shows how to use the Update-MgEntitlementManagementCatalogResourceUploadSession Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityVerifiedIdProfile.md b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityVerifiedIdProfile.md index c8b0b45c700..218e4bb57ae 100644 --- a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityVerifiedIdProfile.md +++ b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityVerifiedIdProfile.md @@ -12,7 +12,9 @@ $params = @{ verifierDid = "did:web:eu.did-dev.contoso.io" priority = 0 verifiedIdProfileConfiguration = @{ + methodType = "tenantCustomCredential" type = "verifiedIdentity" + manifestUrl = "https://verifiedid.contoso.com/manifest" acceptedIssuer = "did:web:eu.did-dev.contoso.io" claimBindingSource = "directory" claimBindings = @( @@ -30,12 +32,22 @@ $params = @{ isEnabled = $true sourcePhotoClaimName = "portrait" } - verifiedIdUsageConfigurations = @( - @{ - isEnabledForTestOnly = $true - purpose = "recovery" - } + mobileDriversLicenseConfiguration = @{ + acceptedRegions = @( + "region-code" ) + documentStandard = "document-standard" +} +verifiedIdUsageConfigurations = @( + @{ + isEnabledForTestOnly = $true + purpose = "verification" + } +) +selfServiceIssuance = @{ + isEnabled = $true + issuanceUrl = "https://verifiedid.contoso.com/issue" +} } New-MgBetaIdentityVerifiedIdProfile -BodyParameter $params diff --git a/src/Identity.SignIns/beta/examples/Update-MgBetaIdentityVerifiedIdProfile.md b/src/Identity.SignIns/beta/examples/Update-MgBetaIdentityVerifiedIdProfile.md index 46b601b6a50..0c0659592f4 100644 --- a/src/Identity.SignIns/beta/examples/Update-MgBetaIdentityVerifiedIdProfile.md +++ b/src/Identity.SignIns/beta/examples/Update-MgBetaIdentityVerifiedIdProfile.md @@ -5,12 +5,26 @@ Import-Module Microsoft.Graph.Beta.Identity.SignIns $params = @{ - verifiedIdUsageConfigurations = @( - @{ - isEnabledForTestOnly = $false - purpose = "recovery" - } + verifiedIdProfileConfiguration = @{ + methodType = "tenantCustomCredential" + manifestUrl = "https://verifiedid.contoso.com/manifest" + } + mobileDriversLicenseConfiguration = @{ + acceptedRegions = @( + "region-code" ) + documentStandard = "document-standard" +} +selfServiceIssuance = @{ + isEnabled = $true + issuanceUrl = "https://verifiedid.contoso.com/issue" +} +verifiedIdUsageConfigurations = @( + @{ + isEnabledForTestOnly = $false + purpose = "verification" + } +) } Update-MgBetaIdentityVerifiedIdProfile -VerifiedIdProfileId $verifiedIdProfileId -BodyParameter $params diff --git a/src/Identity.SignIns/v1.0/examples/Reset-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationIdentitySynchronizationToDefaultSetting.md b/src/Identity.SignIns/v1.0/examples/Reset-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationIdentitySynchronizationToDefaultSetting.md index e69de29bb2d..8128d0a2b1b 100644 --- a/src/Identity.SignIns/v1.0/examples/Reset-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationIdentitySynchronizationToDefaultSetting.md +++ b/src/Identity.SignIns/v1.0/examples/Reset-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationIdentitySynchronizationToDefaultSetting.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +Reset-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationIdentitySynchronizationToDefaultSetting + +``` +This example shows how to use the Reset-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationIdentitySynchronizationToDefaultSetting Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/Reset-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationPartnerConfigurationToDefaultSetting.md b/src/Identity.SignIns/v1.0/examples/Reset-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationPartnerConfigurationToDefaultSetting.md index e69de29bb2d..11f7358b38c 100644 --- a/src/Identity.SignIns/v1.0/examples/Reset-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationPartnerConfigurationToDefaultSetting.md +++ b/src/Identity.SignIns/v1.0/examples/Reset-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationPartnerConfigurationToDefaultSetting.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +Reset-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationPartnerConfigurationToDefaultSetting + +``` +This example shows how to use the Reset-MgPolicyCrossTenantAccessPolicyTemplateMultiTenantOrganizationPartnerConfigurationToDefaultSetting Cmdlet. + diff --git a/src/Security/beta/examples/Initialize-MgBetaSecurityIdentitySensorCandidate.md b/src/Security/beta/examples/Initialize-MgBetaSecurityIdentitySensorCandidate.md index e69de29bb2d..9a612c5bcbe 100644 --- a/src/Security/beta/examples/Initialize-MgBetaSecurityIdentitySensorCandidate.md +++ b/src/Security/beta/examples/Initialize-MgBetaSecurityIdentitySensorCandidate.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + serverIds = @( + "c0633ebb-8cfb-f17a-0b9e-83aa661f53a3" +) +} + +Initialize-MgBetaSecurityIdentitySensorCandidate -BodyParameter $params + +``` +This example shows how to use the Initialize-MgBetaSecurityIdentitySensorCandidate Cmdlet. + diff --git a/src/Security/beta/examples/Invoke-MgBetaProcessSecurityDataSecurityAndGovernanceContent.md b/src/Security/beta/examples/Invoke-MgBetaProcessSecurityDataSecurityAndGovernanceContent.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/Security/beta/examples/Invoke-MgBetaRetrySecurityCaseEdiscoveryCaseLegalHoldPolicy.md b/src/Security/beta/examples/Invoke-MgBetaRetrySecurityCaseEdiscoveryCaseLegalHoldPolicy.md index e69de29bb2d..7a6c3afbab8 100644 --- a/src/Security/beta/examples/Invoke-MgBetaRetrySecurityCaseEdiscoveryCaseLegalHoldPolicy.md +++ b/src/Security/beta/examples/Invoke-MgBetaRetrySecurityCaseEdiscoveryCaseLegalHoldPolicy.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +Invoke-MgBetaRetrySecurityCaseEdiscoveryCaseLegalHoldPolicy -EdiscoveryCaseId $ediscoveryCaseId -EdiscoveryHoldPolicyId $ediscoveryHoldPolicyId + +``` +This example shows how to use the Invoke-MgBetaRetrySecurityCaseEdiscoveryCaseLegalHoldPolicy Cmdlet. + diff --git a/src/Security/beta/examples/Merge-MgBetaSecurityIncident.md b/src/Security/beta/examples/Merge-MgBetaSecurityIncident.md index e69de29bb2d..a3151b5b66b 100644 --- a/src/Security/beta/examples/Merge-MgBetaSecurityIncident.md +++ b/src/Security/beta/examples/Merge-MgBetaSecurityIncident.md @@ -0,0 +1,20 @@ +### Example 1: Merge incidents + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + incidentIds = @( + "2972395" +"2972396" +) +incidentComment = "Merging related incidents from the same campaign" +mergeReasons = "sameCampaign, sameActor" +} + +Merge-MgBetaSecurityIncident -BodyParameter $params + +``` +This example will merge incidents + diff --git a/src/Security/beta/examples/Move-MgBetaSecurityAlert.md b/src/Security/beta/examples/Move-MgBetaSecurityAlert.md index e69de29bb2d..a722635b58c 100644 --- a/src/Security/beta/examples/Move-MgBetaSecurityAlert.md +++ b/src/Security/beta/examples/Move-MgBetaSecurityAlert.md @@ -0,0 +1,21 @@ +### Example 1: Move alerts to an incident + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + alertIds = @( + "da637551227677560813_-961444813" +"da637551227677560813_-961444814" +) +incidentId = "2972395" +alertComment = "Moving alerts for investigation consolidation" +newCorrelationReasons = "sameAsset, temporalProximity" +} + +Move-MgBetaSecurityAlert -BodyParameter $params + +``` +This example will move alerts to an incident + diff --git a/src/Security/beta/examples/Move-MgBetaSecurityIdentitySensorMigration.md b/src/Security/beta/examples/Move-MgBetaSecurityIdentitySensorMigration.md index e69de29bb2d..edf3a110f1a 100644 --- a/src/Security/beta/examples/Move-MgBetaSecurityIdentitySensorMigration.md +++ b/src/Security/beta/examples/Move-MgBetaSecurityIdentitySensorMigration.md @@ -0,0 +1,18 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + sensorIds = @( + "fdce0c43-15e8-e322-7656-aff297505af5" +"a1b2c3d4-e5f6-7890-abcd-ef1234567890" +) +} + +Move-MgBetaSecurityIdentitySensorMigration -BodyParameter $params + +``` +This example shows how to use the Move-MgBetaSecurityIdentitySensorMigration Cmdlet. + diff --git a/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCase.md b/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCase.md index e69de29bb2d..1182205b1f2 100644 --- a/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCase.md +++ b/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCase.md @@ -0,0 +1,41 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.genericCase" + displayName = "Security Breach Investigation" + status = "active" + description = "Investigating potential credential compromise." + assignedTo = "john.doe@contoso.com" + priority = "high" + customFields = @{ + "Customer impact" = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.customFieldStringValue" + value = "Executive mailbox affected" + } + "Affected users" = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.customFieldNumberValue" + value = + } + "Review date" = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.customFieldDateTimeValue" + valueDateTime = "2026-06-15T09:00:00Z" + } + "Affected services" = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.customFieldOptionsValue" + values = @( + "Exchange Online" + "Microsoft Teams" + ) +} +} +} + +New-MgBetaSecurityCaseManagementCase -BodyParameter $params + +``` +This example shows how to use the New-MgBetaSecurityCaseManagementCase Cmdlet. + diff --git a/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseActivity.md b/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseActivity.md index e69de29bb2d..422ff770f86 100644 --- a/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseActivity.md +++ b/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseActivity.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.comment" + message = "This is a comment for the case." +} + +New-MgBetaSecurityCaseManagementCaseActivity -CaseId $caseId -BodyParameter $params + +``` +This example shows how to use the New-MgBetaSecurityCaseManagementCaseActivity Cmdlet. + diff --git a/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseAttachment.md b/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseAttachment.md index e69de29bb2d..31c8a357f85 100644 --- a/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseAttachment.md +++ b/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseAttachment.md @@ -0,0 +1,19 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.attachment" + displayName = "Case MS-001 Attachment" + description = "Screenshot of suspicious sign-in activity" + fileSize = 1000 + fileExtension = "jpeg" +} + +New-MgBetaSecurityCaseManagementCaseAttachment -CaseId $caseId -BodyParameter $params + +``` +This example shows how to use the New-MgBetaSecurityCaseManagementCaseAttachment Cmdlet. + diff --git a/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseRelation.md b/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseRelation.md index e69de29bb2d..cacbb16d824 100644 --- a/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseRelation.md +++ b/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseRelation.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.incidentRelation" + relatedResourceId = "987654321" +} + +New-MgBetaSecurityCaseManagementCaseRelation -CaseId $caseId -BodyParameter $params + +``` +This example shows how to use the New-MgBetaSecurityCaseManagementCaseRelation Cmdlet. + diff --git a/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseTask.md b/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseTask.md index e69de29bb2d..e81f4f111ca 100644 --- a/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseTask.md +++ b/src/Security/beta/examples/New-MgBetaSecurityCaseManagementCaseTask.md @@ -0,0 +1,23 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.task" + displayName = "Validate affected devices" + status = "new" + description = "Review affected devices and collect evidence" + assignedTo = "user@contoso.com" + closingNotes = "Investigation completed and documented" + dueDateTime = [System.DateTime]::Parse("2026-06-29T17:54:43Z") + priority = "high" + category = "investigate" +} + +New-MgBetaSecurityCaseManagementCaseTask -CaseId $caseId -BodyParameter $params + +``` +This example shows how to use the New-MgBetaSecurityCaseManagementCaseTask Cmdlet. + diff --git a/src/Security/beta/examples/New-MgBetaSecurityZone.md b/src/Security/beta/examples/New-MgBetaSecurityZone.md index e69de29bb2d..9493449774d 100644 --- a/src/Security/beta/examples/New-MgBetaSecurityZone.md +++ b/src/Security/beta/examples/New-MgBetaSecurityZone.md @@ -0,0 +1,34 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + displayName = "Production Zone" + description = "Zone for production environments" + environments = @( + @{ + kind = "awsAccount" + id = "181994123251" + } + @{ + kind = "awsAccount" + id = "326438728454" + } + @{ + kind = "azureSubscription" + id = "/subscriptions/02687862-a843-4846-81f0-efe9ef244daa" + } + @{ + kind = "gcpProject" + id = "69483221284" + } + ) +} + +New-MgBetaSecurityZone -BodyParameter $params + +``` +This example shows how to use the New-MgBetaSecurityZone Cmdlet. + diff --git a/src/Security/beta/examples/New-MgBetaSecurityZoneEnvironment.md b/src/Security/beta/examples/New-MgBetaSecurityZoneEnvironment.md index e69de29bb2d..27c852b0a40 100644 --- a/src/Security/beta/examples/New-MgBetaSecurityZoneEnvironment.md +++ b/src/Security/beta/examples/New-MgBetaSecurityZoneEnvironment.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + kind = "azureSubscription" + id = "/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15" +} + +New-MgBetaSecurityZoneEnvironment -ZoneId $zoneId -BodyParameter $params + +``` +This example shows how to use the New-MgBetaSecurityZoneEnvironment Cmdlet. + diff --git a/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCase.md b/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCase.md index e69de29bb2d..183d3fd3095 100644 --- a/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCase.md +++ b/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCase.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +Remove-MgBetaSecurityCaseManagementCase -CaseId $caseId + +``` +This example shows how to use the Remove-MgBetaSecurityCaseManagementCase Cmdlet. + diff --git a/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCaseActivity.md b/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCaseActivity.md index e69de29bb2d..9b33b128d18 100644 --- a/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCaseActivity.md +++ b/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCaseActivity.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +Remove-MgBetaSecurityCaseManagementCaseActivity -CaseId $caseId -ActivityId $activityId + +``` +This example shows how to use the Remove-MgBetaSecurityCaseManagementCaseActivity Cmdlet. + diff --git a/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCaseRelation.md b/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCaseRelation.md index e69de29bb2d..2a8cde1e6a8 100644 --- a/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCaseRelation.md +++ b/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCaseRelation.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +Remove-MgBetaSecurityCaseManagementCaseRelation -CaseId $caseId -RelationId $relationId + +``` +This example shows how to use the Remove-MgBetaSecurityCaseManagementCaseRelation Cmdlet. + diff --git a/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCaseTask.md b/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCaseTask.md index e69de29bb2d..df8c91ce3f4 100644 --- a/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCaseTask.md +++ b/src/Security/beta/examples/Remove-MgBetaSecurityCaseManagementCaseTask.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +Remove-MgBetaSecurityCaseManagementCaseTask -CaseId $caseId -TaskId $taskId + +``` +This example shows how to use the Remove-MgBetaSecurityCaseManagementCaseTask Cmdlet. + diff --git a/src/Security/beta/examples/Remove-MgBetaSecurityZone.md b/src/Security/beta/examples/Remove-MgBetaSecurityZone.md index e69de29bb2d..efd80488b9a 100644 --- a/src/Security/beta/examples/Remove-MgBetaSecurityZone.md +++ b/src/Security/beta/examples/Remove-MgBetaSecurityZone.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +Remove-MgBetaSecurityZone -ZoneId $zoneId + +``` +This example shows how to use the Remove-MgBetaSecurityZone Cmdlet. + diff --git a/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCase.md b/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCase.md index e69de29bb2d..5f38c19dadc 100644 --- a/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCase.md +++ b/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCase.md @@ -0,0 +1,48 @@ +### Example 1: Update a generic case + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.genericCase" + displayName = "Case MS-001" + status = "Open" + description = "Investigating potential credential compromise." + assignedTo = "john.doe@contoso.com" + priority = "high" + dueDateTime = "2026-06-29T17:54:43Z" + closingNotes = "Follow up with the account owner." + customFields = @{ + "Customer impact" = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.customFieldStringValue" + value = "Multiple executive mailboxes affected" + } + } +} + +Update-MgBetaSecurityCaseManagementCase -CaseId $caseId -BodyParameter $params + +``` +This example will update a generic case + +### Example 2: Update synchronized incident case properties + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.incidentCase" + displayName = "Incident Case MS-002" + status = "InProgress" + classification = "truePositive" + determination = "phishing" + severity = "high" +} + +Update-MgBetaSecurityCaseManagementCase -CaseId $caseId -BodyParameter $params + +``` +This example will update synchronized incident case properties + diff --git a/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseActivity.md b/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseActivity.md index e69de29bb2d..57be7c1e095 100644 --- a/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseActivity.md +++ b/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseActivity.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.comment" + message = "This is a modified comment." +} + +Update-MgBetaSecurityCaseManagementCaseActivity -CaseId $caseId -ActivityId $activityId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaSecurityCaseManagementCaseActivity Cmdlet. + diff --git a/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseAttachment.md b/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseAttachment.md index e69de29bb2d..a0a03f9c59e 100644 --- a/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseAttachment.md +++ b/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseAttachment.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + displayName = "Case MS-001 Attachment" + description = "Screenshot of suspicious sign-in activity" +} + +Update-MgBetaSecurityCaseManagementCaseAttachment -CaseId $caseId -AttachmentId $attachmentId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaSecurityCaseManagementCaseAttachment Cmdlet. + diff --git a/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseRelation.md b/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseRelation.md index e69de29bb2d..b8edebca1e5 100644 --- a/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseRelation.md +++ b/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseRelation.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.incidentRelation" + relatedResourceId = "987654321" +} + +Update-MgBetaSecurityCaseManagementCaseRelation -CaseId $caseId -RelationId $relationId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaSecurityCaseManagementCaseRelation Cmdlet. + diff --git a/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseTask.md b/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseTask.md index e69de29bb2d..e68bd114a54 100644 --- a/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseTask.md +++ b/src/Security/beta/examples/Update-MgBetaSecurityCaseManagementCaseTask.md @@ -0,0 +1,23 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.caseManagement.task" + displayName = "Validate affected devices" + status = "new" + description = "Review affected devices and collect evidence" + assignedTo = "user@contoso.com" + closingNotes = "Investigation completed and documented" + dueDateTime = [System.DateTime]::Parse("2026-06-29T17:54:43Z") + priority = "high" + category = "investigate" +} + +Update-MgBetaSecurityCaseManagementCaseTask -CaseId $caseId -TaskId $taskId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaSecurityCaseManagementCaseTask Cmdlet. + diff --git a/src/Security/beta/examples/Update-MgBetaSecurityZone.md b/src/Security/beta/examples/Update-MgBetaSecurityZone.md index e69de29bb2d..bc769c4d6eb 100644 --- a/src/Security/beta/examples/Update-MgBetaSecurityZone.md +++ b/src/Security/beta/examples/Update-MgBetaSecurityZone.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +$params = @{ + displayName = "Updated Production Zone" + description = "Updated description for production environments" +} + +Update-MgBetaSecurityZone -ZoneId $zoneId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaSecurityZone Cmdlet. + diff --git a/src/Security/v1.0/examples/Get-MgSecurityAuditLogQuery.md b/src/Security/v1.0/examples/Get-MgSecurityAuditLogQuery.md index e69de29bb2d..f31edcead36 100644 --- a/src/Security/v1.0/examples/Get-MgSecurityAuditLogQuery.md +++ b/src/Security/v1.0/examples/Get-MgSecurityAuditLogQuery.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Security + +Get-MgSecurityAuditLogQuery + +``` +This example shows how to use the Get-MgSecurityAuditLogQuery Cmdlet. + diff --git a/src/Security/v1.0/examples/Get-MgSecurityCollaborationAnalyzedEmail.md b/src/Security/v1.0/examples/Get-MgSecurityCollaborationAnalyzedEmail.md index e69de29bb2d..b75b148db45 100644 --- a/src/Security/v1.0/examples/Get-MgSecurityCollaborationAnalyzedEmail.md +++ b/src/Security/v1.0/examples/Get-MgSecurityCollaborationAnalyzedEmail.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Security + +Get-MgSecurityCollaborationAnalyzedEmail -Starttime "2024-02-18" -Endtime "2024-02-20" + +``` +This example shows how to use the Get-MgSecurityCollaborationAnalyzedEmail Cmdlet. + diff --git a/src/Security/v1.0/examples/Invoke-MgRemediateSecurityCollaborationAnalyzedEmail.md b/src/Security/v1.0/examples/Invoke-MgRemediateSecurityCollaborationAnalyzedEmail.md index e69de29bb2d..303dfb1ffb4 100644 --- a/src/Security/v1.0/examples/Invoke-MgRemediateSecurityCollaborationAnalyzedEmail.md +++ b/src/Security/v1.0/examples/Invoke-MgRemediateSecurityCollaborationAnalyzedEmail.md @@ -0,0 +1,29 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Security + +$params = @{ + displayName = "Clean up Phish email" + description = "Delete email" + severity = "medium" + action = "softDelete" + remediateSendersCopy = "false" + analyzedEmails = @( + @{ + networkMessageId = "73ca4154-58d8-43d0-a890-08dc18c52e6d" + recipientEmailAddress = "hannah.jarvis@contoso.com" + } + @{ + networkMessageId = "73ca4154-58d8-43d0-a890-08dc18c52e6d" + recipientEmailAddress = "preston.morales@contoso.com" + } + ) +} + +Invoke-MgRemediateSecurityCollaborationAnalyzedEmail -BodyParameter $params + +``` +This example shows how to use the Invoke-MgRemediateSecurityCollaborationAnalyzedEmail Cmdlet. + diff --git a/src/Security/v1.0/examples/New-MgSecurityAuditLogQuery.md b/src/Security/v1.0/examples/New-MgSecurityAuditLogQuery.md index e69de29bb2d..9cdeae6976a 100644 --- a/src/Security/v1.0/examples/New-MgSecurityAuditLogQuery.md +++ b/src/Security/v1.0/examples/New-MgSecurityAuditLogQuery.md @@ -0,0 +1,39 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.auditLogQuery" + displayName = "String" + filterStartDateTime = [System.DateTime]::Parse("String (timestamp)") + filterEndDateTime = [System.DateTime]::Parse("String (timestamp)") + recordTypeFilters = @( + "String" +) +keywordFilter = "String" +serviceFilter = "String" +operationFilters = @( +"String" +) +userPrincipalNameFilters = @( +"String" +) +ipAddressFilters = @( +"String" +) +objectIdFilters = @( +"String" +) +administrativeUnitIdFilters = @( +"String" +) +status = "String" +} + +New-MgSecurityAuditLogQuery -BodyParameter $params + +``` +This example shows how to use the New-MgSecurityAuditLogQuery Cmdlet. + diff --git a/src/Sites/v1.0/examples/Get-MgSiteListItemPermission.md b/src/Sites/v1.0/examples/Get-MgSiteListItemPermission.md index e69de29bb2d..19bb53ba9b2 100644 --- a/src/Sites/v1.0/examples/Get-MgSiteListItemPermission.md +++ b/src/Sites/v1.0/examples/Get-MgSiteListItemPermission.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Sites + +Get-MgSiteListItemPermission -SiteId $siteId -ListId $listId -ListItemId $listItemId + +``` +This example shows how to use the Get-MgSiteListItemPermission Cmdlet. + diff --git a/src/Sites/v1.0/examples/Get-MgSiteListPermission.md b/src/Sites/v1.0/examples/Get-MgSiteListPermission.md index e69de29bb2d..2f377f35373 100644 --- a/src/Sites/v1.0/examples/Get-MgSiteListPermission.md +++ b/src/Sites/v1.0/examples/Get-MgSiteListPermission.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Sites + +Get-MgSiteListPermission -SiteId $siteId -ListId $listId + +``` +This example shows how to use the Get-MgSiteListPermission Cmdlet. + diff --git a/src/Sites/v1.0/examples/New-MgSiteListPermission.md b/src/Sites/v1.0/examples/New-MgSiteListPermission.md index e69de29bb2d..3d8ad505819 100644 --- a/src/Sites/v1.0/examples/New-MgSiteListPermission.md +++ b/src/Sites/v1.0/examples/New-MgSiteListPermission.md @@ -0,0 +1,23 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Sites + +$params = @{ + grantedToV2 = @{ + application = @{ + id = "89ea5c94-7736-4e25-95ad-3fa95f62b66e" + displayName = "Contoso Time Manager App" + } + } + roles = @( + "write" +) +} + +New-MgSiteListPermission -SiteId $siteId -ListId $listId -BodyParameter $params + +``` +This example shows how to use the New-MgSiteListPermission Cmdlet. + diff --git a/src/Teams/beta/examples/Get-MgBetaTeamworkMessagingCustomEmoji.md b/src/Teams/beta/examples/Get-MgBetaTeamworkMessagingCustomEmoji.md index e69de29bb2d..18f215e11f4 100644 --- a/src/Teams/beta/examples/Get-MgBetaTeamworkMessagingCustomEmoji.md +++ b/src/Teams/beta/examples/Get-MgBetaTeamworkMessagingCustomEmoji.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Get-MgBetaTeamworkMessagingCustomEmoji + +``` +This example shows how to use the Get-MgBetaTeamworkMessagingCustomEmoji Cmdlet. + diff --git a/src/Teams/beta/examples/Get-MgBetaUserTeamworkRetainedTargetedMessage.md b/src/Teams/beta/examples/Get-MgBetaUserTeamworkRetainedTargetedMessage.md index e69de29bb2d..d67be834658 100644 --- a/src/Teams/beta/examples/Get-MgBetaUserTeamworkRetainedTargetedMessage.md +++ b/src/Teams/beta/examples/Get-MgBetaUserTeamworkRetainedTargetedMessage.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Get-MgBetaUserTeamworkRetainedTargetedMessage -UserId $userId + +``` +This example shows how to use the Get-MgBetaUserTeamworkRetainedTargetedMessage Cmdlet. + diff --git a/src/Teams/beta/examples/Get-MgBetaUserTeamworkSection.md b/src/Teams/beta/examples/Get-MgBetaUserTeamworkSection.md index e69de29bb2d..defdd3d6ee2 100644 --- a/src/Teams/beta/examples/Get-MgBetaUserTeamworkSection.md +++ b/src/Teams/beta/examples/Get-MgBetaUserTeamworkSection.md @@ -0,0 +1,33 @@ +### Example 1: Get a section + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Get-MgBetaUserTeamworkSection -UserId $userId -TeamworkSectionId $teamworkSectionId + +``` +This example will get a section + +### Example 2: Get a user-defined section with items expanded + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Get-MgBetaUserTeamworkSection -UserId $userId -TeamworkSectionId $teamworkSectionId -ExpandProperty "items" + +``` +This example will get a user-defined section with items expanded + +### Example 3: Get a system-defined section with items expanded + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Get-MgBetaUserTeamworkSection -UserId $userId -TeamworkSectionId $teamworkSectionId -ExpandProperty "items" + +``` +This example will get a system-defined section with items expanded + diff --git a/src/Teams/beta/examples/Get-MgBetaUserTeamworkSectionItem.md b/src/Teams/beta/examples/Get-MgBetaUserTeamworkSectionItem.md index e69de29bb2d..3b5be23c9db 100644 --- a/src/Teams/beta/examples/Get-MgBetaUserTeamworkSectionItem.md +++ b/src/Teams/beta/examples/Get-MgBetaUserTeamworkSectionItem.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Get-MgBetaUserTeamworkSectionItem -UserId $userId -TeamworkSectionId $teamworkSectionId + +``` +This example shows how to use the Get-MgBetaUserTeamworkSectionItem Cmdlet. + diff --git a/src/Teams/beta/examples/Get-MgBetaUserTeamworkTargetedMessage.md b/src/Teams/beta/examples/Get-MgBetaUserTeamworkTargetedMessage.md index e69de29bb2d..2f64b63f6ce 100644 --- a/src/Teams/beta/examples/Get-MgBetaUserTeamworkTargetedMessage.md +++ b/src/Teams/beta/examples/Get-MgBetaUserTeamworkTargetedMessage.md @@ -0,0 +1,22 @@ +### Example 1: Get all targeted messages for a user + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Get-MgBetaUserTeamworkTargetedMessage -UserId $userId + +``` +This example will get all targeted messages for a user + +### Example 2: Filter targeted messages by date range + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Get-MgBetaUserTeamworkTargetedMessage -UserId $userId -Filter "lastModifiedDateTime gt 2024-01-01T00:00:00Z and lastModifiedDateTime lt 2024-12-31T23:59:59Z" + +``` +This example will filter targeted messages by date range + diff --git a/src/Teams/beta/examples/Move-MgBetaUserTeamworkSectionItem.md b/src/Teams/beta/examples/Move-MgBetaUserTeamworkSectionItem.md index e69de29bb2d..5c9bbc7969b 100644 --- a/src/Teams/beta/examples/Move-MgBetaUserTeamworkSectionItem.md +++ b/src/Teams/beta/examples/Move-MgBetaUserTeamworkSectionItem.md @@ -0,0 +1,15 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +$params = @{ + targetSectionId = "c3d4e5f6-a7b8-9012-cdef-123456789012" +} + +Move-MgBetaUserTeamworkSectionItem -UserId $userId -TeamworkSectionId $teamworkSectionId -TeamworkSectionItemId $teamworkSectionItemId -BodyParameter $params + +``` +This example shows how to use the Move-MgBetaUserTeamworkSectionItem Cmdlet. + diff --git a/src/Teams/beta/examples/New-MgBetaTeamworkMessagingCustomEmoji.md b/src/Teams/beta/examples/New-MgBetaTeamworkMessagingCustomEmoji.md index e69de29bb2d..009c1801e06 100644 --- a/src/Teams/beta/examples/New-MgBetaTeamworkMessagingCustomEmoji.md +++ b/src/Teams/beta/examples/New-MgBetaTeamworkMessagingCustomEmoji.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +$params = @{ + displayName = "thumbsup_custom" + contentBytes = "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAABGhJREFU..." +} + +New-MgBetaTeamworkMessagingCustomEmoji -BodyParameter $params + +``` +This example shows how to use the New-MgBetaTeamworkMessagingCustomEmoji Cmdlet. + diff --git a/src/Teams/beta/examples/New-MgBetaUserTeamworkSection.md b/src/Teams/beta/examples/New-MgBetaUserTeamworkSection.md index e69de29bb2d..dee9a5980f6 100644 --- a/src/Teams/beta/examples/New-MgBetaUserTeamworkSection.md +++ b/src/Teams/beta/examples/New-MgBetaUserTeamworkSection.md @@ -0,0 +1,19 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +$params = @{ + displayName = "Project Alpha" + displayIcon = @{ + iconType = "🚀" + } + sortType = "mostRecent" +} + +New-MgBetaUserTeamworkSection -UserId $userId -BodyParameter $params + +``` +This example shows how to use the New-MgBetaUserTeamworkSection Cmdlet. + diff --git a/src/Teams/beta/examples/New-MgBetaUserTeamworkSectionItem.md b/src/Teams/beta/examples/New-MgBetaUserTeamworkSectionItem.md index e69de29bb2d..0074f507a64 100644 --- a/src/Teams/beta/examples/New-MgBetaUserTeamworkSectionItem.md +++ b/src/Teams/beta/examples/New-MgBetaUserTeamworkSectionItem.md @@ -0,0 +1,30 @@ +### Example 1: Add a chat to a section + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +$params = @{ + id = "19:d5b2c3a4-e6f7-8901-abcd-ef3456789012@thread.v2" +} + +New-MgBetaUserTeamworkSectionItem -UserId $userId -TeamworkSectionId $teamworkSectionId -BodyParameter $params + +``` +This example will add a chat to a section + +### Example 2: Add a community to a section + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +$params = @{ + id = "eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiIxOTAzMzYyMTIyMTAifQ" +} + +New-MgBetaUserTeamworkSectionItem -UserId $userId -TeamworkSectionId $teamworkSectionId -BodyParameter $params + +``` +This example will add a community to a section + diff --git a/src/Teams/beta/examples/Remove-MgBetaUserChatTargetedMessage.md b/src/Teams/beta/examples/Remove-MgBetaUserChatTargetedMessage.md index e69de29bb2d..2d4792bc8b8 100644 --- a/src/Teams/beta/examples/Remove-MgBetaUserChatTargetedMessage.md +++ b/src/Teams/beta/examples/Remove-MgBetaUserChatTargetedMessage.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Remove-MgBetaUserChatTargetedMessage -UserId $userId -ChatId $chatId -TargetedChatMessageId $targetedChatMessageId + +``` +This example shows how to use the Remove-MgBetaUserChatTargetedMessage Cmdlet. + diff --git a/src/Teams/beta/examples/Remove-MgBetaUserTeamworkSection.md b/src/Teams/beta/examples/Remove-MgBetaUserTeamworkSection.md index e69de29bb2d..2edf217f56e 100644 --- a/src/Teams/beta/examples/Remove-MgBetaUserTeamworkSection.md +++ b/src/Teams/beta/examples/Remove-MgBetaUserTeamworkSection.md @@ -0,0 +1,12 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Remove-MgBetaUserTeamworkSection -UserId $userId -TeamworkSectionId $teamworkSectionId -IfMatch '"1742515200"' + + +``` +This example shows how to use the Remove-MgBetaUserTeamworkSection Cmdlet. + diff --git a/src/Teams/beta/examples/Remove-MgBetaUserTeamworkSectionItem.md b/src/Teams/beta/examples/Remove-MgBetaUserTeamworkSectionItem.md index e69de29bb2d..300f80f2736 100644 --- a/src/Teams/beta/examples/Remove-MgBetaUserTeamworkSectionItem.md +++ b/src/Teams/beta/examples/Remove-MgBetaUserTeamworkSectionItem.md @@ -0,0 +1,12 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Remove-MgBetaUserTeamworkSectionItem -UserId $userId -TeamworkSectionId $teamworkSectionId -TeamworkSectionItemId $teamworkSectionItemId -IfMatch '"1742515200"' + + +``` +This example shows how to use the Remove-MgBetaUserTeamworkSectionItem Cmdlet. + diff --git a/src/Teams/beta/examples/Remove-MgBetaUserTeamworkTargetedMessage.md b/src/Teams/beta/examples/Remove-MgBetaUserTeamworkTargetedMessage.md index e69de29bb2d..57fb313cdaf 100644 --- a/src/Teams/beta/examples/Remove-MgBetaUserTeamworkTargetedMessage.md +++ b/src/Teams/beta/examples/Remove-MgBetaUserTeamworkTargetedMessage.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +$params = @{ + teamId = "9dda0ae1-e007-4a1d-81ec-2cf4b1274610" + channelId = "19:eeaa4e946d674c4f8d4dded613780f45@thread.v2" + messageId = "1580849738240" +} + +Remove-MgBetaUserTeamworkTargetedMessage -UserId $userId -BodyParameter $params + +``` +This example shows how to use the Remove-MgBetaUserTeamworkTargetedMessage Cmdlet. + diff --git a/src/Teams/beta/examples/Update-MgBetaUserTeamworkSection.md b/src/Teams/beta/examples/Update-MgBetaUserTeamworkSection.md index e69de29bb2d..1c80ed91b00 100644 --- a/src/Teams/beta/examples/Update-MgBetaUserTeamworkSection.md +++ b/src/Teams/beta/examples/Update-MgBetaUserTeamworkSection.md @@ -0,0 +1,30 @@ +### Example 1: Update the display name of a section + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +$params = @{ + displayName = "Important Conversations" +} + +Update-MgBetaUserTeamworkSection -UserId $userId -TeamworkSectionId $teamworkSectionId -BodyParameter $params + +``` +This example will update the display name of a section + +### Example 2: Update the sort order of a section + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +$params = @{ + sortType = "unreadThenMostRecent" +} + +Update-MgBetaUserTeamworkSection -UserId $userId -TeamworkSectionId $teamworkSectionId -BodyParameter $params + +``` +This example will update the sort order of a section + diff --git a/src/Teams/v1.0/examples/Get-MgUserTeamworkRetainedTargetedMessage.md b/src/Teams/v1.0/examples/Get-MgUserTeamworkRetainedTargetedMessage.md index e69de29bb2d..62aa405375b 100644 --- a/src/Teams/v1.0/examples/Get-MgUserTeamworkRetainedTargetedMessage.md +++ b/src/Teams/v1.0/examples/Get-MgUserTeamworkRetainedTargetedMessage.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Teams + +Get-MgUserTeamworkRetainedTargetedMessage -UserId $userId + +``` +This example shows how to use the Get-MgUserTeamworkRetainedTargetedMessage Cmdlet. + diff --git a/src/Teams/v1.0/examples/Get-MgUserTeamworkTargetedMessage.md b/src/Teams/v1.0/examples/Get-MgUserTeamworkTargetedMessage.md index e69de29bb2d..41f50193d24 100644 --- a/src/Teams/v1.0/examples/Get-MgUserTeamworkTargetedMessage.md +++ b/src/Teams/v1.0/examples/Get-MgUserTeamworkTargetedMessage.md @@ -0,0 +1,33 @@ +### Example 1: Get all targeted messages for a user + +```powershell + +Import-Module Microsoft.Graph.Teams + +Get-MgUserTeamworkTargetedMessage -UserId $userId + +``` +This example will get all targeted messages for a user + +### Example 2: Filter targeted messages by date range + +```powershell + +Import-Module Microsoft.Graph.Teams + +Get-MgUserTeamworkTargetedMessage -UserId $userId -Filter "lastModifiedDateTime gt 2024-01-01T00:00:00Z and lastModifiedDateTime lt 2024-12-31T23:59:59Z" + +``` +This example will filter targeted messages by date range + +### Example 3: Get targeted messages by application sender + +```powershell + +Import-Module Microsoft.Graph.Teams + +Get-MgUserTeamworkTargetedMessage -UserId $userId -Filter "from/application/id eq '6d23e712-527b-406f-8d59-d02927885918'" + +``` +This example will get targeted messages by application sender + diff --git a/src/Teams/v1.0/examples/Remove-MgUserTeamworkTargetedMessage.md b/src/Teams/v1.0/examples/Remove-MgUserTeamworkTargetedMessage.md index e69de29bb2d..6162767d83a 100644 --- a/src/Teams/v1.0/examples/Remove-MgUserTeamworkTargetedMessage.md +++ b/src/Teams/v1.0/examples/Remove-MgUserTeamworkTargetedMessage.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Teams + +$params = @{ + teamId = "9dda0ae1-e007-4a1d-81ec-2cf4b1274610" + channelId = "19:eeaa4e946d674c4f8d4dded613780f45@thread.v2" + messageId = "1580849738240" +} + +Remove-MgUserTeamworkTargetedMessage -UserId $userId -BodyParameter $params + +``` +This example shows how to use the Remove-MgUserTeamworkTargetedMessage Cmdlet. + diff --git a/src/Users/beta/examples/Get-MgBetaUserSponsorOf.md b/src/Users/beta/examples/Get-MgBetaUserSponsorOf.md index e69de29bb2d..4f330e4b9f2 100644 --- a/src/Users/beta/examples/Get-MgBetaUserSponsorOf.md +++ b/src/Users/beta/examples/Get-MgBetaUserSponsorOf.md @@ -0,0 +1,22 @@ +### Example 1: List all entities that a user sponsors + +```powershell + +Import-Module Microsoft.Graph.Beta.Users + +Get-MgBetaUserSponsorOf -UserId $userId + +``` +This example will list all entities that a user sponsors + +### Example 2: List all entities that a user sponsors, filtered by type + +```powershell + +Import-Module Microsoft.Graph.Beta.Users + +Get-MgBetaUserSponsorOf -UserId $userId -Filter "microsoft.graph.user/userType eq 'Guest'" + +``` +This example will list all entities that a user sponsors, filtered by type + diff --git a/src/Users/v1.0/examples/Get-MgUserSponsorOf.md b/src/Users/v1.0/examples/Get-MgUserSponsorOf.md index e69de29bb2d..e21aa1a6519 100644 --- a/src/Users/v1.0/examples/Get-MgUserSponsorOf.md +++ b/src/Users/v1.0/examples/Get-MgUserSponsorOf.md @@ -0,0 +1,22 @@ +### Example 1: List all entities that a user sponsors + +```powershell + +Import-Module Microsoft.Graph.Users + +Get-MgUserSponsorOf -UserId $userId + +``` +This example will list all entities that a user sponsors + +### Example 2: List all entities that a user sponsors, filtered by type + +```powershell + +Import-Module Microsoft.Graph.Users + +Get-MgUserSponsorOf -UserId $userId -Filter "microsoft.graph.user/userType eq 'Guest'" + +``` +This example will list all entities that a user sponsors, filtered by type +