diff --git a/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md b/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md index e69de29bb2d..3f1ed3342cb 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 will### example + diff --git a/src/Applications/v1.0/examples/Get-MgServicePrincipalSynchronizationTemplate.md b/src/Applications/v1.0/examples/Get-MgServicePrincipalSynchronizationTemplate.md index e69de29bb2d..5a774ca1e66 100644 --- a/src/Applications/v1.0/examples/Get-MgServicePrincipalSynchronizationTemplate.md +++ b/src/Applications/v1.0/examples/Get-MgServicePrincipalSynchronizationTemplate.md @@ -0,0 +1,11 @@ +### Example + +```powershell + +Import-Module Microsoft.Graph.Applications + +Get-MgServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId + +``` +This example will### example + diff --git a/src/DeviceManagement.Administration/beta/examples/New-MgBetaDeviceManagementVirtualEndpointUserSetting.md b/src/DeviceManagement.Administration/beta/examples/New-MgBetaDeviceManagementVirtualEndpointUserSetting.md index 33e7d291c2f..9f4c375e0cc 100644 --- a/src/DeviceManagement.Administration/beta/examples/New-MgBetaDeviceManagementVirtualEndpointUserSetting.md +++ b/src/DeviceManagement.Administration/beta/examples/New-MgBetaDeviceManagementVirtualEndpointUserSetting.md @@ -9,6 +9,16 @@ $params = @{ displayName = "Example" selfServiceEnabled = $false localAdminEnabled = $true + crossRegionDisasterRecoverySetting = @{ + crossRegionDisasterRecoveryEnabled = $false + maintainCrossRegionRestorePointEnabled = $true + disasterRecoveryNetworkSetting = @{ + regionName = "westus" + regionGroup = "usEast" + } + disasterRecoveryType = "premium" + userInitiatedDisasterRecoveryAllowed = $true + } restorePointSetting = @{ frequencyInHours = 16 frequencyType = "sixteenHours" diff --git a/src/DeviceManagement.Administration/beta/examples/Update-MgBetaDeviceManagementVirtualEndpointUserSetting.md b/src/DeviceManagement.Administration/beta/examples/Update-MgBetaDeviceManagementVirtualEndpointUserSetting.md index 2cb04948548..e53fa213e35 100644 --- a/src/DeviceManagement.Administration/beta/examples/Update-MgBetaDeviceManagementVirtualEndpointUserSetting.md +++ b/src/DeviceManagement.Administration/beta/examples/Update-MgBetaDeviceManagementVirtualEndpointUserSetting.md @@ -13,6 +13,16 @@ $params = @{ frequencyType = "sixteenHours" userRestoreEnabled = $true } + crossRegionDisasterRecoverySetting = @{ + crossRegionDisasterRecoveryEnabled = $false + maintainCrossRegionRestorePointEnabled = $true + disasterRecoveryNetworkSetting = @{ + regionName = "westus" + regionGroup = "usEast" + } + disasterRecoveryType = "premium" + userInitiatedDisasterRecoveryAllowed = $true + } localAdminEnabled = $false resetEnabled = $true } diff --git a/src/Identity.DirectoryManagement/beta/examples/Restore-MgBetaDirectoryDeletedItem.md b/src/Identity.DirectoryManagement/beta/examples/Restore-MgBetaDirectoryDeletedItem.md index 0c30176bebf..79b61aaf7da 100644 --- a/src/Identity.DirectoryManagement/beta/examples/Restore-MgBetaDirectoryDeletedItem.md +++ b/src/Identity.DirectoryManagement/beta/examples/Restore-MgBetaDirectoryDeletedItem.md @@ -24,3 +24,18 @@ Restore-MgBetaDirectoryDeletedItem -DirectoryObjectId $directoryObjectId -BodyPa ``` This example shows how to use the Restore-MgBetaDirectoryDeletedItem Cmdlet. +### Example 3: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement + +$params = @{ + newUserPrincipalName = "johndoe@contoso.com" +} + +Restore-MgBetaDirectoryDeletedItem -DirectoryObjectId $directoryObjectId -BodyParameter $params + +``` +This example shows how to use the Restore-MgBetaDirectoryDeletedItem Cmdlet. + diff --git a/src/Reports/beta/examples/Get-MgBetaAuditLogDirectoryAudit.md b/src/Reports/beta/examples/Get-MgBetaAuditLogDirectoryAudit.md index 96556ebadd3..3775e94a40a 100644 --- a/src/Reports/beta/examples/Get-MgBetaAuditLogDirectoryAudit.md +++ b/src/Reports/beta/examples/Get-MgBetaAuditLogDirectoryAudit.md @@ -1,4 +1,4 @@ -### Example 1: Code snippet +### Example 1: Retrieve the list of audit logs ```powershell @@ -7,5 +7,16 @@ Import-Module Microsoft.Graph.Beta.Reports Get-MgBetaAuditLogDirectoryAudit ``` -This example shows how to use the Get-MgBetaAuditLogDirectoryAudit Cmdlet. +This example will retrieve the list of audit logs + +### Example 2: Retrieve the list of audit logs with a filter on initiatedBy/user + +```powershell + +Import-Module Microsoft.Graph.Beta.Reports + +Get-MgBetaAuditLogDirectoryAudit -Filter "initiatedBy/user/id eq '00000000-0000-0000-0000-000000000000'" + +``` +This example will retrieve the list of audit logs with a filter on initiatedby/user diff --git a/src/Reports/v1.0/examples/Get-MgAuditLogDirectoryAudit.md b/src/Reports/v1.0/examples/Get-MgAuditLogDirectoryAudit.md index 8f78b79e254..488dad21802 100644 --- a/src/Reports/v1.0/examples/Get-MgAuditLogDirectoryAudit.md +++ b/src/Reports/v1.0/examples/Get-MgAuditLogDirectoryAudit.md @@ -1,4 +1,4 @@ -### Example 1: Code snippet +### Example 1: Retrieve the list of audit logs ```powershell @@ -7,5 +7,16 @@ Import-Module Microsoft.Graph.Reports Get-MgAuditLogDirectoryAudit ``` -This example shows how to use the Get-MgAuditLogDirectoryAudit Cmdlet. +This example will retrieve the list of audit logs + +### Example 2: Retrieve the list of audit logs with a filter on initiatedBy/user + +```powershell + +Import-Module Microsoft.Graph.Reports + +Get-MgAuditLogDirectoryAudit -Filter "initiatedBy/user/id eq '00000000-0000-0000-0000-000000000000'" + +``` +This example will retrieve the list of audit logs with a filter on initiatedby/user diff --git a/src/Teams/beta/examples/New-MgBetaTeam.md b/src/Teams/beta/examples/New-MgBetaTeam.md index ea5147afea9..2d8161283c0 100644 --- a/src/Teams/beta/examples/New-MgBetaTeam.md +++ b/src/Teams/beta/examples/New-MgBetaTeam.md @@ -8,6 +8,7 @@ $params = @{ "template@odata.bind" = "https://graph.microsoft.com/beta/teamsTemplates('standard')" displayName = "My Sample Team" description = "My Sample Team's Description" + firstChannelName = "My First Channel of the sample team" } New-MgBetaTeam -BodyParameter $params @@ -25,6 +26,7 @@ $params = @{ "template@odata.bind" = "https://graph.microsoft.com/beta/teamsTemplates('standard')" displayName = "My Sample Team" description = "My Sample Team’s Description" + firstChannelName = "My First Channel of the sample team" members = @( @{ "@odata.type" = "#microsoft.graph.aadUserConversationMember" @@ -52,6 +54,7 @@ $params = @{ visibility = "Private" displayName = "Sample Engineering Team" description = "This is a sample engineering team, used to showcase the range of properties supported by this API" + firstChannelName = "My First Channel of the team" channels = @( @{ displayName = "Announcements 📢" diff --git a/src/Teams/v1.0/examples/New-MgTeamScheduleOpenShift.md b/src/Teams/v1.0/examples/New-MgTeamScheduleOpenShift.md index e874e669149..c8fc732aecf 100644 --- a/src/Teams/v1.0/examples/New-MgTeamScheduleOpenShift.md +++ b/src/Teams/v1.0/examples/New-MgTeamScheduleOpenShift.md @@ -5,37 +5,19 @@ Import-Module Microsoft.Graph.Teams $params = @{ - id = "OPNSHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8" - schedulingGroupId = "TAG_228940ed-ff84-4e25-b129-1b395cf78be0" + schedulingGroupId = "TAG_4ab7d329-1f7e-4eaf-ba93-63f1ff3f3c4a" sharedOpenShift = @{ - notes = "InventoryManagement" - openSlotCount = 2 displayName = "Dayshift" - startDateTime = [System.DateTime]::Parse("2018-10-04T00: 58: 45.340Z") - endDateTime = [System.DateTime]::Parse("2018-10-04T09: 50: 45.332Z") - theme = "white" + startDateTime = [System.DateTime]::Parse("2024-11-04T20:00:00Z") + endDateTime = [System.DateTime]::Parse("2024-11-04T21:00:00Z") + theme = "blue" + notes = "InventoryManagement" + openSlotCount = 1 activities = @( - @{ - isPaid = $true - startDateTime = [System.DateTime]::Parse("2018-10-04T00: 58: 45.340Z") - endDateTime = [System.DateTime]::Parse("2018-10-04T01: 58: 45.340Z") - code = "" - displayName = "Lunch" - } ) } - draftOpenShift = $null - createdDateTime = [System.DateTime]::Parse("2019-03-14T04: 32: 51.451Z") - lastModifiedDateTime = [System.DateTime]::Parse("2019-03-14T05: 32: 51.451Z") - lastModifiedBy = @{ - application = $null - device = $null - conversation = $null - user = @{ - id = "366c0b19-49b1-41b5-a03f-9f3887bd0ed8" - displayName = "JohnDoe" - } - } + draftTimeOff = $null + isStagedForDeletion = $false } New-MgTeamScheduleOpenShift -TeamId $teamId -BodyParameter $params diff --git a/src/Teams/v1.0/examples/New-MgTeamScheduleShift.md b/src/Teams/v1.0/examples/New-MgTeamScheduleShift.md index b0da8790c6b..18bc847d16d 100644 --- a/src/Teams/v1.0/examples/New-MgTeamScheduleShift.md +++ b/src/Teams/v1.0/examples/New-MgTeamScheduleShift.md @@ -5,41 +5,18 @@ Import-Module Microsoft.Graph.Teams $params = @{ - id = "SHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8" - userId = "c5d0c76b-80c4-481c-be50-923cd8d680a1" - schedulingGroupId = "TAG_228940ed-ff84-4e25-b129-1b395cf78be0" - sharedShift = @{ - displayName = "Day shift" - notes = "Please do inventory as part of your shift." - startDateTime = [System.DateTime]::Parse("2019-03-11T15:00:00Z") - endDateTime = [System.DateTime]::Parse("2019-03-12T00:00:00Z") - theme = "blue" - activities = @( - @{ - isPaid = $true - startDateTime = [System.DateTime]::Parse("2019-03-11T15:00:00Z") - endDateTime = [System.DateTime]::Parse("2019-03-11T15:15:00Z") - code = "" - displayName = "Lunch" - } - ) - } + userId = "5ca83ce7-291d-43b7-bf53-af79eef4bc1d" draftShift = @{ - displayName = "Day shift" - notes = "Please do inventory as part of your shift." - startDateTime = [System.DateTime]::Parse("2019-03-11T15:00:00Z") - endDateTime = [System.DateTime]::Parse("2019-03-12T00:00:00Z") + displayName = $null + startDateTime = [System.DateTime]::Parse("2024-10-08T15:00:00Z") + endDateTime = [System.DateTime]::Parse("2024-10-09T00:00:00Z") theme = "blue" + notes = $null activities = @( - @{ - isPaid = $true - startDateTime = [System.DateTime]::Parse("2019-03-11T15:00:00Z") - endDateTime = [System.DateTime]::Parse("2019-03-11T15:30:00Z") - code = "" - displayName = "Lunch" - } ) } + sharedShift = $null + isStagedForDeletion = $false } New-MgTeamScheduleShift -TeamId $teamId -BodyParameter $params diff --git a/src/Teams/v1.0/examples/New-MgTeamScheduleTimeOff.md b/src/Teams/v1.0/examples/New-MgTeamScheduleTimeOff.md index 8027fe619b7..86024751149 100644 --- a/src/Teams/v1.0/examples/New-MgTeamScheduleTimeOff.md +++ b/src/Teams/v1.0/examples/New-MgTeamScheduleTimeOff.md @@ -5,19 +5,15 @@ Import-Module Microsoft.Graph.Teams $params = @{ - userId = "c5d0c76b-80c4-481c-be50-923cd8d680a1" + userId = "aa162a04-bec6-4b81-ba99-96caa7b2b24d" sharedTimeOff = @{ - timeOffReasonId = "TOR_891045ca-b5d2-406b-aa06-a3c8921245d7" - startDateTime = [System.DateTime]::Parse("2019-03-11T07:00:00Z") - endDateTime = [System.DateTime]::Parse("2019-03-12T07:00:00Z") - theme = "white" - } - draftTimeOff = @{ - timeOffReasonId = "TOR_891045ca-b5d2-406b-aa06-a3c8921245d7" - startDateTime = [System.DateTime]::Parse("2019-03-11T07:00:00Z") - endDateTime = [System.DateTime]::Parse("2019-03-12T07:00:00Z") - theme = "pink" + timeOffReasonId = "TOR_29a5ba96-c7ef-4e76-bec6-055323746314" + startDateTime = [System.DateTime]::Parse("2024-10-10T19:00:00Z") + endDateTime = [System.DateTime]::Parse("2024-10-10T20:00:00Z") + theme = "blue" } + draftTimeOff = $null + isStagedForDeletion = $false } New-MgTeamScheduleTimeOff -TeamId $teamId -BodyParameter $params diff --git a/src/Teams/v1.0/examples/New-MgTeamworkWorkforceIntegration.md b/src/Teams/v1.0/examples/New-MgTeamworkWorkforceIntegration.md index d3a41b586a4..a3cdeac8474 100644 --- a/src/Teams/v1.0/examples/New-MgTeamworkWorkforceIntegration.md +++ b/src/Teams/v1.0/examples/New-MgTeamworkWorkforceIntegration.md @@ -5,15 +5,16 @@ Import-Module Microsoft.Graph.Teams $params = @{ - displayName = "displayName-value" - apiVersion = 99 + displayName = "ABCWorkforceIntegration" + apiVersion = 1 + isActive = $true encryption = @{ - protocol = "protocol-value" - secret = "secret-value" + protocol = "sharedSecret" + secret = "My Secret" } - isActive = $true - url = "url-value" - supportedEntities = "supportedEntities-value" + url = "https://ABCWorkforceIntegration.com/Contoso/" + supportedEntities = "Shift,SwapRequest" + eligibilityFilteringEnabledEntities = "SwapRequest" } New-MgTeamworkWorkforceIntegration -BodyParameter $params diff --git a/src/Teams/v1.0/examples/Update-MgTeamworkWorkforceIntegration.md b/src/Teams/v1.0/examples/Update-MgTeamworkWorkforceIntegration.md index eba16416cdc..dd456cc7132 100644 --- a/src/Teams/v1.0/examples/Update-MgTeamworkWorkforceIntegration.md +++ b/src/Teams/v1.0/examples/Update-MgTeamworkWorkforceIntegration.md @@ -5,15 +5,16 @@ Import-Module Microsoft.Graph.Teams $params = @{ - displayName = "displayName-value" - apiVersion = 99 + displayName = "ABCWorkforceIntegration" + apiVersion = 1 + isActive = $true encryption = @{ - protocol = "protocol-value" - secret = "secret-value" + protocol = "sharedSecret" + secret = "My Secret" } - isActive = $true - url = "url-value" - supportedEntities = "supportedEntities-value" + url = "https://ABCWorkforceIntegration.com/Contoso/" + supportedEntities = "Shift,SwapRequest" + eligibilityFilteringEnabledEntities = "SwapRequest" } Update-MgTeamworkWorkforceIntegration -WorkforceIntegrationId $workforceIntegrationId -BodyParameter $params