diff --git a/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md b/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md index e69de29bb2..d05037861a 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/Applications/v1.0/examples/Get-MgServicePrincipalSynchronizationTemplate.md b/src/Applications/v1.0/examples/Get-MgServicePrincipalSynchronizationTemplate.md index e69de29bb2..ce3990f381 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 shows how to use the Get-MgServicePrincipalSynchronizationTemplate Cmdlet. + diff --git a/src/Bookings/beta/examples/Get-MgBetaVirtualEventTownhallSessionAttendanceReport.md b/src/Bookings/beta/examples/Get-MgBetaVirtualEventTownhallSessionAttendanceReport.md index af3b3c2341..50dc01d392 100644 --- a/src/Bookings/beta/examples/Get-MgBetaVirtualEventTownhallSessionAttendanceReport.md +++ b/src/Bookings/beta/examples/Get-MgBetaVirtualEventTownhallSessionAttendanceReport.md @@ -1,4 +1,4 @@ -### Example 2: Code snippet +### Example 1: List attendance reports for a town hall session ```powershell @@ -7,5 +7,5 @@ Import-Module Microsoft.Graph.Beta.Bookings Get-MgBetaVirtualEventTownhallSessionAttendanceReport -VirtualEventTownhallId $virtualEventTownhallId -VirtualEventSessionId $virtualEventSessionId ``` -This example shows how to use the Get-MgBetaVirtualEventTownhallSessionAttendanceReport Cmdlet. +This example will list attendance reports for a town hall session diff --git a/src/Bookings/v1.0/examples/Get-MgVirtualEventTownhallByUserRole.md b/src/Bookings/v1.0/examples/Get-MgVirtualEventTownhallByUserRole.md index e69de29bb2..00a458a6fd 100644 --- a/src/Bookings/v1.0/examples/Get-MgVirtualEventTownhallByUserRole.md +++ b/src/Bookings/v1.0/examples/Get-MgVirtualEventTownhallByUserRole.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Bookings + +Get-MgVirtualEventTownhallByUserRole -Role $roleId + +``` +This example shows how to use the Get-MgVirtualEventTownhallByUserRole Cmdlet. + diff --git a/src/Calendar/beta/examples/New-MgBetaPlace.md b/src/Calendar/beta/examples/New-MgBetaPlace.md index 093355d11d..737254c5bb 100644 --- a/src/Calendar/beta/examples/New-MgBetaPlace.md +++ b/src/Calendar/beta/examples/New-MgBetaPlace.md @@ -1,18 +1,105 @@ -### Example 1: {{ Add title here }} +### Example 1: Create a building + +```powershell + +Import-Module Microsoft.Graph.Beta.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.building" + displayName = "B001" +} + +New-MgBetaPlace -BodyParameter $params + +``` +This example will create a building + +### Example 2: Create a floor + +```powershell + +Import-Module Microsoft.Graph.Beta.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.floor" + displayName = "F1" + parentId = "767a31a7-6987-41c9-b829-ab351b8aab53" +} + +New-MgBetaPlace -BodyParameter $params + +``` +This example will create a floor + +### Example 3: Create a section + +```powershell + +Import-Module Microsoft.Graph.Beta.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.section" + displayName = "S1" + parentId = "46ef7aed-5d94-4fd4-ae03-b333bc7a6955" +} + +New-MgBetaPlace -BodyParameter $params + +``` +This example will create a section + +### Example 4: Create a desk + ```powershell -PS C:\> {{ Add code here }} -{{ Add output here }} +Import-Module Microsoft.Graph.Beta.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.desk" + displayName = "D1" + parentId = "1ad0f725-6885-49c5-9a47-3b22a1f9409d" +} + +New-MgBetaPlace -BodyParameter $params + ``` +This example will create a desk -{{ Add description here }} +### Example 5: Create a room -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} -{{ Add output here }} +Import-Module Microsoft.Graph.Beta.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.room" + displayName = "Conf Room 4/3.3G11" + parentId = "46ef7aed-5d94-4fd4-ae03-b333bc7a6955" + bookingType = "standard" +} + +New-MgBetaPlace -BodyParameter $params + ``` +This example will create a room + +### Example 6: Create a workspace + +```powershell -{{ Add description here }} +Import-Module Microsoft.Graph.Beta.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.workspace" + parentId = "f7de7265-e420-47b4-9d49-28d728716241" + displayName = "testSpace001" + tags = @( + "test" +) +} + +New-MgBetaPlace -BodyParameter $params + +``` +This example will create a workspace diff --git a/src/Calendar/beta/examples/New-MgBetaPlaceCheck.md b/src/Calendar/beta/examples/New-MgBetaPlaceCheck.md index e69de29bb2..30f3f5ac07 100644 --- a/src/Calendar/beta/examples/New-MgBetaPlaceCheck.md +++ b/src/Calendar/beta/examples/New-MgBetaPlaceCheck.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Calendar + +$params = @{ + "@odata.type" = "#microsoft.graph.checkInClaim" + calendarEventId = "040000008200E00074C5B7101A82E00800000000D02AC02D26EFDB010000000000000000100000005A18ADA04F0A24489AE13ED3CC367978" + checkInMethod = "verified" +} + +New-MgBetaPlaceCheck -PlaceId $placeId -BodyParameter $params + +``` +This example shows how to use the New-MgBetaPlaceCheck Cmdlet. + diff --git a/src/Calendar/beta/examples/Remove-MgBetaPlaceAsBuildingMap.md b/src/Calendar/beta/examples/Remove-MgBetaPlaceAsBuildingMap.md index e69de29bb2..2eb68da0f4 100644 --- a/src/Calendar/beta/examples/Remove-MgBetaPlaceAsBuildingMap.md +++ b/src/Calendar/beta/examples/Remove-MgBetaPlaceAsBuildingMap.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Calendar + +Remove-MgBetaPlaceAsBuildingMap -PlaceId $placeId + +``` +This example shows how to use the Remove-MgBetaPlaceAsBuildingMap Cmdlet. + diff --git a/src/Calendar/beta/examples/Remove-MgBetaPlaceAsBuildingMapLevelFixture.md b/src/Calendar/beta/examples/Remove-MgBetaPlaceAsBuildingMapLevelFixture.md index e69de29bb2..2580018aae 100644 --- a/src/Calendar/beta/examples/Remove-MgBetaPlaceAsBuildingMapLevelFixture.md +++ b/src/Calendar/beta/examples/Remove-MgBetaPlaceAsBuildingMapLevelFixture.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Calendar + +Remove-MgBetaPlaceAsBuildingMapLevelFixture -PlaceId $placeId -LevelMapId $levelMapId -FixtureMapId $fixtureMapId + +``` +This example shows how to use the Remove-MgBetaPlaceAsBuildingMapLevelFixture Cmdlet. + diff --git a/src/Calendar/beta/examples/Remove-MgBetaPlaceAsBuildingMapLevelUnit.md b/src/Calendar/beta/examples/Remove-MgBetaPlaceAsBuildingMapLevelUnit.md index e69de29bb2..6178634efc 100644 --- a/src/Calendar/beta/examples/Remove-MgBetaPlaceAsBuildingMapLevelUnit.md +++ b/src/Calendar/beta/examples/Remove-MgBetaPlaceAsBuildingMapLevelUnit.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Calendar + +Remove-MgBetaPlaceAsBuildingMapLevelUnit -PlaceId $placeId -LevelMapId $levelMapId -UnitMapId $unitMapId + +``` +This example shows how to use the Remove-MgBetaPlaceAsBuildingMapLevelUnit Cmdlet. + diff --git a/src/Calendar/beta/examples/Update-MgBetaPlaceAsBuildingMapLevelFixture.md b/src/Calendar/beta/examples/Update-MgBetaPlaceAsBuildingMapLevelFixture.md index e69de29bb2..74ea10b54c 100644 --- a/src/Calendar/beta/examples/Update-MgBetaPlaceAsBuildingMapLevelFixture.md +++ b/src/Calendar/beta/examples/Update-MgBetaPlaceAsBuildingMapLevelFixture.md @@ -0,0 +1,32 @@ +### Example 1: Update an existing fixtureMap + +```powershell + +Import-Module Microsoft.Graph.Beta.Calendar + +$params = @{ + placeId = "67149ec1-4b99-42d4-88a4-d92cd23cb606" + properties = '{"id":"005eb3b8-c95d-4d35-a8a0-22d3cb4d6002","type":"Feature","feature_type":"fixture","geometry":{"type":"Polygon","coordinates":[[[-121.8889415,37.3295396],[-121.8889137,37.329503],[-121.8889082,37.3294956],[-121.888907,37.3294941],[-121.8888551,37.3295189],[-121.8888895,37.3295644],[-121.8889415,37.3295396]]]},"properties":{"name":{"en":"Test Fixture update"},"level_id":"e537d463-475b-43c3-a650-184566c68bc9","display_point":{"type":"Point","coordinates":[-121.8888983,37.3295292]}}}' +} + +Update-MgBetaPlaceAsBuildingMapLevelFixture -PlaceId $placeId -LevelMapId $levelMapId -FixtureMapId $fixtureMapId -BodyParameter $params + +``` +This example will update an existing fixturemap + +### Example 2: Create a fixtureMap if it doesn't exist + +```powershell + +Import-Module Microsoft.Graph.Beta.Calendar + +$params = @{ + placeId = "67149ec1-4b99-42d4-88a4-d92cd23cb606" + properties = '{"id":"005eb3b8-c95d-4d35-a8a0-22d3cb4d6002","type":"Feature","feature_type":"fixture","geometry":{"type":"Polygon","coordinates":[[[-121.8889415,37.3295396],[-121.8889137,37.329503],[-121.8889082,37.3294956],[-121.888907,37.3294941],[-121.8888551,37.3295189],[-121.8888895,37.3295644],[-121.8889415,37.3295396]]]},"properties":{"name":{"en":"Test Fixture 01"},"level_id":"e537d463-475b-43c3-a650-184566c68bc9","display_point":{"type":"Point","coordinates":[-121.8888983,37.3295292]}}}' +} + +Update-MgBetaPlaceAsBuildingMapLevelFixture -PlaceId $placeId -LevelMapId $levelMapId -FixtureMapId $fixtureMapId -BodyParameter $params + +``` +This example will create a fixturemap if it doesn't exist + diff --git a/src/Calendar/beta/examples/Update-MgBetaPlaceAsBuildingMapLevelUnit.md b/src/Calendar/beta/examples/Update-MgBetaPlaceAsBuildingMapLevelUnit.md index e69de29bb2..6fa469ff9d 100644 --- a/src/Calendar/beta/examples/Update-MgBetaPlaceAsBuildingMapLevelUnit.md +++ b/src/Calendar/beta/examples/Update-MgBetaPlaceAsBuildingMapLevelUnit.md @@ -0,0 +1,31 @@ +### Example 1: Update an existing unitMap + +```powershell + +Import-Module Microsoft.Graph.Beta.Calendar + +$params = @{ + placeId = $null + properties = '{"id":"005eb3b8-c95d-4d35-a8a0-22d3cb4d6542","type":"Feature","feature_type":"unit","geometry":{"type":"Polygon","coordinates":[[[-121.8889415,37.3295396],[-121.8889137,37.329503],[-121.8889082,37.3294956],[-121.888907,37.3294941],[-121.8888551,37.3295189],[-121.8888895,37.3295644],[-121.8889415,37.3295396]]]},"properties":{"name":{"en":"Test room from Test Floor 1 (120.3)"},"level_id":"e537d463-475b-43c3-a650-184566c68bc9","display_point":{"type":"Point","coordinates":[-121.8888983,37.3295292]},"category":"room"}}' +} + +Update-MgBetaPlaceAsBuildingMapLevelUnit -PlaceId $placeId -LevelMapId $levelMapId -UnitMapId $unitMapId -BodyParameter $params + +``` +This example will update an existing unitmap + +### Example 2: Create a unitMap if it doesn't exist + +```powershell + +Import-Module Microsoft.Graph.Beta.Calendar + +$params = @{ + properties = '{"id":"005eb3b8-c95d-4d35-a8a0-22d3cb4d6996","type":"Feature","feature_type":"unit","geometry":{"type":"Polygon","coordinates":[[[-121.8889415,37.3295396],[-121.8889137,37.329503],[-121.8889082,37.3294956],[-121.888907,37.3294941],[-121.8888551,37.3295189],[-121.8888895,37.3295644],[-121.8889415,37.3295396]]]},"properties":{"name":{"en":"Test Create room111111111111"},"level_id":"e537d463-475b-43c3-a650-184566c68bc9","display_point":{"type":"Point","coordinates":[-121.8888983,37.3295292]},"category":"room"}}' +} + +Update-MgBetaPlaceAsBuildingMapLevelUnit -PlaceId $placeId -LevelMapId $levelMapId -UnitMapId $unitMapId -BodyParameter $params + +``` +This example will create a unitmap if it doesn't exist + diff --git a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuilding.md b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuilding.md index e69de29bb2..fe5f858f73 100644 --- a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuilding.md +++ b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuilding.md @@ -0,0 +1,11 @@ +### Example 1: List all buildings defined in the tenant + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Get-MgPlaceAsBuilding + +``` +This example will list all buildings defined in the tenant + diff --git a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMap.md b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMap.md index e69de29bb2..cb1cc3e702 100644 --- a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMap.md +++ b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMap.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Get-MgPlaceAsBuildingMap -PlaceId $placeId + +``` +This example shows how to use the Get-MgPlaceAsBuildingMap Cmdlet. + diff --git a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapFootprint.md b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapFootprint.md index e69de29bb2..1e69764791 100644 --- a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapFootprint.md +++ b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapFootprint.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Get-MgPlaceAsBuildingMapFootprint -PlaceId $placeId + +``` +This example shows how to use the Get-MgPlaceAsBuildingMapFootprint Cmdlet. + diff --git a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevel.md b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevel.md index e69de29bb2..8069d75f9d 100644 --- a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevel.md +++ b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevel.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Get-MgPlaceAsBuildingMapLevel -PlaceId $placeId + +``` +This example shows how to use the Get-MgPlaceAsBuildingMapLevel Cmdlet. + diff --git a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevelFixture.md b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevelFixture.md index e69de29bb2..10c04a8454 100644 --- a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevelFixture.md +++ b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevelFixture.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Get-MgPlaceAsBuildingMapLevelFixture -PlaceId $placeId -LevelMapId $levelMapId + +``` +This example shows how to use the Get-MgPlaceAsBuildingMapLevelFixture Cmdlet. + diff --git a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevelSection.md b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevelSection.md index e69de29bb2..bae25961b1 100644 --- a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevelSection.md +++ b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevelSection.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Get-MgPlaceAsBuildingMapLevelSection -PlaceId $placeId -LevelMapId $levelMapId + +``` +This example shows how to use the Get-MgPlaceAsBuildingMapLevelSection Cmdlet. + diff --git a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevelUnit.md b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevelUnit.md index e69de29bb2..7ad9b6b598 100644 --- a/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevelUnit.md +++ b/src/Calendar/v1.0/examples/Get-MgPlaceAsBuildingMapLevelUnit.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Get-MgPlaceAsBuildingMapLevelUnit -PlaceId $placeId -LevelMapId $levelMapId + +``` +This example shows how to use the Get-MgPlaceAsBuildingMapLevelUnit Cmdlet. + diff --git a/src/Calendar/v1.0/examples/Get-MgPlaceAsDesk.md b/src/Calendar/v1.0/examples/Get-MgPlaceAsDesk.md index e69de29bb2..180e915871 100644 --- a/src/Calendar/v1.0/examples/Get-MgPlaceAsDesk.md +++ b/src/Calendar/v1.0/examples/Get-MgPlaceAsDesk.md @@ -0,0 +1,11 @@ +### Example 1: List all desks defined in the tenant + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Get-MgPlaceAsDesk + +``` +This example will list all desks defined in the tenant + diff --git a/src/Calendar/v1.0/examples/Get-MgPlaceAsFloor.md b/src/Calendar/v1.0/examples/Get-MgPlaceAsFloor.md index e69de29bb2..a271516292 100644 --- a/src/Calendar/v1.0/examples/Get-MgPlaceAsFloor.md +++ b/src/Calendar/v1.0/examples/Get-MgPlaceAsFloor.md @@ -0,0 +1,11 @@ +### Example 1: List all floors defined in the tenant + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Get-MgPlaceAsFloor + +``` +This example will list all floors defined in the tenant + diff --git a/src/Calendar/v1.0/examples/Get-MgPlaceAsSection.md b/src/Calendar/v1.0/examples/Get-MgPlaceAsSection.md index e69de29bb2..f7e429074c 100644 --- a/src/Calendar/v1.0/examples/Get-MgPlaceAsSection.md +++ b/src/Calendar/v1.0/examples/Get-MgPlaceAsSection.md @@ -0,0 +1,11 @@ +### Example 1: List all sections defined in the tenant + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Get-MgPlaceAsSection + +``` +This example will list all sections defined in the tenant + diff --git a/src/Calendar/v1.0/examples/Get-MgPlaceAsWorkspace.md b/src/Calendar/v1.0/examples/Get-MgPlaceAsWorkspace.md index e69de29bb2..7e2786c038 100644 --- a/src/Calendar/v1.0/examples/Get-MgPlaceAsWorkspace.md +++ b/src/Calendar/v1.0/examples/Get-MgPlaceAsWorkspace.md @@ -0,0 +1,11 @@ +### Example 1: List all workspaces defined in the tenant + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Get-MgPlaceAsWorkspace + +``` +This example will list all workspaces defined in the tenant + diff --git a/src/Calendar/v1.0/examples/Get-MgPlaceCheck.md b/src/Calendar/v1.0/examples/Get-MgPlaceCheck.md index e69de29bb2..3800591ff7 100644 --- a/src/Calendar/v1.0/examples/Get-MgPlaceCheck.md +++ b/src/Calendar/v1.0/examples/Get-MgPlaceCheck.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Get-MgPlaceCheck -PlaceId $placeId -CheckInClaimCalendarEventId $checkInClaimCalendarEventId + +``` +This example shows how to use the Get-MgPlaceCheck Cmdlet. + diff --git a/src/Calendar/v1.0/examples/New-MgPlace.md b/src/Calendar/v1.0/examples/New-MgPlace.md index e69de29bb2..5cf97a5616 100644 --- a/src/Calendar/v1.0/examples/New-MgPlace.md +++ b/src/Calendar/v1.0/examples/New-MgPlace.md @@ -0,0 +1,105 @@ +### Example 1: Create a building + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.building" + displayName = "B001" +} + +New-MgPlace -BodyParameter $params + +``` +This example will create a building + +### Example 2: Create a floor + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.floor" + displayName = "F1" + parentId = "767a31a7-6987-41c9-b829-ab351b8aab53" +} + +New-MgPlace -BodyParameter $params + +``` +This example will create a floor + +### Example 3: Create a section + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.section" + displayName = "S1" + parentId = "46ef7aed-5d94-4fd4-ae03-b333bc7a6955" +} + +New-MgPlace -BodyParameter $params + +``` +This example will create a section + +### Example 4: Create a desk + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.desk" + displayName = "D1" + parentId = "1ad0f725-6885-49c5-9a47-3b22a1f9409d" +} + +New-MgPlace -BodyParameter $params + +``` +This example will create a desk + +### Example 5: Create a room + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.room" + displayName = "Conf Room 4/3.3G11" + parentId = "46ef7aed-5d94-4fd4-ae03-b333bc7a6955" + bookingType = "standard" +} + +New-MgPlace -BodyParameter $params + +``` +This example will create a room + +### Example 6: Create a workspace + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.workspace" + parentId = "f7de7265-e420-47b4-9d49-28d728716241" + displayName = "testSpace001" + tags = @( + "test" +) +} + +New-MgPlace -BodyParameter $params + +``` +This example will create a workspace + diff --git a/src/Calendar/v1.0/examples/New-MgPlaceCheck.md b/src/Calendar/v1.0/examples/New-MgPlaceCheck.md index e69de29bb2..421c1d752f 100644 --- a/src/Calendar/v1.0/examples/New-MgPlaceCheck.md +++ b/src/Calendar/v1.0/examples/New-MgPlaceCheck.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + "@odata.type" = "#microsoft.graph.checkInClaim" + calendarEventId = "040000008200E00074C5B7101A82E00800000000D02AC02D26EFDB010000000000000000100000005A18ADA04F0A24489AE13ED3CC367978" + checkInMethod = "verified" +} + +New-MgPlaceCheck -PlaceId $placeId -BodyParameter $params + +``` +This example shows how to use the New-MgPlaceCheck Cmdlet. + diff --git a/src/Calendar/v1.0/examples/Remove-MgPlace.md b/src/Calendar/v1.0/examples/Remove-MgPlace.md index e69de29bb2..ce36806635 100644 --- a/src/Calendar/v1.0/examples/Remove-MgPlace.md +++ b/src/Calendar/v1.0/examples/Remove-MgPlace.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Remove-MgPlace -PlaceId $placeId + +``` +This example shows how to use the Remove-MgPlace Cmdlet. + diff --git a/src/Calendar/v1.0/examples/Remove-MgPlaceAsBuildingMap.md b/src/Calendar/v1.0/examples/Remove-MgPlaceAsBuildingMap.md index e69de29bb2..b2fe15a108 100644 --- a/src/Calendar/v1.0/examples/Remove-MgPlaceAsBuildingMap.md +++ b/src/Calendar/v1.0/examples/Remove-MgPlaceAsBuildingMap.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Remove-MgPlaceAsBuildingMap -PlaceId $placeId + +``` +This example shows how to use the Remove-MgPlaceAsBuildingMap Cmdlet. + diff --git a/src/Calendar/v1.0/examples/Remove-MgPlaceAsBuildingMapLevelFixture.md b/src/Calendar/v1.0/examples/Remove-MgPlaceAsBuildingMapLevelFixture.md index e69de29bb2..54cdcb0e83 100644 --- a/src/Calendar/v1.0/examples/Remove-MgPlaceAsBuildingMapLevelFixture.md +++ b/src/Calendar/v1.0/examples/Remove-MgPlaceAsBuildingMapLevelFixture.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Remove-MgPlaceAsBuildingMapLevelFixture -PlaceId $placeId -LevelMapId $levelMapId -FixtureMapId $fixtureMapId + +``` +This example shows how to use the Remove-MgPlaceAsBuildingMapLevelFixture Cmdlet. + diff --git a/src/Calendar/v1.0/examples/Remove-MgPlaceAsBuildingMapLevelUnit.md b/src/Calendar/v1.0/examples/Remove-MgPlaceAsBuildingMapLevelUnit.md index e69de29bb2..9a06eb5f16 100644 --- a/src/Calendar/v1.0/examples/Remove-MgPlaceAsBuildingMapLevelUnit.md +++ b/src/Calendar/v1.0/examples/Remove-MgPlaceAsBuildingMapLevelUnit.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +Remove-MgPlaceAsBuildingMapLevelUnit -PlaceId $placeId -LevelMapId $levelMapId -UnitMapId $unitMapId + +``` +This example shows how to use the Remove-MgPlaceAsBuildingMapLevelUnit Cmdlet. + diff --git a/src/Calendar/v1.0/examples/Update-MgPlace.md b/src/Calendar/v1.0/examples/Update-MgPlace.md index a70d24ba83..836cb31a87 100644 --- a/src/Calendar/v1.0/examples/Update-MgPlace.md +++ b/src/Calendar/v1.0/examples/Update-MgPlace.md @@ -4,6 +4,75 @@ Import-Module Microsoft.Graph.Calendar +$params = @{ + "@odata.type" = "microsoft.graph.building" + tags = @( + "most popular building" +) +} + +Update-MgPlace -PlaceId $placeId -BodyParameter $params + +``` +This example shows how to use the Update-MgPlace Cmdlet. + +### Example 2: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.floor" + isWheelChairAccessible = $true + sortOrder = +} + +Update-MgPlace -PlaceId $placeId -BodyParameter $params + +``` +This example shows how to use the Update-MgPlace Cmdlet. + +### Example 3: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.section" + label = "discuss area" +} + +Update-MgPlace -PlaceId $placeId -BodyParameter $params + +``` +This example shows how to use the Update-MgPlace Cmdlet. + +### Example 4: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.desk" + mode = @{ + "@odata.type" = "microsoft.graph.dropInPlaceMode" + } +} + +Update-MgPlace -PlaceId $placeId -BodyParameter $params + +``` +This example shows how to use the Update-MgPlace Cmdlet. + +### Example 5: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + $params = @{ "@odata.type" = "microsoft.graph.room" nickname = "Conf Room" @@ -18,3 +87,23 @@ Update-MgPlace -PlaceId $placeId -BodyParameter $params ``` This example shows how to use the Update-MgPlace Cmdlet. +### Example 6: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + "@odata.type" = "microsoft.graph.workspace" + nickname = "Conf Room" + building = "1" + label = "100" + capacity = + isWheelChairAccessible = $false +} + +Update-MgPlace -PlaceId $placeId -BodyParameter $params + +``` +This example shows how to use the Update-MgPlace Cmdlet. + diff --git a/src/Calendar/v1.0/examples/Update-MgPlaceAsBuildingMapLevelFixture.md b/src/Calendar/v1.0/examples/Update-MgPlaceAsBuildingMapLevelFixture.md index e69de29bb2..f3bc483efe 100644 --- a/src/Calendar/v1.0/examples/Update-MgPlaceAsBuildingMapLevelFixture.md +++ b/src/Calendar/v1.0/examples/Update-MgPlaceAsBuildingMapLevelFixture.md @@ -0,0 +1,32 @@ +### Example 1: Update an existing fixtureMap + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + placeId = "67149ec1-4b99-42d4-88a4-d92cd23cb606" + properties = '{"id":"005eb3b8-c95d-4d35-a8a0-22d3cb4d6002","type":"Feature","feature_type":"fixture","geometry":{"type":"Polygon","coordinates":[[[-121.8889415,37.3295396],[-121.8889137,37.329503],[-121.8889082,37.3294956],[-121.888907,37.3294941],[-121.8888551,37.3295189],[-121.8888895,37.3295644],[-121.8889415,37.3295396]]]},"properties":{"name":{"en":"Test Fixture update"},"level_id":"e537d463-475b-43c3-a650-184566c68bc9","display_point":{"type":"Point","coordinates":[-121.8888983,37.3295292]}}}' +} + +Update-MgPlaceAsBuildingMapLevelFixture -PlaceId $placeId -LevelMapId $levelMapId -FixtureMapId $fixtureMapId -BodyParameter $params + +``` +This example will update an existing fixturemap + +### Example 2: Create a fixtureMap if it doesn't exist + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + placeId = "67149ec1-4b99-42d4-88a4-d92cd23cb606" + properties = '{"id":"005eb3b8-c95d-4d35-a8a0-22d3cb4d6002","type":"Feature","feature_type":"fixture","geometry":{"type":"Polygon","coordinates":[[[-121.8889415,37.3295396],[-121.8889137,37.329503],[-121.8889082,37.3294956],[-121.888907,37.3294941],[-121.8888551,37.3295189],[-121.8888895,37.3295644],[-121.8889415,37.3295396]]]},"properties":{"name":{"en":"Test Fixture 01"},"level_id":"e537d463-475b-43c3-a650-184566c68bc9","display_point":{"type":"Point","coordinates":[-121.8888983,37.3295292]}}}' +} + +Update-MgPlaceAsBuildingMapLevelFixture -PlaceId $placeId -LevelMapId $levelMapId -FixtureMapId $fixtureMapId -BodyParameter $params + +``` +This example will create a fixturemap if it doesn't exist + diff --git a/src/Calendar/v1.0/examples/Update-MgPlaceAsBuildingMapLevelUnit.md b/src/Calendar/v1.0/examples/Update-MgPlaceAsBuildingMapLevelUnit.md index e69de29bb2..f2fc12c0e5 100644 --- a/src/Calendar/v1.0/examples/Update-MgPlaceAsBuildingMapLevelUnit.md +++ b/src/Calendar/v1.0/examples/Update-MgPlaceAsBuildingMapLevelUnit.md @@ -0,0 +1,31 @@ +### Example 1: Update an existing unitMap + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + placeId = $null + properties = '{"id":"005eb3b8-c95d-4d35-a8a0-22d3cb4d6542","type":"Feature","feature_type":"unit","geometry":{"type":"Polygon","coordinates":[[[-121.8889415,37.3295396],[-121.8889137,37.329503],[-121.8889082,37.3294956],[-121.888907,37.3294941],[-121.8888551,37.3295189],[-121.8888895,37.3295644],[-121.8889415,37.3295396]]]},"properties":{"name":{"en":"Test room from Test Floor 1 (120.3)"},"level_id":"e537d463-475b-43c3-a650-184566c68bc9","display_point":{"type":"Point","coordinates":[-121.8888983,37.3295292]},"category":"room"}}' +} + +Update-MgPlaceAsBuildingMapLevelUnit -PlaceId $placeId -LevelMapId $levelMapId -UnitMapId $unitMapId -BodyParameter $params + +``` +This example will update an existing unitmap + +### Example 2: Create a unitMap if it doesn't exist + +```powershell + +Import-Module Microsoft.Graph.Calendar + +$params = @{ + properties = '{"id":"005eb3b8-c95d-4d35-a8a0-22d3cb4d6996","type":"Feature","feature_type":"unit","geometry":{"type":"Polygon","coordinates":[[[-121.8889415,37.3295396],[-121.8889137,37.329503],[-121.8889082,37.3294956],[-121.888907,37.3294941],[-121.8888551,37.3295189],[-121.8888895,37.3295644],[-121.8889415,37.3295396]]]},"properties":{"name":{"en":"Test Create room111111111111"},"level_id":"e537d463-475b-43c3-a650-184566c68bc9","display_point":{"type":"Point","coordinates":[-121.8888983,37.3295292]},"category":"room"}}' +} + +Update-MgPlaceAsBuildingMapLevelUnit -PlaceId $placeId -LevelMapId $levelMapId -UnitMapId $unitMapId -BodyParameter $params + +``` +This example will create a unitmap if it doesn't exist + diff --git a/src/CloudCommunications/beta/examples/Invoke-MgBetaAnswerCommunicationCall.md b/src/CloudCommunications/beta/examples/Invoke-MgBetaAnswerCommunicationCall.md index 0fd191eb5f..c24225523d 100644 --- a/src/CloudCommunications/beta/examples/Invoke-MgBetaAnswerCommunicationCall.md +++ b/src/CloudCommunications/beta/examples/Invoke-MgBetaAnswerCommunicationCall.md @@ -17,6 +17,7 @@ callOptions = @{ "@odata.type" = "#microsoft.graph.incomingCallOptions" isContentSharingNotificationEnabled = $true isDeltaRosterEnabled = $true + isInteractiveRosterEnabled = $true } participantCapacity = 200 } diff --git a/src/CloudCommunications/beta/examples/Remove-MgBetaCommunicationCallParticipant.md b/src/CloudCommunications/beta/examples/Remove-MgBetaCommunicationCallParticipant.md index 6f1001ce36..99f114f001 100644 --- a/src/CloudCommunications/beta/examples/Remove-MgBetaCommunicationCallParticipant.md +++ b/src/CloudCommunications/beta/examples/Remove-MgBetaCommunicationCallParticipant.md @@ -9,7 +9,7 @@ Remove-MgBetaCommunicationCallParticipant -CallId $callId -ParticipantId $partic ``` This example shows how to use the Remove-MgBetaCommunicationCallParticipant Cmdlet. -### Example 2: Code snippet +### Example 3: Code snippet ```powershell diff --git a/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingJoinWebUrlVirtualAppointmentReminderSm.md b/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingJoinWebUrlVirtualAppointmentReminderSm.md index 8b13789179..e69de29bb2 100644 --- a/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingJoinWebUrlVirtualAppointmentReminderSm.md +++ b/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingJoinWebUrlVirtualAppointmentReminderSm.md @@ -1 +0,0 @@ - diff --git a/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingJoinWebUrlVirtualAppointmentSm.md b/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingJoinWebUrlVirtualAppointmentSm.md index 8b13789179..e69de29bb2 100644 --- a/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingJoinWebUrlVirtualAppointmentSm.md +++ b/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingJoinWebUrlVirtualAppointmentSm.md @@ -1 +0,0 @@ - diff --git a/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingVirtualAppointmentReminderSm.md b/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingVirtualAppointmentReminderSm.md index 8b13789179..e69de29bb2 100644 --- a/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingVirtualAppointmentReminderSm.md +++ b/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingVirtualAppointmentReminderSm.md @@ -1 +0,0 @@ - diff --git a/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingVirtualAppointmentSm.md b/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingVirtualAppointmentSm.md index 8b13789179..e69de29bb2 100644 --- a/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingVirtualAppointmentSm.md +++ b/src/CloudCommunications/beta/examples/Send-MgBetaCommunicationOnlineMeetingVirtualAppointmentSm.md @@ -1 +0,0 @@ - diff --git a/src/CloudCommunications/beta/examples/Send-MgBetaUserOnlineMeetingJoinWebUrlVirtualAppointmentReminderSm.md b/src/CloudCommunications/beta/examples/Send-MgBetaUserOnlineMeetingJoinWebUrlVirtualAppointmentReminderSm.md index 8b13789179..e69de29bb2 100644 --- a/src/CloudCommunications/beta/examples/Send-MgBetaUserOnlineMeetingJoinWebUrlVirtualAppointmentReminderSm.md +++ b/src/CloudCommunications/beta/examples/Send-MgBetaUserOnlineMeetingJoinWebUrlVirtualAppointmentReminderSm.md @@ -1 +0,0 @@ - diff --git a/src/CloudCommunications/beta/examples/Send-MgBetaUserOnlineMeetingJoinWebUrlVirtualAppointmentSm.md b/src/CloudCommunications/beta/examples/Send-MgBetaUserOnlineMeetingJoinWebUrlVirtualAppointmentSm.md index 8b13789179..e69de29bb2 100644 --- a/src/CloudCommunications/beta/examples/Send-MgBetaUserOnlineMeetingJoinWebUrlVirtualAppointmentSm.md +++ b/src/CloudCommunications/beta/examples/Send-MgBetaUserOnlineMeetingJoinWebUrlVirtualAppointmentSm.md @@ -1 +0,0 @@ - diff --git a/src/CloudCommunications/beta/examples/Set-MgBetaCommunicationPresence.md b/src/CloudCommunications/beta/examples/Set-MgBetaCommunicationPresence.md index 8b13789179..e69de29bb2 100644 --- a/src/CloudCommunications/beta/examples/Set-MgBetaCommunicationPresence.md +++ b/src/CloudCommunications/beta/examples/Set-MgBetaCommunicationPresence.md @@ -1 +0,0 @@ - diff --git a/src/CloudCommunications/beta/examples/Set-MgBetaCommunicationPresenceUserPreferredPresence.md b/src/CloudCommunications/beta/examples/Set-MgBetaCommunicationPresenceUserPreferredPresence.md index 8b13789179..e69de29bb2 100644 --- a/src/CloudCommunications/beta/examples/Set-MgBetaCommunicationPresenceUserPreferredPresence.md +++ b/src/CloudCommunications/beta/examples/Set-MgBetaCommunicationPresenceUserPreferredPresence.md @@ -1 +0,0 @@ - diff --git a/src/CloudCommunications/beta/examples/Set-MgBetaUserPresenceAutomaticLocation.md b/src/CloudCommunications/beta/examples/Set-MgBetaUserPresenceAutomaticLocation.md index e69de29bb2..aa4dbacb01 100644 --- a/src/CloudCommunications/beta/examples/Set-MgBetaUserPresenceAutomaticLocation.md +++ b/src/CloudCommunications/beta/examples/Set-MgBetaUserPresenceAutomaticLocation.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.CloudCommunications + +$params = @{ + workLocationType = "office" + placeId = "eb706f15-137e-4722-b4d1-b601481d9251" +} + +# A UPN can also be used as -UserId. +Set-MgBetaUserPresenceAutomaticLocation -UserId $userId -BodyParameter $params + +``` +This example shows how to use the Set-MgBetaUserPresenceAutomaticLocation Cmdlet. + diff --git a/src/CloudCommunications/beta/examples/Set-MgBetaUserPresenceManualLocation.md b/src/CloudCommunications/beta/examples/Set-MgBetaUserPresenceManualLocation.md index e69de29bb2..019b2800ab 100644 --- a/src/CloudCommunications/beta/examples/Set-MgBetaUserPresenceManualLocation.md +++ b/src/CloudCommunications/beta/examples/Set-MgBetaUserPresenceManualLocation.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.CloudCommunications + +$params = @{ + workLocationType = "office" + placeId = "eb706f15-137e-4722-b4d1-b601481d9251" +} + +# A UPN can also be used as -UserId. +Set-MgBetaUserPresenceManualLocation -UserId $userId -BodyParameter $params + +``` +This example shows how to use the Set-MgBetaUserPresenceManualLocation Cmdlet. + diff --git a/src/CloudCommunications/v1.0/examples/Get-MgCommunicationOnlineMeetingConversationMessageReaction.md b/src/CloudCommunications/v1.0/examples/Get-MgCommunicationOnlineMeetingConversationMessageReaction.md index e69de29bb2..f195538fcf 100644 --- a/src/CloudCommunications/v1.0/examples/Get-MgCommunicationOnlineMeetingConversationMessageReaction.md +++ b/src/CloudCommunications/v1.0/examples/Get-MgCommunicationOnlineMeetingConversationMessageReaction.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.CloudCommunications + +Get-MgCommunicationOnlineMeetingConversationMessageReaction -OnlineMeetingEngagementConversationId $onlineMeetingEngagementConversationId -EngagementConversationMessageId $engagementConversationMessageId + +``` +This example shows how to use the Get-MgCommunicationOnlineMeetingConversationMessageReaction Cmdlet. + diff --git a/src/CloudCommunications/v1.0/examples/Get-MgCommunicationOnlineMeetingMessage.md b/src/CloudCommunications/v1.0/examples/Get-MgCommunicationOnlineMeetingMessage.md index e69de29bb2..60a4b4ace6 100644 --- a/src/CloudCommunications/v1.0/examples/Get-MgCommunicationOnlineMeetingMessage.md +++ b/src/CloudCommunications/v1.0/examples/Get-MgCommunicationOnlineMeetingMessage.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.CloudCommunications + +Get-MgCommunicationOnlineMeetingMessage -ExpandProperty "conversation" + +``` +This example shows how to use the Get-MgCommunicationOnlineMeetingMessage Cmdlet. + diff --git a/src/CloudCommunications/v1.0/examples/Set-MgUserPresenceAutomaticLocation.md b/src/CloudCommunications/v1.0/examples/Set-MgUserPresenceAutomaticLocation.md index e69de29bb2..8466f63d36 100644 --- a/src/CloudCommunications/v1.0/examples/Set-MgUserPresenceAutomaticLocation.md +++ b/src/CloudCommunications/v1.0/examples/Set-MgUserPresenceAutomaticLocation.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.CloudCommunications + +$params = @{ + workLocationType = "office" + placeId = "eb706f15-137e-4722-b4d1-b601481d9251" +} + +# A UPN can also be used as -UserId. +Set-MgUserPresenceAutomaticLocation -UserId $userId -BodyParameter $params + +``` +This example shows how to use the Set-MgUserPresenceAutomaticLocation Cmdlet. + diff --git a/src/CloudCommunications/v1.0/examples/Set-MgUserPresenceManualLocation.md b/src/CloudCommunications/v1.0/examples/Set-MgUserPresenceManualLocation.md index e69de29bb2..416d328e2e 100644 --- a/src/CloudCommunications/v1.0/examples/Set-MgUserPresenceManualLocation.md +++ b/src/CloudCommunications/v1.0/examples/Set-MgUserPresenceManualLocation.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.CloudCommunications + +$params = @{ + workLocationType = "office" + placeId = "eb706f15-137e-4722-b4d1-b601481d9251" +} + +# A UPN can also be used as -UserId. +Set-MgUserPresenceManualLocation -UserId $userId -BodyParameter $params + +``` +This example shows how to use the Set-MgUserPresenceManualLocation Cmdlet. + diff --git a/src/ConfigurationManagement/beta/examples/New-MgBetaAdminConfigurationManagementConfigurationMonitor.md b/src/ConfigurationManagement/beta/examples/New-MgBetaAdminConfigurationManagementConfigurationMonitor.md new file mode 100644 index 0000000000..b2c10547b8 --- /dev/null +++ b/src/ConfigurationManagement/beta/examples/New-MgBetaAdminConfigurationManagementConfigurationMonitor.md @@ -0,0 +1,56 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.ConfigurationManagement + +$params = @{ + displayName = "Demo Monitor" + description = "This is a Demo Monitor" + baseline = @{ + displayName = "Demo Baseline" + description = "This is a baseline with resources SharedMailbox, AcceptedDomain and MailContact" + resources = @( + @{ + displayName = "TestSharedMailbox Resource" + resourceType = "microsoft.exchange.sharedmailbox" + properties = @{ + DisplayName = "TestSharedMailbox" + Alias = "testSharedMailbox" + Identity = "TestSharedMailbox" + Ensure = "Present" + PrimarySmtpAddress = "testSharedMailbox@contoso.onmicrosoft.com" + EmailAddresses = @( + "abc@contoso.onmicrosoft.com" + ) + } + } + @{ + displayName = "Accepted Domain" + resourceType = "microsoft.exchange.accepteddomain" + properties = @{ + Identity = "contoso.onmicrosoft.com" + DomainType = "InternalRelay" + Ensure = "Present" + } + } + @{ + displayName = "Mail Contact Resource" + resourceType = "microsoft.exchange.mailcontact" + properties = @{ + Name = "Chris" + DisplayName = "Chris" + ExternalEmailAddress = "SMTP:chris@fabrikam.com" + Alias = "Chrisa" + Ensure = "Present" + } + } + ) +} +} + +New-MgBetaAdminConfigurationManagementConfigurationMonitor -BodyParameter $params + +``` +This example shows how to use the New-MgBetaAdminConfigurationManagementConfigurationMonitor Cmdlet. + diff --git a/src/ConfigurationManagement/beta/examples/Remove-MgBetaAdminConfigurationManagementConfigurationMonitor.md b/src/ConfigurationManagement/beta/examples/Remove-MgBetaAdminConfigurationManagementConfigurationMonitor.md new file mode 100644 index 0000000000..93057e20b1 --- /dev/null +++ b/src/ConfigurationManagement/beta/examples/Remove-MgBetaAdminConfigurationManagementConfigurationMonitor.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.ConfigurationManagement + +Remove-MgBetaAdminConfigurationManagementConfigurationMonitor -ConfigurationMonitorId $configurationMonitorId + +``` +This example shows how to use the Remove-MgBetaAdminConfigurationManagementConfigurationMonitor Cmdlet. + diff --git a/src/ConfigurationManagement/beta/examples/Remove-MgBetaAdminConfigurationManagementConfigurationSnapshotJob.md b/src/ConfigurationManagement/beta/examples/Remove-MgBetaAdminConfigurationManagementConfigurationSnapshotJob.md new file mode 100644 index 0000000000..28a29c1509 --- /dev/null +++ b/src/ConfigurationManagement/beta/examples/Remove-MgBetaAdminConfigurationManagementConfigurationSnapshotJob.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.ConfigurationManagement + +Remove-MgBetaAdminConfigurationManagementConfigurationSnapshotJob -ConfigurationSnapshotJobId $configurationSnapshotJobId + +``` +This example shows how to use the Remove-MgBetaAdminConfigurationManagementConfigurationSnapshotJob Cmdlet. + diff --git a/src/ConfigurationManagement/beta/examples/Update-MgBetaAdminConfigurationManagementConfigurationMonitor.md b/src/ConfigurationManagement/beta/examples/Update-MgBetaAdminConfigurationManagementConfigurationMonitor.md new file mode 100644 index 0000000000..b97b04801c --- /dev/null +++ b/src/ConfigurationManagement/beta/examples/Update-MgBetaAdminConfigurationManagementConfigurationMonitor.md @@ -0,0 +1,81 @@ +### Example 1: Update the displayName of a configurationMonitor + +```powershell + +Import-Module Microsoft.Graph.Beta.ConfigurationManagement + +$params = @{ + displayName = "Demo Monitor Name Change" +} + +Update-MgBetaAdminConfigurationManagementConfigurationMonitor -ConfigurationMonitorId $configurationMonitorId -BodyParameter $params + +``` +This example will update the displayname of a configurationmonitor + +### Example 2: Update the baseline of a configurationMonitor + +```powershell + +Import-Module Microsoft.Graph.Beta.ConfigurationManagement + +$params = @{ + displayName = "Demo Monitor" + description = "This is a Demo Monitor" + baseline = @{ + displayName = "Demo Baseline" + description = "This is a baseline with SharedMailbox, AcceptedDomain and MailContact" + parameters = @( + @{ + displayName = "FQDN" + description = "The Fully Qualified Domain Name of the Tenant" + parameterType = "String" + } + ) + resources = @( + @{ + displayName = "TestSharedMailbox Resource" + resourceType = "microsoft.exchange.sharedmailbox" + properties = @{ + DisplayName = "TestSharedMailbox" + Identity = "TestSharedMailbox" + Ensure = "Present" + PrimarySmtpAddress = "[concat('testSharedMailbox', parameters('FQDN'))]" + EmailAddresses = @( + "abc@contoso.onmicrosoft.com" + "[concat('testSharedMailbox@', parameters('FQDN'))]" + ) + } + } + @{ + displayName = "Accepted Domain" + resourceType = "microsoft.exchange.accepteddomain" + properties = @{ + Identity = "contoso.onmicrosoft.com" + DomainType = "InternalRelay" + Ensure = "Present" + } + } + @{ + displayName = "Mail Contact Resource" + resourceType = "microsoft.exchange.mailcontact" + properties = @{ + Name = "Chris" + DisplayName = "Chris" + ExternalEmailAddress = "SMTP:chris@fabrikam.com" + Alias = "Chrisa" + Ensure = "Present" + } + } +) +} +parameters = @{ +FQDN = "contoso.onmicrosoft.com" +} +} + +Update-MgBetaAdminConfigurationManagementConfigurationMonitor -ConfigurationMonitorId $configurationMonitorId -BodyParameter $params + +``` +This example will update the baseline of a configurationmonitor + diff --git a/src/DeviceManagement.Administration/beta/examples/New-MgBetaDeviceManagementVirtualEndpointProvisioningPolicy.md b/src/DeviceManagement.Administration/beta/examples/New-MgBetaDeviceManagementVirtualEndpointProvisioningPolicy.md index 4f89a0f2cf..33f9b1dc90 100644 --- a/src/DeviceManagement.Administration/beta/examples/New-MgBetaDeviceManagementVirtualEndpointProvisioningPolicy.md +++ b/src/DeviceManagement.Administration/beta/examples/New-MgBetaDeviceManagementVirtualEndpointProvisioningPolicy.md @@ -35,6 +35,7 @@ $params = @{ locale = "en-US" } provisioningType = "dedicated" + userExperienceType = "cloudPc" userSettingsPersistenceConfiguration = @{ userSettingsPersistenceEnabled = $true userSettingsPersistenceStorageSizeCategory = "fourGB" diff --git a/src/DeviceManagement.Administration/v1.0/examples/Get-MgDeviceManagementVirtualEndpointReportCloudPcRecommendationReport.md b/src/DeviceManagement.Administration/v1.0/examples/Get-MgDeviceManagementVirtualEndpointReportCloudPcRecommendationReport.md index e69de29bb2..a380508a2f 100644 --- a/src/DeviceManagement.Administration/v1.0/examples/Get-MgDeviceManagementVirtualEndpointReportCloudPcRecommendationReport.md +++ b/src/DeviceManagement.Administration/v1.0/examples/Get-MgDeviceManagementVirtualEndpointReportCloudPcRecommendationReport.md @@ -0,0 +1,54 @@ +### Example 1: Get device recommendation reports grouped by service plan and usage category + +```powershell + +Import-Module Microsoft.Graph.DeviceManagement.Administration + +$params = @{ + reportType = "cloudPcUsageCategoryReport" + select = @( + "ServicePlanId" +"ServicePlanName" +"UsageInsight" +) +groupBy = @( +"ServicePlanId" +"ServicePlanName" +"UsageInsight" +) +} + +Get-MgDeviceManagementVirtualEndpointReportCloudPcRecommendationReport -BodyParameter $params + +``` +This example will get device recommendation reports grouped by service plan and usage category + +### Example 2: Get device usage category reports for Cloud PCs + +```powershell + +Import-Module Microsoft.Graph.DeviceManagement.Administration + +$params = @{ + reportType = "cloudPcUsageCategoryReport" + filter = "" + select = @( + "CloudPcId" +"ManagedDeviceName" +"UserPrincipalName" +"ServicePlanId" +"ServicePlanName" +"UsageInsight" +"RecommendedPlanId" +"RecommendedPlanName" +) +search = "" +skip = 0 +top = 15 +} + +Get-MgDeviceManagementVirtualEndpointReportCloudPcRecommendationReport -BodyParameter $params + +``` +This example will get device usage category reports for cloud pcs + diff --git a/src/DeviceManagement.Administration/v1.0/examples/Invoke-MgReprovisionDeviceManagementVirtualEndpointCloudPc.md b/src/DeviceManagement.Administration/v1.0/examples/Invoke-MgReprovisionDeviceManagementVirtualEndpointCloudPc.md index e69de29bb2..a833e7cae3 100644 --- a/src/DeviceManagement.Administration/v1.0/examples/Invoke-MgReprovisionDeviceManagementVirtualEndpointCloudPc.md +++ b/src/DeviceManagement.Administration/v1.0/examples/Invoke-MgReprovisionDeviceManagementVirtualEndpointCloudPc.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.DeviceManagement.Administration + +$params = @{ + userAccountType = "administrator" + osVersion = "windows10" +} + +Invoke-MgReprovisionDeviceManagementVirtualEndpointCloudPc -CloudPCId $cloudPCId -BodyParameter $params + +``` +This example shows how to use the Invoke-MgReprovisionDeviceManagementVirtualEndpointCloudPc Cmdlet. + diff --git a/src/Education/beta/examples/New-MgBetaEducationClassAssignmentSettingGradingScheme.md b/src/Education/beta/examples/New-MgBetaEducationClassAssignmentSettingGradingScheme.md index e69de29bb2..0f1ab347b5 100644 --- a/src/Education/beta/examples/New-MgBetaEducationClassAssignmentSettingGradingScheme.md +++ b/src/Education/beta/examples/New-MgBetaEducationClassAssignmentSettingGradingScheme.md @@ -0,0 +1,27 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Education + +$params = @{ + displayName = "PassFailScheme" + grades = @( + @{ + displayName = "Pass" + minPercentage = 70 + defaultPercentage = 90 + } + @{ + displayName = "Fail" + minPercentage = 0 + defaultPercentage = 50 + } + ) +} + +New-MgBetaEducationClassAssignmentSettingGradingScheme -EducationClassId $educationClassId -BodyParameter $params + +``` +This example shows how to use the New-MgBetaEducationClassAssignmentSettingGradingScheme Cmdlet. + diff --git a/src/Education/beta/examples/Update-MgBetaEducationClassAssignmentSetting.md b/src/Education/beta/examples/Update-MgBetaEducationClassAssignmentSetting.md index e03c335606..dd616255fe 100644 --- a/src/Education/beta/examples/Update-MgBetaEducationClassAssignmentSetting.md +++ b/src/Education/beta/examples/Update-MgBetaEducationClassAssignmentSetting.md @@ -1,4 +1,4 @@ -### Example 1: Code snippet +### Example 1: Update submissionAnimationDisabled ```powershell @@ -11,9 +11,9 @@ $params = @{ Update-MgBetaEducationClassAssignmentSetting -EducationClassId $educationClassId -BodyParameter $params ``` -This example shows how to use the Update-MgBetaEducationClassAssignmentSetting Cmdlet. +This example will update submissionanimationdisabled -### Example 2: Code snippet +### Example 2: Create grading categories ```powershell @@ -39,5 +39,94 @@ $params = @{ Update-MgBetaEducationClassAssignmentSetting -EducationClassId $educationClassId -BodyParameter $params ``` -This example shows how to use the Update-MgBetaEducationClassAssignmentSetting Cmdlet. +This example will create grading categories + +### Example 3: Delta payload to delete, modify, and add grading categories + +```powershell + +Import-Module Microsoft.Graph.Beta.Education + +$params = @{ + "gradingCategories@delta" = @( + @{ + id = "fb859cd3-943b-4cd6-9bbe-fe1c39eace0e" + displayName = "Lab Test" + } + @{ + "@odata.context" = "https://graph.microsoft.com/beta/$metadata#gradingCategories/$deletedEntity" + id = "e2a86277-24f9-4f29-8196-8c83fc69d00d" + reason = "deleted" + } + @{ + displayName = "Lab Practice" + percentageWeight = + } + @{ + displayName = "Lab Theory" + percentageWeight = + } + ) +} + +Update-MgBetaEducationClassAssignmentSetting -EducationClassId $educationClassId -BodyParameter $params + +``` +This example will delta payload to delete, modify, and add grading categories + +### Example 4: Create grading schemes + +```powershell + +Import-Module Microsoft.Graph.Beta.Education + +$params = @{ + gradingSchemes = @( + @{ + displayName = "Pass/fail" + grades = @( + @{ + displayName = "Pass" + minPercentage = 60 + defaultPercentage = 100 + } + @{ + displayName = "Fail" + minPercentage = 0 + defaultPercentage = 0 + } + ) + } + @{ + displayName = "Letters" + grades = @( + @{ + displayName = "A" + minPercentage = 90 + } + @{ + displayName = "B" + minPercentage = 80 + } + @{ + displayName = "C" + minPercentage = 70 + } + @{ + displayName = "D" + minPercentage = 60 + } + @{ + displayName = "F" + minPercentage = 0 + } + ) + } + ) +} + +Update-MgBetaEducationClassAssignmentSetting -EducationClassId $educationClassId -BodyParameter $params + +``` +This example will create grading schemes diff --git a/src/Education/v1.0/examples/Get-MgEducationClassAssignmentResourceDependentResource.md b/src/Education/v1.0/examples/Get-MgEducationClassAssignmentResourceDependentResource.md index e69de29bb2..5fc97b5d27 100644 --- a/src/Education/v1.0/examples/Get-MgEducationClassAssignmentResourceDependentResource.md +++ b/src/Education/v1.0/examples/Get-MgEducationClassAssignmentResourceDependentResource.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Education + +Get-MgEducationClassAssignmentResourceDependentResource -EducationClassId $educationClassId -EducationAssignmentId $educationAssignmentId -EducationAssignmentResourceId $educationAssignmentResourceId + +``` +This example shows how to use the Get-MgEducationClassAssignmentResourceDependentResource Cmdlet. + diff --git a/src/Education/v1.0/examples/Get-MgEducationClassAssignmentSettingGradingScheme.md b/src/Education/v1.0/examples/Get-MgEducationClassAssignmentSettingGradingScheme.md index e69de29bb2..310f2ed9ec 100644 --- a/src/Education/v1.0/examples/Get-MgEducationClassAssignmentSettingGradingScheme.md +++ b/src/Education/v1.0/examples/Get-MgEducationClassAssignmentSettingGradingScheme.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Education + +Get-MgEducationClassAssignmentSettingGradingScheme -EducationClassId $educationClassId -EducationGradingSchemeId $educationGradingSchemeId + +``` +This example shows how to use the Get-MgEducationClassAssignmentSettingGradingScheme Cmdlet. + diff --git a/src/Education/v1.0/examples/Get-MgEducationClassAssignmentSubmissionResourceDependentResource.md b/src/Education/v1.0/examples/Get-MgEducationClassAssignmentSubmissionResourceDependentResource.md index e69de29bb2..6ef629edf8 100644 --- a/src/Education/v1.0/examples/Get-MgEducationClassAssignmentSubmissionResourceDependentResource.md +++ b/src/Education/v1.0/examples/Get-MgEducationClassAssignmentSubmissionResourceDependentResource.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Education + +Get-MgEducationClassAssignmentSubmissionResourceDependentResource -EducationClassId $educationClassId -EducationAssignmentId $educationAssignmentId -EducationSubmissionId $educationSubmissionId -EducationSubmissionResourceId $educationSubmissionResourceId + +``` +This example shows how to use the Get-MgEducationClassAssignmentSubmissionResourceDependentResource Cmdlet. + diff --git a/src/Education/v1.0/examples/Get-MgEducationReportReadingCoachPassage.md b/src/Education/v1.0/examples/Get-MgEducationReportReadingCoachPassage.md index e69de29bb2..abd5136096 100644 --- a/src/Education/v1.0/examples/Get-MgEducationReportReadingCoachPassage.md +++ b/src/Education/v1.0/examples/Get-MgEducationReportReadingCoachPassage.md @@ -0,0 +1,22 @@ +### Example 1: Get a list of the Reading Coach passages from the last 24 hours + +```powershell + +Import-Module Microsoft.Graph.Education + +Get-MgEducationReportReadingCoachPassage + +``` +This example will get a list of the reading coach passages from the last 24 hours + +### Example 2: Get a list of the Reading Coach passages for a specific date using $filter + +```powershell + +Import-Module Microsoft.Graph.Education + +Get-MgEducationReportReadingCoachPassage -Filter "practicedAtDateTime gt 2025-06-22T00:00:00Z and practicedAtDateTime lt 2025-06-23T00:00:00Z" + +``` +This example will get a list of the reading coach passages for a specific date using $filter + diff --git a/src/Education/v1.0/examples/Get-MgEducationReportSpeakerAssignmentSubmission.md b/src/Education/v1.0/examples/Get-MgEducationReportSpeakerAssignmentSubmission.md index e69de29bb2..032326d39d 100644 --- a/src/Education/v1.0/examples/Get-MgEducationReportSpeakerAssignmentSubmission.md +++ b/src/Education/v1.0/examples/Get-MgEducationReportSpeakerAssignmentSubmission.md @@ -0,0 +1,22 @@ +### Example 1: Get a list of the speaker assignment submissions from the last 24 hours + +```powershell + +Import-Module Microsoft.Graph.Education + +Get-MgEducationReportSpeakerAssignmentSubmission + +``` +This example will get a list of the speaker assignment submissions from the last 24 hours + +### Example 2: Get a list of the speaker assignment submissions for a specific date using $filter + +```powershell + +Import-Module Microsoft.Graph.Education + +Get-MgEducationReportSpeakerAssignmentSubmission -Filter "submissionDateTime gt 2025-05-28T00:00:00Z and submissionDateTime lt 2025-05-29T00:00:00Z" + +``` +This example will get a list of the speaker assignment submissions for a specific date using $filter + diff --git a/src/Education/v1.0/examples/New-MgEducationClassAssignmentSettingGradingScheme.md b/src/Education/v1.0/examples/New-MgEducationClassAssignmentSettingGradingScheme.md index e69de29bb2..1687f19890 100644 --- a/src/Education/v1.0/examples/New-MgEducationClassAssignmentSettingGradingScheme.md +++ b/src/Education/v1.0/examples/New-MgEducationClassAssignmentSettingGradingScheme.md @@ -0,0 +1,27 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Education + +$params = @{ + displayName = "PassFailScheme" + grades = @( + @{ + displayName = "Pass" + minPercentage = 70 + defaultPercentage = 90 + } + @{ + displayName = "Fail" + minPercentage = 0 + defaultPercentage = 50 + } + ) +} + +New-MgEducationClassAssignmentSettingGradingScheme -EducationClassId $educationClassId -BodyParameter $params + +``` +This example shows how to use the New-MgEducationClassAssignmentSettingGradingScheme Cmdlet. + diff --git a/src/Education/v1.0/examples/Remove-MgEducationClassAssignmentSettingGradingScheme.md b/src/Education/v1.0/examples/Remove-MgEducationClassAssignmentSettingGradingScheme.md index e69de29bb2..77693f7052 100644 --- a/src/Education/v1.0/examples/Remove-MgEducationClassAssignmentSettingGradingScheme.md +++ b/src/Education/v1.0/examples/Remove-MgEducationClassAssignmentSettingGradingScheme.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Education + +Remove-MgEducationClassAssignmentSettingGradingScheme -EducationClassId $educationClassId -EducationGradingSchemeId $educationGradingSchemeId + +``` +This example shows how to use the Remove-MgEducationClassAssignmentSettingGradingScheme Cmdlet. + diff --git a/src/Education/v1.0/examples/Update-MgEducationClassAssignmentDefault.md b/src/Education/v1.0/examples/Update-MgEducationClassAssignmentDefault.md index b24347c538..8194d7e154 100644 --- a/src/Education/v1.0/examples/Update-MgEducationClassAssignmentDefault.md +++ b/src/Education/v1.0/examples/Update-MgEducationClassAssignmentDefault.md @@ -6,7 +6,7 @@ Import-Module Microsoft.Graph.Education $params = @{ addedStudentAction = "assignIfOpen" - notificationChannelUrl = "https://graph.microsoft.com/beta/teams('acdefc6b-2dc6-4e71-b1e9-6d9810ab1793')/channels('3da03fc4-8eac-4459-84fb-1422dc01f65e')" + notificationChannelUrl = "https://graph.microsoft.com/v1.0/teams('acdefc6b-2dc6-4e71-b1e9-6d9810ab1793')/channels('3da03fc4-8eac-4459-84fb-1422dc01f65e')" } Update-MgEducationClassAssignmentDefault -EducationClassId $educationClassId -BodyParameter $params diff --git a/src/Files/beta/examples/Invoke-MgBetaGraphGroupDrive.md b/src/Files/beta/examples/Invoke-MgBetaGraphGroupDrive.md index e69de29bb2..8b13789179 100644 --- a/src/Files/beta/examples/Invoke-MgBetaGraphGroupDrive.md +++ b/src/Files/beta/examples/Invoke-MgBetaGraphGroupDrive.md @@ -0,0 +1 @@ + diff --git a/src/Files/beta/examples/Invoke-MgBetaGraphUserDrive.md b/src/Files/beta/examples/Invoke-MgBetaGraphUserDrive.md index e69de29bb2..8b13789179 100644 --- a/src/Files/beta/examples/Invoke-MgBetaGraphUserDrive.md +++ b/src/Files/beta/examples/Invoke-MgBetaGraphUserDrive.md @@ -0,0 +1 @@ + diff --git a/src/Files/beta/examples/Remove-MgBetaDriveItemRetentionLabel.md b/src/Files/beta/examples/Remove-MgBetaDriveItemRetentionLabel.md index 8ff460e287..5ad7de9db8 100644 --- a/src/Files/beta/examples/Remove-MgBetaDriveItemRetentionLabel.md +++ b/src/Files/beta/examples/Remove-MgBetaDriveItemRetentionLabel.md @@ -1,4 +1,4 @@ -### Example 1: Code snippet +### Example 1: Remove the retention label from a driveItem ```powershell @@ -7,5 +7,16 @@ Import-Module Microsoft.Graph.Beta.Files Remove-MgBetaDriveItemRetentionLabel -DriveId $driveId -DriveItemId $driveItemId ``` -This example shows how to use the Remove-MgBetaDriveItemRetentionLabel Cmdlet. +This example will remove the retention label from a driveitem + +### Example 2: Remove the retention label from a driveItem that fails due to insufficient permissions + +```powershell + +Import-Module Microsoft.Graph.Beta.Files + +Remove-MgBetaDriveItemRetentionLabel -DriveId $driveId -DriveItemId $driveItemId + +``` +This example will remove the retention label from a driveitem that fails due to insufficient permissions diff --git a/src/Files/v1.0/examples/Get-MgDriveItemRetentionLabel.md b/src/Files/v1.0/examples/Get-MgDriveItemRetentionLabel.md index e69de29bb2..c51b7c234e 100644 --- a/src/Files/v1.0/examples/Get-MgDriveItemRetentionLabel.md +++ b/src/Files/v1.0/examples/Get-MgDriveItemRetentionLabel.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Files + +Get-MgDriveItemRetentionLabel -DriveId $driveId -DriveItemId $driveItemId + +``` +This example shows how to use the Get-MgDriveItemRetentionLabel Cmdlet. + diff --git a/src/Files/v1.0/examples/Invoke-MgGraphGroupDrive.md b/src/Files/v1.0/examples/Invoke-MgGraphGroupDrive.md index e69de29bb2..8b13789179 100644 --- a/src/Files/v1.0/examples/Invoke-MgGraphGroupDrive.md +++ b/src/Files/v1.0/examples/Invoke-MgGraphGroupDrive.md @@ -0,0 +1 @@ + diff --git a/src/Files/v1.0/examples/Invoke-MgGraphUserDrive.md b/src/Files/v1.0/examples/Invoke-MgGraphUserDrive.md index e69de29bb2..8b13789179 100644 --- a/src/Files/v1.0/examples/Invoke-MgGraphUserDrive.md +++ b/src/Files/v1.0/examples/Invoke-MgGraphUserDrive.md @@ -0,0 +1 @@ + diff --git a/src/Files/v1.0/examples/New-MgDriveItemLink.md b/src/Files/v1.0/examples/New-MgDriveItemLink.md index 07dce3ae50..c4ebe803bb 100644 --- a/src/Files/v1.0/examples/New-MgDriveItemLink.md +++ b/src/Files/v1.0/examples/New-MgDriveItemLink.md @@ -1,4 +1,4 @@ -### Example 1: Code snippet +### Example 1: Creating sharable links ```powershell @@ -14,9 +14,9 @@ $params = @{ New-MgDriveItemLink -DriveId $driveId -DriveItemId $driveItemId -BodyParameter $params ``` -This example shows how to use the New-MgDriveItemLink Cmdlet. +This example shows creating sharable links -### Example 2: Code snippet +### Example 2: Creating company sharable links ```powershell @@ -30,9 +30,9 @@ $params = @{ New-MgDriveItemLink -DriveId $driveId -DriveItemId $driveItemId -BodyParameter $params ``` -This example shows how to use the New-MgDriveItemLink Cmdlet. +This example shows creating company sharable links -### Example 3: Code snippet +### Example 3: Creating embeddable links ```powershell @@ -45,5 +45,5 @@ $params = @{ New-MgDriveItemLink -DriveId $driveId -DriveItemId $driveItemId -BodyParameter $params ``` -This example shows how to use the New-MgDriveItemLink Cmdlet. +This example shows creating embeddable links diff --git a/src/Groups/beta/examples/Update-MgBetaGroupOnPremiseSyncBehavior.md b/src/Groups/beta/examples/Update-MgBetaGroupOnPremiseSyncBehavior.md index e69de29bb2..078f5e7491 100644 --- a/src/Groups/beta/examples/Update-MgBetaGroupOnPremiseSyncBehavior.md +++ b/src/Groups/beta/examples/Update-MgBetaGroupOnPremiseSyncBehavior.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Groups + +$params = @{ + "@odata.type" = "#microsoft.graph.onPremisesSyncBehavior" + isCloudManaged = $true +} + +Update-MgBetaGroupOnPremiseSyncBehavior -GroupId $groupId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaGroupOnPremiseSyncBehavior Cmdlet. + diff --git a/src/Identity.DirectoryManagement/beta/examples/New-MgBetaAdminPeopleProfilePropertySetting.md b/src/Identity.DirectoryManagement/beta/examples/New-MgBetaAdminPeopleProfilePropertySetting.md index 5d3105e7c5..76b6ece080 100644 --- a/src/Identity.DirectoryManagement/beta/examples/New-MgBetaAdminPeopleProfilePropertySetting.md +++ b/src/Identity.DirectoryManagement/beta/examples/New-MgBetaAdminPeopleProfilePropertySetting.md @@ -6,6 +6,8 @@ Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement $params = @{ "@odata.type" = "#microsoft.graph.profilePropertySetting" + displayName = "Profile priority config" + name = "Profile priority config" prioritizedSourceUrls = @( "https://graph.microsoft.com/beta/admin/people/profileSources(sourceId='contosohr1')" ) diff --git a/src/Identity.DirectoryManagement/beta/examples/New-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfiguration.md b/src/Identity.DirectoryManagement/beta/examples/New-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfiguration.md index e69de29bb2..360a20427e 100644 --- a/src/Identity.DirectoryManagement/beta/examples/New-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfiguration.md +++ b/src/Identity.DirectoryManagement/beta/examples/New-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfiguration.md @@ -0,0 +1,22 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement + +$params = @{ + displayName = "Tenant Trusted Certificate Chain of Trust for Application Configuration" + description = "The Trusted Certificate Chain of Trust containing a certificate chain used by the Tenant app policy, to only allow application certificates from this issuer." + "trustedCertificateAuthorities " = @( + @{ + isRootAuthority = $true + certificate = "MIIHMDCCBRigAwIBAgITWgAAmdzMYKZPslw+twABAACZ" + } + ) +} + +New-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfiguration -BodyParameter $params + +``` +This example shows how to use the New-MgBetaDirectoryCertificateAuthorityCertificateBasedApplicationConfiguration Cmdlet. + diff --git a/src/Identity.DirectoryManagement/beta/examples/New-MgBetaOrganizationBrandingTheme.md b/src/Identity.DirectoryManagement/beta/examples/New-MgBetaOrganizationBrandingTheme.md index e69de29bb2..f60fd71273 100644 --- a/src/Identity.DirectoryManagement/beta/examples/New-MgBetaOrganizationBrandingTheme.md +++ b/src/Identity.DirectoryManagement/beta/examples/New-MgBetaOrganizationBrandingTheme.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement + +$params = @{ + "@odata.type" = "#microsoft.graph.organizationalBrandingTheme" + name = "ContosoTheme" + isDefaultTheme = $true +} + +New-MgBetaOrganizationBrandingTheme -OrganizationId $organizationId -BodyParameter $params + +``` +This example shows how to use the New-MgBetaOrganizationBrandingTheme Cmdlet. + diff --git a/src/Identity.DirectoryManagement/beta/examples/New-MgBetaOrganizationBrandingThemeLocalization.md b/src/Identity.DirectoryManagement/beta/examples/New-MgBetaOrganizationBrandingThemeLocalization.md index e69de29bb2..8f50262bc7 100644 --- a/src/Identity.DirectoryManagement/beta/examples/New-MgBetaOrganizationBrandingThemeLocalization.md +++ b/src/Identity.DirectoryManagement/beta/examples/New-MgBetaOrganizationBrandingThemeLocalization.md @@ -0,0 +1,20 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement + +$params = @{ + "@odata.type" = "#microsoft.graph.organizationalBrandingThemeLocalization" + locale = "fr-FR" + headerBackgroundColor = "#3377ffff" + pageBackgroundColor = "#FFFF33" + signInPageText = "Welcome to Contoso" + usernameHintText = "ContosoUsername " +} + +New-MgBetaOrganizationBrandingThemeLocalization -OrganizationId $organizationId -OrganizationalBrandingThemeId $organizationalBrandingThemeId -BodyParameter $params + +``` +This example shows how to use the New-MgBetaOrganizationBrandingThemeLocalization Cmdlet. + diff --git a/src/Identity.DirectoryManagement/beta/examples/Remove-MgBetaOrganizationBrandingTheme.md b/src/Identity.DirectoryManagement/beta/examples/Remove-MgBetaOrganizationBrandingTheme.md index e69de29bb2..2815c28b8b 100644 --- a/src/Identity.DirectoryManagement/beta/examples/Remove-MgBetaOrganizationBrandingTheme.md +++ b/src/Identity.DirectoryManagement/beta/examples/Remove-MgBetaOrganizationBrandingTheme.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement + +Remove-MgBetaOrganizationBrandingTheme -OrganizationId $organizationId -OrganizationalBrandingThemeId $organizationalBrandingThemeId + +``` +This example shows how to use the Remove-MgBetaOrganizationBrandingTheme Cmdlet. + diff --git a/src/Identity.DirectoryManagement/beta/examples/Update-MgBetaOrganizationBrandingTheme.md b/src/Identity.DirectoryManagement/beta/examples/Update-MgBetaOrganizationBrandingTheme.md index e69de29bb2..166b22873d 100644 --- a/src/Identity.DirectoryManagement/beta/examples/Update-MgBetaOrganizationBrandingTheme.md +++ b/src/Identity.DirectoryManagement/beta/examples/Update-MgBetaOrganizationBrandingTheme.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement + +$params = @{ + "@odata.type" = "#microsoft.graph.organizationalBrandingTheme" + name = "ContosoTheme" + isDefaultTheme = $true +} + +Update-MgBetaOrganizationBrandingTheme -OrganizationId $organizationId -OrganizationalBrandingThemeId $organizationalBrandingThemeId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaOrganizationBrandingTheme Cmdlet. + diff --git a/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryOnPremiseSynchronization.md b/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryOnPremiseSynchronization.md index e69de29bb2..3b2de5167f 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryOnPremiseSynchronization.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryOnPremiseSynchronization.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.DirectoryManagement + +Get-MgDirectoryOnPremiseSynchronization -OnPremisesDirectorySynchronizationId $onPremisesDirectorySynchronizationId + +``` +This example shows how to use the Get-MgDirectoryOnPremiseSynchronization Cmdlet. + diff --git a/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md b/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md index e69de29bb2..44ad9b08ee 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.DirectoryManagement + +Get-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration + +``` +This example shows how to use the Get-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration Cmdlet. + diff --git a/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md b/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md index e69de29bb2..b42311a08f 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/Get-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.DirectoryManagement + +Get-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority -CertificateBasedAuthPkiId $certificateBasedAuthPkiId + +``` +This example shows how to use the Get-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority Cmdlet. + diff --git a/src/Identity.DirectoryManagement/v1.0/examples/Invoke-MgUploadDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md b/src/Identity.DirectoryManagement/v1.0/examples/Invoke-MgUploadDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md index e69de29bb2..dd64a51b9b 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/Invoke-MgUploadDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/Invoke-MgUploadDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.DirectoryManagement + +$params = @{ + uploadUrl = "https://microsoft.sharepoint.com/CBA/demo/CBARootPKI.p7b" + sha256FileHash = "D7F9....61E6F" +} + +Invoke-MgUploadDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration -CertificateBasedAuthPkiId $certificateBasedAuthPkiId -BodyParameter $params + +``` +This example shows how to use the Invoke-MgUploadDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration Cmdlet. + diff --git a/src/Identity.DirectoryManagement/v1.0/examples/New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md b/src/Identity.DirectoryManagement/v1.0/examples/New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md index e69de29bb2..338d30de83 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md @@ -0,0 +1,15 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.DirectoryManagement + +$params = @{ + displayName = "Contoso PKI" +} + +New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration -BodyParameter $params + +``` +This example shows how to use the New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration Cmdlet. + diff --git a/src/Identity.DirectoryManagement/v1.0/examples/New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md b/src/Identity.DirectoryManagement/v1.0/examples/New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md index e69de29bb2..6ac8282142 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md @@ -0,0 +1,15 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.DirectoryManagement + +$params = @{ + certificateAuthorityType = "intermediate" +} + +New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority -CertificateBasedAuthPkiId $certificateBasedAuthPkiId -BodyParameter $params + +``` +This example shows how to use the New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority Cmdlet. + diff --git a/src/Identity.DirectoryManagement/v1.0/examples/Remove-MgDirectoryFederationConfiguration.md b/src/Identity.DirectoryManagement/v1.0/examples/Remove-MgDirectoryFederationConfiguration.md index bd6239a4c8..53244090f9 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/Remove-MgDirectoryFederationConfiguration.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/Remove-MgDirectoryFederationConfiguration.md @@ -1,11 +1,11 @@ ### Example 1: Code snippet ```powershell + Import-Module Microsoft.Graph.Identity.DirectoryManagement Remove-MgDirectoryFederationConfiguration -IdentityProviderBaseId $identityProviderBaseId + ``` This example shows how to use the Remove-MgDirectoryFederationConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). - diff --git a/src/Identity.DirectoryManagement/v1.0/examples/Remove-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md b/src/Identity.DirectoryManagement/v1.0/examples/Remove-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md index e69de29bb2..5e56f09e9a 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/Remove-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/Remove-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.DirectoryManagement + +Remove-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration -CertificateBasedAuthPkiId $certificateBasedAuthPkiId + +``` +This example shows how to use the Remove-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration Cmdlet. + diff --git a/src/Identity.DirectoryManagement/v1.0/examples/Remove-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md b/src/Identity.DirectoryManagement/v1.0/examples/Remove-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md index e69de29bb2..9f08b7a55e 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/Remove-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/Remove-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.DirectoryManagement + +Remove-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority -CertificateBasedAuthPkiId $certificateBasedAuthPkiId -CertificateAuthorityDetailId $certificateAuthorityDetailId + +``` +This example shows how to use the Remove-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority Cmdlet. + diff --git a/src/Identity.DirectoryManagement/v1.0/examples/Update-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md b/src/Identity.DirectoryManagement/v1.0/examples/Update-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md index e69de29bb2..a14598bca8 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/Update-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/Update-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration.md @@ -0,0 +1,15 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.DirectoryManagement + +$params = @{ + displayName = "Contoso PKI" +} + +Update-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration -CertificateBasedAuthPkiId $certificateBasedAuthPkiId -BodyParameter $params + +``` +This example shows how to use the Update-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration Cmdlet. + diff --git a/src/Identity.DirectoryManagement/v1.0/examples/Update-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md b/src/Identity.DirectoryManagement/v1.0/examples/Update-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md index e69de29bb2..12144e2a26 100644 --- a/src/Identity.DirectoryManagement/v1.0/examples/Update-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md +++ b/src/Identity.DirectoryManagement/v1.0/examples/Update-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority.md @@ -0,0 +1,15 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.DirectoryManagement + +$params = @{ + isIssuerHintEnabled = $true +} + +Update-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority -CertificateBasedAuthPkiId $certificateBasedAuthPkiId -CertificateAuthorityDetailId $certificateAuthorityDetailId -BodyParameter $params + +``` +This example shows how to use the Update-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority Cmdlet. + diff --git a/src/Identity.Governance/beta/examples/Initialize-MgBetaIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowWithScope.md b/src/Identity.Governance/beta/examples/Initialize-MgBetaIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowWithScope.md index e69de29bb2..8b13789179 100644 --- a/src/Identity.Governance/beta/examples/Initialize-MgBetaIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowWithScope.md +++ b/src/Identity.Governance/beta/examples/Initialize-MgBetaIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowWithScope.md @@ -0,0 +1 @@ + diff --git a/src/Identity.Governance/beta/examples/Initialize-MgBetaIdentityGovernanceLifecycleWorkflowWithScope.md b/src/Identity.Governance/beta/examples/Initialize-MgBetaIdentityGovernanceLifecycleWorkflowWithScope.md index e69de29bb2..d24878533a 100644 --- a/src/Identity.Governance/beta/examples/Initialize-MgBetaIdentityGovernanceLifecycleWorkflowWithScope.md +++ b/src/Identity.Governance/beta/examples/Initialize-MgBetaIdentityGovernanceLifecycleWorkflowWithScope.md @@ -0,0 +1,70 @@ +### Example 1: Activate a workflow with a specific scope of 2 users + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.Governance + +$params = @{ + subjects = @( + @{ + id = "8cdf25a8-c9d2-423e-a03d-3f39f03c3e97" + } + @{ + id = "ea09ac2e-77e3-4134-85f2-25ccf3c33387" + } + ) +} + +Initialize-MgBetaIdentityGovernanceLifecycleWorkflowWithScope -WorkflowId $workflowId -BodyParameter $params + +``` +This example will activate a workflow with a specific scope of 2 users + +### Example 2: Activate a workflow with a specific scope of 2 users who don't exist + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.Governance + +$params = @{ + scope = @{ + "@odata.type" = "microsoft.graph.identityGovernance.activateProcessingResultScope" + processingResults = @( + @{ + id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa" + } + @{ + id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb" + } + ) + taskScope = "allTasks" + } +} + +Initialize-MgBetaIdentityGovernanceLifecycleWorkflowWithScope -WorkflowId $workflowId -BodyParameter $params + +``` +This example will activate a workflow with a specific scope of 2 users who don't exist + +### Example 3: Activate a workflow with a specific processing result scope + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.Governance + +$params = @{ + subjects = @( + @{ + id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa" + } + @{ + id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb" + } + ) +} + +Initialize-MgBetaIdentityGovernanceLifecycleWorkflowWithScope -WorkflowId $workflowId -BodyParameter $params + +``` +This example will activate a workflow with a specific processing result scope + diff --git a/src/Identity.Governance/beta/examples/Invoke-MgBetaFilterEntitlementManagementAccessPackageSuggestionByCurrentUser.md b/src/Identity.Governance/beta/examples/Invoke-MgBetaFilterEntitlementManagementAccessPackageSuggestionByCurrentUser.md index e69de29bb2..07ab3e3621 100644 --- a/src/Identity.Governance/beta/examples/Invoke-MgBetaFilterEntitlementManagementAccessPackageSuggestionByCurrentUser.md +++ b/src/Identity.Governance/beta/examples/Invoke-MgBetaFilterEntitlementManagementAccessPackageSuggestionByCurrentUser.md @@ -0,0 +1,22 @@ +### Example 1: Get all access package suggestions with default insight types + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.Governance + +Invoke-MgBetaFilterEntitlementManagementAccessPackageSuggestionByCurrentUser -ExpandProperty "availableAccessPackage" -On $onId + +``` +This example will get all access package suggestions with default insight types + +### Example 2: Get access package suggestions based on assignment history + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.Governance + +Invoke-MgBetaFilterEntitlementManagementAccessPackageSuggestionByCurrentUser -ExpandProperty "availableAccessPackage" -On $onId + +``` +This example will get access package suggestions based on assignment history + diff --git a/src/Identity.Governance/beta/examples/Resume-MgBetaEntitlementManagementAccessPackageAssignmentRequest.md b/src/Identity.Governance/beta/examples/Resume-MgBetaEntitlementManagementAccessPackageAssignmentRequest.md index d8ab7d2c88..ff420c3d2e 100644 --- a/src/Identity.Governance/beta/examples/Resume-MgBetaEntitlementManagementAccessPackageAssignmentRequest.md +++ b/src/Identity.Governance/beta/examples/Resume-MgBetaEntitlementManagementAccessPackageAssignmentRequest.md @@ -42,3 +42,46 @@ Resume-MgBetaEntitlementManagementAccessPackageAssignmentRequest -AccessPackageA ``` This example shows how to use the Resume-MgBetaEntitlementManagementAccessPackageAssignmentRequest Cmdlet. +### Example 3: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.Governance + +$params = @{ + source = "Contoso.CustoEXT" + type = "microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestCreated" + data = @{ + "@odata.type" = "microsoft.graph.microsoft.graph.assignmentRequestApprovalStageCallbackData" + approvalStage = @{ + durationBeforeAutomaticDenial = "P2D" + escalationApprovers = @( + ) + fallbackEscalationApprovers = @( + ) + fallbackPrimaryApprovers = @( + ) + isApproverJustificationRequired = $false + isEscalationEnabled = $false + primaryApprovers = @( + @{ + "@@odata.type" = "#microsoft.graph.singleUser" + description = "Primary approver of access package assignment." + id = "" + isBackup = $false + } + ) + } + customExtensionStageInstanceDetail = "A approval stage from Logic Apps" + customExtensionStageInstanceId = "@{triggerBody()?['CustomExtensionStageInstanceId']}" + stage = "assignmentRequestDeterminingApprovalRequirements" + } + source = "LogicApps" + type = "microsoft.graph.accessPackageCustomExtensionStage.assignmentRequestCreated" +} + +Resume-MgBetaEntitlementManagementAccessPackageAssignmentRequest -AccessPackageAssignmentRequestId $accessPackageAssignmentRequestId -BodyParameter $params + +``` +This example shows how to use the Resume-MgBetaEntitlementManagementAccessPackageAssignmentRequest Cmdlet. + diff --git a/src/Identity.Governance/v1.0/examples/Initialize-MgIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowWithScope.md b/src/Identity.Governance/v1.0/examples/Initialize-MgIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowWithScope.md index e69de29bb2..8b13789179 100644 --- a/src/Identity.Governance/v1.0/examples/Initialize-MgIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowWithScope.md +++ b/src/Identity.Governance/v1.0/examples/Initialize-MgIdentityGovernanceLifecycleWorkflowDeletedItemWorkflowWithScope.md @@ -0,0 +1 @@ + diff --git a/src/Identity.Governance/v1.0/examples/Initialize-MgIdentityGovernanceLifecycleWorkflowWithScope.md b/src/Identity.Governance/v1.0/examples/Initialize-MgIdentityGovernanceLifecycleWorkflowWithScope.md index e69de29bb2..c7835145f1 100644 --- a/src/Identity.Governance/v1.0/examples/Initialize-MgIdentityGovernanceLifecycleWorkflowWithScope.md +++ b/src/Identity.Governance/v1.0/examples/Initialize-MgIdentityGovernanceLifecycleWorkflowWithScope.md @@ -0,0 +1,70 @@ +### Example 1: Activate a workflow with a specific scope of 2 users + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +$params = @{ + subjects = @( + @{ + id = "8cdf25a8-c9d2-423e-a03d-3f39f03c3e97" + } + @{ + id = "ea09ac2e-77e3-4134-85f2-25ccf3c33387" + } + ) +} + +Initialize-MgIdentityGovernanceLifecycleWorkflowWithScope -WorkflowId $workflowId -BodyParameter $params + +``` +This example will activate a workflow with a specific scope of 2 users + +### Example 2: Activate a workflow with a specific scope of 2 users who don't exist + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +$params = @{ + subjects = @( + @{ + id = "2ea4c363-4b85-4529-b2ec-53b64308f39f" + } + @{ + id = "44fc5392-9485-4348-871e-2ea17cc0a1b8" + } + ) +} + +Initialize-MgIdentityGovernanceLifecycleWorkflowWithScope -WorkflowId $workflowId -BodyParameter $params + +``` +This example will activate a workflow with a specific scope of 2 users who don't exist + +### Example 3: Activate a workflow with a specific processing result scope + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +$params = @{ + scope = @{ + "@odata.type" = "microsoft.graph.identityGovernance.activateProcessingResultScope" + processingResults = @( + @{ + id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_638927021459371237_0cdd8963-aaaa-4632-a1f2-aaaa7230aaaa" + } + @{ + id = "abc12345-265a-4e8f-8d61-94a2dcd2d395_1_78799042-265a-4e8f-8d61-94a2dcd2d395_388131231459357126_aaaa8963-1c30-4632-aaaa-ac96723069cb" + } + ) + taskScope = "allTasks" + } +} + +Initialize-MgIdentityGovernanceLifecycleWorkflowWithScope -WorkflowId $workflowId -BodyParameter $params + +``` +This example will activate a workflow with a specific processing result scope + diff --git a/src/Identity.Governance/v1.0/examples/New-MgEntitlementManagementAssignmentPolicy.md b/src/Identity.Governance/v1.0/examples/New-MgEntitlementManagementAssignmentPolicy.md index dcadb8cc11..744258ade7 100644 --- a/src/Identity.Governance/v1.0/examples/New-MgEntitlementManagementAssignmentPolicy.md +++ b/src/Identity.Governance/v1.0/examples/New-MgEntitlementManagementAssignmentPolicy.md @@ -1,4 +1,4 @@ -### Example 1: Code snippet +### Example 1: Create a direct assignment policy ```powershell @@ -40,9 +40,9 @@ $params = @{ New-MgEntitlementManagementAssignmentPolicy -BodyParameter $params ``` -This example shows how to use the New-MgEntitlementManagementAssignmentPolicy Cmdlet. +This example will create a direct assignment policy -### Example 2: Code snippet +### Example 2: Create a policy for users from other organizations to request ```powershell @@ -165,9 +165,9 @@ $params = @{ New-MgEntitlementManagementAssignmentPolicy -BodyParameter $params ``` -This example shows how to use the New-MgEntitlementManagementAssignmentPolicy Cmdlet. +This example will create a policy for users from other organizations to request -### Example 3: Code snippet +### Example 3: Create a policy that automatically creates assignments based on a membership rule ```powershell @@ -197,9 +197,9 @@ $params = @{ New-MgEntitlementManagementAssignmentPolicy -BodyParameter $params ``` -This example shows how to use the New-MgEntitlementManagementAssignmentPolicy Cmdlet. +This example will create a policy that automatically creates assignments based on a membership rule -### Example 4: Code snippet +### Example 4: Create a policy where requestors are asked to answer questions while requesting access to provide additional information to approvers ```powershell @@ -300,9 +300,9 @@ $params = @{ New-MgEntitlementManagementAssignmentPolicy -BodyParameter $params ``` -This example shows how to use the New-MgEntitlementManagementAssignmentPolicy Cmdlet. +This example will create a policy where requestors are asked to answer questions while requesting access to provide additional information to approvers -### Example 5: Code snippet +### Example 5: Create a policy and specify the stages to trigger predefined access package custom extensions ```powershell @@ -353,5 +353,66 @@ $params = @{ New-MgEntitlementManagementAssignmentPolicy -BodyParameter $params ``` -This example shows how to use the New-MgEntitlementManagementAssignmentPolicy Cmdlet. +This example will create a policy and specify the stages to trigger predefined access package custom extensions + +### Example 6: Create a policy used to determine approvers dynamically from a Logic App + +```powershell + +Import-Module Microsoft.Graph.Identity.Governance + +$params = @{ + "@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/entitlementManagement/accessPackageAssignmentPolicies/$entity" + displayName = "Dynamic approver policy" + description = "Dynamic approver policy" + canExtend = $false + durationInDays = + expirationDateTime = $null + accessPackageId = "fc29cdca-57f6-47e3-b20c-3fa18e4826ac" + accessReviewSettings = $null + questions = @( + ) + accessPackageNotificationSettings = @{ + isAssignmentNotificationDisabled = $false + } + verifiableCredentialSettings = @{ + credentialTypes = @( + ) + } + requestorSettings = @{ + scopeType = "AllExistingDirectorySubjects" + acceptRequests = $true + allowedRequestors = @( + ) + } + requestApprovalSettings = @{ + isApprovalRequired = $true + isApprovalRequiredForExtension = $false + isRequestorJustificationRequired = $true + approvalMode = "SingleStage" + approvalStages = @( + @{ + "@odata.type" = "#microsoft.graph.accessPackageDynamicApprovalStage" + customExtension = @{ + "@odata.type" = "#microsoft.graph.accessPackageAssignmentRequestWorkflowExtension" + id = "52036a43-10b5-444d-a1a2-d4f240420239" + } + } + ) + } + customExtensionStageSettings = @( + @{ + stage = "assignmentRequestDeterminingApprovalRequirements" + customExtension = @{ + "@odata.type" = "#microsoft.graph.accessPackageAssignmentRequestWorkflowExtension" + id = "52036a43-10b5-444d-a1a2-d4f240420239" + } + } + ) +} + +New-MgEntitlementManagementAssignmentPolicy -BodyParameter $params + +``` +This example will create a policy used to determine approvers dynamically from a logic app diff --git a/src/Identity.SignIns/beta/examples/Invoke-MgBetaDismissRiskyAgent.md b/src/Identity.SignIns/beta/examples/Invoke-MgBetaDismissRiskyAgent.md index e69de29bb2..0f0900d126 100644 --- a/src/Identity.SignIns/beta/examples/Invoke-MgBetaDismissRiskyAgent.md +++ b/src/Identity.SignIns/beta/examples/Invoke-MgBetaDismissRiskyAgent.md @@ -0,0 +1,18 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + agentIds = @( + "29f270bb-4d23-4f68-8a57-dc73dc0d4caf" +"20f91ec9-d140-4d90-9cd9-f618587a1471" +) +} + +Invoke-MgBetaDismissRiskyAgent -BodyParameter $params + +``` +This example shows how to use the Invoke-MgBetaDismissRiskyAgent Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityB2CUserFlow.md b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityB2CUserFlow.md index 9c66b4721b..1acd0fd5d6 100644 --- a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityB2CUserFlow.md +++ b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityB2CUserFlow.md @@ -1,49 +1,64 @@ -### Example 1: Using the New-MgBetaIdentityB2CUserFlow Cmdlet +### Example 1: Create a user flow with the default values + ```powershell + Import-Module Microsoft.Graph.Beta.Identity.SignIns + $params = @{ - Id = "UserFlowWithAPIConnector" - UserFlowType = "signUpOrSignIn" - UserFlowTypeVersion = 1 - ApiConnectorConfiguration = @{ - PostFederationSignup = @{ - "@odata.id" = "{apiConnectorId}" - } - PostAttributeCollection = @{ - "@odata.id" = "{apiConnectorId}" - } - } + id = "Customer" + userFlowType = "signUpOrSignIn" + userFlowTypeVersion = 3 } + New-MgBetaIdentityB2CUserFlow -BodyParameter $params + ``` -This example shows how to use the New-MgBetaIdentityB2CUserFlow Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). -### Example 2: Using the New-MgBetaIdentityB2CUserFlow Cmdlet +This example will create a user flow with the default values + +### Example 2: Create a user flow with the default values and an identity provider + ```powershell + Import-Module Microsoft.Graph.Beta.Identity.SignIns + $params = @{ - Id = "Customer" - UserFlowType = "signUpOrSignIn" - UserFlowTypeVersion = 3 - IdentityProviders = @( + id = "Customer" + userFlowType = "signUpOrSignIn" + userFlowTypeVersion = 3 + identityProviders = @( @{ - Id = "Facebook-OAuth" + id = "Facebook-OAuth" } ) } + New-MgBetaIdentityB2CUserFlow -BodyParameter $params + ``` -This example shows how to use the New-MgBetaIdentityB2CUserFlow Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). -### Example 3: Using the New-MgBetaIdentityB2CUserFlow Cmdlet +This example will create a user flow with the default values and an identity provider + +### Example 3: Create a user flow with the default values and configuration for API connectors + ```powershell + Import-Module Microsoft.Graph.Beta.Identity.SignIns + $params = @{ - Id = "Customer" - UserFlowType = "signUpOrSignIn" - UserFlowTypeVersion = 3 + id = "UserFlowWithAPIConnector" + userFlowType = "signUpOrSignIn" + userFlowTypeVersion = 1 + apiConnectorConfiguration = @{ + postFederationSignup = @{ + "@odata.id" = '{apiConnectorId}' + } + postAttributeCollection = @{ + "@odata.id" = '{apiConnectorId}' + } + } } + New-MgBetaIdentityB2CUserFlow -BodyParameter $params + ``` -This example shows how to use the New-MgBetaIdentityB2CUserFlow Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). +This example will create a user flow with the default values and configuration for api connectors + diff --git a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityB2XUserFlow.md b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityB2XUserFlow.md index f6c6949389..881d9c6aa4 100644 --- a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityB2XUserFlow.md +++ b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityB2XUserFlow.md @@ -1,17 +1,66 @@ -### Example 1: {{ Add title here }} +### Example 1: Create a user flow with the default values + ```powershell - PS C:\> {{ Add code here }} -{{ Add output here }} +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + id = "Partner" + userFlowType = "signUpOrSignIn" + userFlowTypeVersion = 1 +} + +New-MgBetaIdentityB2XUserFlow -BodyParameter $params + ``` +This example will create a user flow with the default values -{{ Add description here }} +### Example 2: Create a user flow with the default values and an identity provider -### Example 2: {{ Add title here }} ```powershell - PS C:\> {{ Add code here }} -{{ Add output here }} +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + id = "Partner" + userFlowType = "signUpOrSignIn" + userFlowTypeVersion = 1 + identityProviders = @( + @{ + id = "Facebook-OAuth" + type = "Facebook" + name = "Facebook" + } + ) +} + +New-MgBetaIdentityB2XUserFlow -BodyParameter $params + +``` +This example will create a user flow with the default values and an identity provider + +### Example 3: Create a user flow with the default values and configuration for API connectors + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + id = "UserFlowWithAPIConnector" + userFlowType = "signUpOrSignIn" + userFlowTypeVersion = 1 + apiConnectorConfiguration = @{ + postFederationSignup = @{ + "@odata.id" = '{apiConnectorId}' + } + postAttributeCollection = @{ + "@odata.id" = '{apiConnectorId}' + } + } +} + +New-MgBetaIdentityB2XUserFlow -BodyParameter $params + ``` +This example will create a user flow with the default values and configuration for api connectors -{{ Add description here }} diff --git a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityRiskPreventionFraudProtectionProvider.md b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityRiskPreventionFraudProtectionProvider.md index e69de29bb2..54c6aaed8e 100644 --- a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityRiskPreventionFraudProtectionProvider.md +++ b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityRiskPreventionFraudProtectionProvider.md @@ -0,0 +1,38 @@ +### Example 1: Create a new arkoseFraudProtectionProvider object + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.arkoseFraudProtectionProvider" + displayName = "Arkose Sign-Up Protection" + publicKey = "A1EE42E0-C88B-47FE-A176-5E9FB8F116FB" + privateKey = "19BBE628-7DEF-4E28-AB25-BF129C760B7E" + clientSubDomain = "client-api" + verifySubDomain = "verify-api" +} + +New-MgBetaIdentityRiskPreventionFraudProtectionProvider -BodyParameter $params + +``` +This example will create a new arkosefraudprotectionprovider object + +### Example 2: Create a new humanSecurityFraudProtectionProvider object + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.humanSecurityFraudProtectionProvider" + displayName = "HUMAN Security Sign-Up Protection" + appId = "XXyy1XXXy" + serverToken = "xxYYxxXXX1" +} + +New-MgBetaIdentityRiskPreventionFraudProtectionProvider -BodyParameter $params + +``` +This example will create a new humansecurityfraudprotectionprovider object + diff --git a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md index e69de29bb2..a7e0346136 100644 --- a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md +++ b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md @@ -0,0 +1,38 @@ +### Example 1: Create a new AkamaiWebApplicationFirewallProvider object + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.akamaiWebApplicationFirewallProvider" + displayName = "Akamai Provider Example" + hostPrefix = "akab-exampleprefix" + clientSecret = "akamai_example_secret_123" + clientToken = "akamai_example_token_456" + accessToken = "akamai_example_token_789" +} + +New-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider -BodyParameter $params + +``` +This example will create a new akamaiwebapplicationfirewallprovider object + +### Example 2: Create a new cloudFlareWebApplicationFirewallProvider object + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.cloudFlareWebApplicationFirewallProvider" + displayName = "Cloudflare Provider Example" + zoneId = "11111111111111111111111111111111" + apiToken = "cf_example_token_123" +} + +New-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider -BodyParameter $params + +``` +This example will create a new cloudflarewebapplicationfirewallprovider object + diff --git a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityUserFlow.md b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityUserFlow.md index 68759499d1..98907edf15 100644 --- a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityUserFlow.md +++ b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityUserFlow.md @@ -1,12 +1,17 @@ -### Example 1: Using the New-MgBetaIdentityUserFlow Cmdlet +### Example 1: Code snippet + ```powershell + Import-Module Microsoft.Graph.Beta.Identity.SignIns + $params = @{ - Id = "Pol1" - UserFlowType = "signUpOrSignIn" - UserFlowTypeVersion = 1 + id = "Pol1" + userFlowType = "signUpOrSignIn" + userFlowTypeVersion = 1 } + New-MgBetaIdentityUserFlow -BodyParameter $params + ``` This example shows how to use the New-MgBetaIdentityUserFlow Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). + diff --git a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityVerifiedIdProfile.md b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityVerifiedIdProfile.md index e69de29bb2..c8b0b45c70 100644 --- a/src/Identity.SignIns/beta/examples/New-MgBetaIdentityVerifiedIdProfile.md +++ b/src/Identity.SignIns/beta/examples/New-MgBetaIdentityVerifiedIdProfile.md @@ -0,0 +1,45 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + name = "Contoso Verified ID" + description = "Contoso Verified Identity" + lastModifiedDateTime = $null + state = "enabled" + verifierDid = "did:web:eu.did-dev.contoso.io" + priority = 0 + verifiedIdProfileConfiguration = @{ + type = "verifiedIdentity" + acceptedIssuer = "did:web:eu.did-dev.contoso.io" + claimBindingSource = "directory" + claimBindings = @( + @{ + sourceAttribute = "First name" + verifiedIdClaim = "vc.credentialSubject.firstName" + } + @{ + sourceAttribute = "Last name" + verifiedIdClaim = "vc.credentialSubject.lastName" + } + ) + } + faceCheckConfiguration = @{ + isEnabled = $true + sourcePhotoClaimName = "portrait" + } + verifiedIdUsageConfigurations = @( + @{ + isEnabledForTestOnly = $true + purpose = "recovery" + } + ) +} + +New-MgBetaIdentityVerifiedIdProfile -BodyParameter $params + +``` +This example shows how to use the New-MgBetaIdentityVerifiedIdProfile Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/New-MgBetaPolicyOnPremAuthenticationPolicy.md b/src/Identity.SignIns/beta/examples/New-MgBetaPolicyOnPremAuthenticationPolicy.md index e69de29bb2..eda8241667 100644 --- a/src/Identity.SignIns/beta/examples/New-MgBetaPolicyOnPremAuthenticationPolicy.md +++ b/src/Identity.SignIns/beta/examples/New-MgBetaPolicyOnPremAuthenticationPolicy.md @@ -0,0 +1,20 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + description = "Policy definition to manage and control authentication settings." + displayName = "Policy name" + definition = @( + '{"Version":1,"LastUpdatedTimestamp":"2025-02-29T22:47:12.7764932Z", "Key1": "Value1", "Key2": {"SubKey1": "SubValue1"}}' +) +isOrganizationDefault = $true +} + +New-MgBetaPolicyOnPremAuthenticationPolicy -BodyParameter $params + +``` +This example shows how to use the New-MgBetaPolicyOnPremAuthenticationPolicy Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityConditionalAccessDeletedItemNamedLocation.md b/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityConditionalAccessDeletedItemNamedLocation.md index e69de29bb2..ab247d45ac 100644 --- a/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityConditionalAccessDeletedItemNamedLocation.md +++ b/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityConditionalAccessDeletedItemNamedLocation.md @@ -0,0 +1,11 @@ +### Example 1: Permanently delete a deleted namedLocation object + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Remove-MgBetaIdentityConditionalAccessDeletedItemNamedLocation -NamedLocationId $namedLocationId + +``` +This example will permanently delete a deleted namedlocation object + diff --git a/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityConditionalAccessDeletedItemPolicy.md b/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityConditionalAccessDeletedItemPolicy.md index e69de29bb2..ef4253a23e 100644 --- a/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityConditionalAccessDeletedItemPolicy.md +++ b/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityConditionalAccessDeletedItemPolicy.md @@ -0,0 +1,11 @@ +### Example 1: Permanently delete a deleted conditionalAccessPolicy object + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Remove-MgBetaIdentityConditionalAccessDeletedItemPolicy -ConditionalAccessPolicyId $conditionalAccessPolicyId + +``` +This example will permanently delete a deleted conditionalaccesspolicy object + diff --git a/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md b/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md index e69de29bb2..55dda65922 100644 --- a/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md +++ b/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Remove-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider -WebApplicationFirewallProviderId $webApplicationFirewallProviderId + +``` +This example shows how to use the Remove-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityRiskPreventionWebApplicationFirewallVerification.md b/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityRiskPreventionWebApplicationFirewallVerification.md index e69de29bb2..73b2d92fed 100644 --- a/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityRiskPreventionWebApplicationFirewallVerification.md +++ b/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityRiskPreventionWebApplicationFirewallVerification.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Remove-MgBetaIdentityRiskPreventionWebApplicationFirewallVerification -WebApplicationFirewallVerificationModelId $webApplicationFirewallVerificationModelId + +``` +This example shows how to use the Remove-MgBetaIdentityRiskPreventionWebApplicationFirewallVerification Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityVerifiedIdProfile.md b/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityVerifiedIdProfile.md index e69de29bb2..f321b1678a 100644 --- a/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityVerifiedIdProfile.md +++ b/src/Identity.SignIns/beta/examples/Remove-MgBetaIdentityVerifiedIdProfile.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Remove-MgBetaIdentityVerifiedIdProfile -VerifiedIdProfileId $verifiedIdProfileId + +``` +This example shows how to use the Remove-MgBetaIdentityVerifiedIdProfile Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyB2BManagementPolicy.md b/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyB2BManagementPolicy.md index e69de29bb2..fba2e5643d 100644 --- a/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyB2BManagementPolicy.md +++ b/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyB2BManagementPolicy.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Remove-MgBetaPolicyB2BManagementPolicy -B2bManagementPolicyId $b2bManagementPolicyId + +``` +This example shows how to use the Remove-MgBetaPolicyB2BManagementPolicy Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyDeletedItemCrossTenantPartner.md b/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyDeletedItemCrossTenantPartner.md index e69de29bb2..14b66f2d03 100644 --- a/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyDeletedItemCrossTenantPartner.md +++ b/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyDeletedItemCrossTenantPartner.md @@ -0,0 +1,11 @@ +### Example 1: Permanently delete a deleted crossTenantAccessPolicyConfigurationPartner object + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Remove-MgBetaPolicyDeletedItemCrossTenantPartner -CrossTenantAccessPolicyConfigurationPartnerTenantId $crossTenantAccessPolicyConfigurationPartnerTenantId + +``` +This example will permanently delete a deleted crosstenantaccesspolicyconfigurationpartner object + diff --git a/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyDeletedItemCrossTenantSyncPolicyPartner.md b/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyDeletedItemCrossTenantSyncPolicyPartner.md index e69de29bb2..7582c3bc75 100644 --- a/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyDeletedItemCrossTenantSyncPolicyPartner.md +++ b/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyDeletedItemCrossTenantSyncPolicyPartner.md @@ -0,0 +1,11 @@ +### Example 1: Permanently delete a deleted crossTenantIdentitySyncPolicyPartner object + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Remove-MgBetaPolicyDeletedItemCrossTenantSyncPolicyPartner -CrossTenantIdentitySyncPolicyPartnerTenantId $crossTenantIdentitySyncPolicyPartnerTenantId + +``` +This example will permanently delete a deleted crosstenantidentitysyncpolicypartner object + diff --git a/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyOnPremAuthenticationPolicy.md b/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyOnPremAuthenticationPolicy.md index e69de29bb2..6bd911436f 100644 --- a/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyOnPremAuthenticationPolicy.md +++ b/src/Identity.SignIns/beta/examples/Remove-MgBetaPolicyOnPremAuthenticationPolicy.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Remove-MgBetaPolicyOnPremAuthenticationPolicy -OnPremAuthenticationPolicyId $onPremAuthenticationPolicyId + +``` +This example shows how to use the Remove-MgBetaPolicyOnPremAuthenticationPolicy Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Restore-MgBetaIdentityConditionalAccessDeletedItemNamedLocation.md b/src/Identity.SignIns/beta/examples/Restore-MgBetaIdentityConditionalAccessDeletedItemNamedLocation.md index e69de29bb2..d745ec5c1a 100644 --- a/src/Identity.SignIns/beta/examples/Restore-MgBetaIdentityConditionalAccessDeletedItemNamedLocation.md +++ b/src/Identity.SignIns/beta/examples/Restore-MgBetaIdentityConditionalAccessDeletedItemNamedLocation.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Restore-MgBetaIdentityConditionalAccessDeletedItemNamedLocation -NamedLocationId $namedLocationId + +``` +This example shows how to use the Restore-MgBetaIdentityConditionalAccessDeletedItemNamedLocation Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Restore-MgBetaIdentityConditionalAccessDeletedItemPolicy.md b/src/Identity.SignIns/beta/examples/Restore-MgBetaIdentityConditionalAccessDeletedItemPolicy.md index e69de29bb2..802b033047 100644 --- a/src/Identity.SignIns/beta/examples/Restore-MgBetaIdentityConditionalAccessDeletedItemPolicy.md +++ b/src/Identity.SignIns/beta/examples/Restore-MgBetaIdentityConditionalAccessDeletedItemPolicy.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Restore-MgBetaIdentityConditionalAccessDeletedItemPolicy -ConditionalAccessPolicyId $conditionalAccessPolicyId + +``` +This example shows how to use the Restore-MgBetaIdentityConditionalAccessDeletedItemPolicy Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Restore-MgBetaPolicyDeletedItemCrossTenantPartner.md b/src/Identity.SignIns/beta/examples/Restore-MgBetaPolicyDeletedItemCrossTenantPartner.md index e69de29bb2..de19b9e5c2 100644 --- a/src/Identity.SignIns/beta/examples/Restore-MgBetaPolicyDeletedItemCrossTenantPartner.md +++ b/src/Identity.SignIns/beta/examples/Restore-MgBetaPolicyDeletedItemCrossTenantPartner.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Restore-MgBetaPolicyDeletedItemCrossTenantPartner -CrossTenantAccessPolicyConfigurationPartnerTenantId $crossTenantAccessPolicyConfigurationPartnerTenantId + +``` +This example shows how to use the Restore-MgBetaPolicyDeletedItemCrossTenantPartner Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Restore-MgBetaPolicyDeletedItemCrossTenantSyncPolicyPartner.md b/src/Identity.SignIns/beta/examples/Restore-MgBetaPolicyDeletedItemCrossTenantSyncPolicyPartner.md index e69de29bb2..5eaf680e0d 100644 --- a/src/Identity.SignIns/beta/examples/Restore-MgBetaPolicyDeletedItemCrossTenantSyncPolicyPartner.md +++ b/src/Identity.SignIns/beta/examples/Restore-MgBetaPolicyDeletedItemCrossTenantSyncPolicyPartner.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Restore-MgBetaPolicyDeletedItemCrossTenantSyncPolicyPartner -CrossTenantIdentitySyncPolicyPartnerTenantId $crossTenantIdentitySyncPolicyPartnerTenantId + +``` +This example shows how to use the Restore-MgBetaPolicyDeletedItemCrossTenantSyncPolicyPartner Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Set-MgBetaPolicyCrossTenantAccessPolicyPartnerIdentitySynchronization.md b/src/Identity.SignIns/beta/examples/Set-MgBetaPolicyCrossTenantAccessPolicyPartnerIdentitySynchronization.md index c525cc6c15..ca439d1bfd 100644 --- a/src/Identity.SignIns/beta/examples/Set-MgBetaPolicyCrossTenantAccessPolicyPartnerIdentitySynchronization.md +++ b/src/Identity.SignIns/beta/examples/Set-MgBetaPolicyCrossTenantAccessPolicyPartnerIdentitySynchronization.md @@ -6,6 +6,9 @@ Import-Module Microsoft.Graph.Beta.Identity.SignIns $params = @{ displayName = "Fabrikam" + groupSyncInbound = @{ + isSyncAllowed = $true + } userSyncInbound = @{ isSyncAllowed = $true } diff --git a/src/Identity.SignIns/beta/examples/Test-MgBetaIdentityConditionalAccess.md b/src/Identity.SignIns/beta/examples/Test-MgBetaIdentityConditionalAccess.md index e69de29bb2..2415fba51b 100644 --- a/src/Identity.SignIns/beta/examples/Test-MgBetaIdentityConditionalAccess.md +++ b/src/Identity.SignIns/beta/examples/Test-MgBetaIdentityConditionalAccess.md @@ -0,0 +1,147 @@ +### Example 1: Identify conditional access policies that would apply to a user accessing an application + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + signInIdentity = @{ + "@odata.type" = "#microsoft.graph.userSignIn" + userId = "15dc174b-f34c-4588-ac45-61d6e05dce93" + } + signInContext = @{ + "@odata.type" = "#microsoft.graph.applicationContext" + includeApplications = @( + "00000003-0000-0ff1-ce00-000000000000" + ) +} +signInConditions = @{ + devicePlatform = "android" + clientAppType = "browser" + signInRiskLevel = "high" + userRiskLevel = "high" + country = "US" + ipAddress = "40.77.182.32" + insiderRiskLevel = "elevated" + authenticationFlow = @{ + transferMethod = "deviceCodeFlow" + } + deviceInfo = @{ + isCompliant = $true + } +} +appliedPoliciesOnly = $true +} + +Test-MgBetaIdentityConditionalAccess -BodyParameter $params + +``` +This example will identify conditional access policies that would apply to a user accessing an application + +### Example 2: Identify conditional access policies that would apply to a user accessing a sensitive file protected by an authentication context + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + signInIdentity = @{ + "@odata.type" = "#microsoft.graph.userSignIn" + userId = "15dc174b-f34c-4588-ac45-61d6e05dce93" + } + signInContext = @{ + "@odata.type" = "#microsoft.graph.authContext" + authenticationContextValue = "c37" + } + signInConditions = @{ + devicePlatform = "windows" + clientAppType = "mobileAppsAndDesktopClients" + signInRiskLevel = "medium" + userRiskLevel = "none" + country = "US" + ipAddress = "40.77.182.32" + insiderRiskLevel = "moderate" + authenticationFlow = @{ + transferMethod = "authenticationTransfer" + } + deviceInfo = @{ + profileType = "Standard" + } + } + appliedPoliciesOnly = $true +} + +Test-MgBetaIdentityConditionalAccess -BodyParameter $params + +``` +This example will identify conditional access policies that would apply to a user accessing a sensitive file protected by an authentication context + +### Example 3: Identify conditional access policies that would apply to a user performing a user action + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + signInIdentity = @{ + "@odata.type" = "#microsoft.graph.userSignIn" + userId = "15dc174b-f34c-4588-ac45-61d6e05dce93" + } + signInContext = @{ + "@odata.type" = "#microsoft.graph.userActionContext" + userAction = "registerSecurityInformation" + } + signInConditions = @{ + devicePlatform = "macOS" + clientAppType = "browser" + signInRiskLevel = "low" + userRiskLevel = "high" + servicePrincipalRiskLevel = "none" + country = "CA" + ipAddress = "40.77.182.32" + insiderRiskLevel = "minor" + authenticationFlow = @{ + transferMethod = "deviceCodeFlow" + } + deviceInfo = @{ + trustType = "EntraID" + } + } + appliedPoliciesOnly = $true +} + +Test-MgBetaIdentityConditionalAccess -BodyParameter $params + +``` +This example will identify conditional access policies that would apply to a user performing a user action + +### Example 4: Identify conditional access policies that apply to a service principal + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + signInIdentity = @{ + "@odata.type" = "#microsoft.graph.servicePrincipalSignIn" + servicePrincipalId = "c65b94a5-0049-439a-a6fd-bce307077730" + } + signInContext = @{ + "@odata.type" = "#microsoft.graph.applicationContext" + includeApplications = @( + "00000003-0000-0ff1-ce00-000000000000" + ) +} +signInConditions = @{ + servicePrincipalRiskLevel = "high" + country = "CA" + ipAddress = "40.77.182.32" +} +appliedPoliciesOnly = $true +} + +Test-MgBetaIdentityConditionalAccess -BodyParameter $params + +``` +This example will identify conditional access policies that apply to a service principal + diff --git a/src/Identity.SignIns/beta/examples/Update-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md b/src/Identity.SignIns/beta/examples/Update-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md index e69de29bb2..40abc3d315 100644 --- a/src/Identity.SignIns/beta/examples/Update-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md +++ b/src/Identity.SignIns/beta/examples/Update-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.cloudFlareWebApplicationFirewallProvider" + displayName = "cloudFlare" +} + +Update-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider -WebApplicationFirewallProviderId $webApplicationFirewallProviderId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Update-MgBetaIdentityVerifiedIdProfile.md b/src/Identity.SignIns/beta/examples/Update-MgBetaIdentityVerifiedIdProfile.md index e69de29bb2..46b601b6a5 100644 --- a/src/Identity.SignIns/beta/examples/Update-MgBetaIdentityVerifiedIdProfile.md +++ b/src/Identity.SignIns/beta/examples/Update-MgBetaIdentityVerifiedIdProfile.md @@ -0,0 +1,20 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + verifiedIdUsageConfigurations = @( + @{ + isEnabledForTestOnly = $false + purpose = "recovery" + } + ) +} + +Update-MgBetaIdentityVerifiedIdProfile -VerifiedIdProfileId $verifiedIdProfileId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaIdentityVerifiedIdProfile Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Update-MgBetaPolicyB2BManagementPolicy.md b/src/Identity.SignIns/beta/examples/Update-MgBetaPolicyB2BManagementPolicy.md index e69de29bb2..71c2775ee3 100644 --- a/src/Identity.SignIns/beta/examples/Update-MgBetaPolicyB2BManagementPolicy.md +++ b/src/Identity.SignIns/beta/examples/Update-MgBetaPolicyB2BManagementPolicy.md @@ -0,0 +1,21 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.b2bManagementPolicy" + description = "Policy used for B2B features" + displayName = "Policy1" + definition = @( + '{'B2BManagementPolicy':{'Version':1}}' +) +isOrganizationDefault = "true" +} + +Update-MgBetaPolicyB2BManagementPolicy -B2bManagementPolicyId $b2bManagementPolicyId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaPolicyB2BManagementPolicy Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Update-MgBetaPolicyMobileDeviceManagementPolicy.md b/src/Identity.SignIns/beta/examples/Update-MgBetaPolicyMobileDeviceManagementPolicy.md index d2a2eaa333..c4634dfba0 100644 --- a/src/Identity.SignIns/beta/examples/Update-MgBetaPolicyMobileDeviceManagementPolicy.md +++ b/src/Identity.SignIns/beta/examples/Update-MgBetaPolicyMobileDeviceManagementPolicy.md @@ -5,7 +5,7 @@ Import-Module Microsoft.Graph.Beta.Identity.SignIns $params = @{ - "@odata.type" = "#microsoft.graph.mobilityManagementPolicy" + "@odata.type" = "#microsoft.graph.mobileDeviceManagementPolicy" complianceUrl = "https://portal.uem.contoso.com/?portalAction=Compliance" discoveryUrl = "https://enrollment.uem.contoso.com/enrollmentserver/discovery.svc" termsOfUseUrl = "https://portal.uem.contoso.com/TermsofUse.aspx" diff --git a/src/Identity.SignIns/beta/examples/Update-MgBetaPolicyOnPremAuthenticationPolicy.md b/src/Identity.SignIns/beta/examples/Update-MgBetaPolicyOnPremAuthenticationPolicy.md index e69de29bb2..dafc2f3725 100644 --- a/src/Identity.SignIns/beta/examples/Update-MgBetaPolicyOnPremAuthenticationPolicy.md +++ b/src/Identity.SignIns/beta/examples/Update-MgBetaPolicyOnPremAuthenticationPolicy.md @@ -0,0 +1,20 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + deletedDateTime = $null + description = "Updates to policy definition to manage and control authentication settings." + displayName = "Update policy name" + definition = @( + '{"Version":1,"LastUpdatedTimestamp":"2025-02-29T22:47:12.7764932Z", "Key1": "Value1", "Key2": {"SubKey1": "SubValue1"}}' +) +} + +Update-MgBetaPolicyOnPremAuthenticationPolicy -OnPremAuthenticationPolicyId $onPremAuthenticationPolicyId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaPolicyOnPremAuthenticationPolicy Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/Get-MgIdentityRiskPreventionFraudProtectionProvider.md b/src/Identity.SignIns/v1.0/examples/Get-MgIdentityRiskPreventionFraudProtectionProvider.md index e69de29bb2..dd76dc6c23 100644 --- a/src/Identity.SignIns/v1.0/examples/Get-MgIdentityRiskPreventionFraudProtectionProvider.md +++ b/src/Identity.SignIns/v1.0/examples/Get-MgIdentityRiskPreventionFraudProtectionProvider.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +Get-MgIdentityRiskPreventionFraudProtectionProvider + +``` +This example shows how to use the Get-MgIdentityRiskPreventionFraudProtectionProvider Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/Get-MgIdentityRiskPreventionWebApplicationFirewallProvider.md b/src/Identity.SignIns/v1.0/examples/Get-MgIdentityRiskPreventionWebApplicationFirewallProvider.md index e69de29bb2..fbbee77026 100644 --- a/src/Identity.SignIns/v1.0/examples/Get-MgIdentityRiskPreventionWebApplicationFirewallProvider.md +++ b/src/Identity.SignIns/v1.0/examples/Get-MgIdentityRiskPreventionWebApplicationFirewallProvider.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +Get-MgIdentityRiskPreventionWebApplicationFirewallProvider + +``` +This example shows how to use the Get-MgIdentityRiskPreventionWebApplicationFirewallProvider Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/Get-MgIdentityRiskPreventionWebApplicationFirewallVerification.md b/src/Identity.SignIns/v1.0/examples/Get-MgIdentityRiskPreventionWebApplicationFirewallVerification.md index e69de29bb2..63b4a60c3b 100644 --- a/src/Identity.SignIns/v1.0/examples/Get-MgIdentityRiskPreventionWebApplicationFirewallVerification.md +++ b/src/Identity.SignIns/v1.0/examples/Get-MgIdentityRiskPreventionWebApplicationFirewallVerification.md @@ -0,0 +1,22 @@ +### Example 1: Retrieve a specific webApplicationFirewallVerifications object. + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +Get-MgIdentityRiskPreventionWebApplicationFirewallVerification -WebApplicationFirewallVerificationModelId $webApplicationFirewallVerificationModelId + +``` +This example will retrieve a specific webapplicationfirewallverifications object. + +### Example 2: Retrieve a specific webApplicationFirewallVerifications object along with the details of their associated provider + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +Get-MgIdentityRiskPreventionWebApplicationFirewallVerification -WebApplicationFirewallVerificationModelId $webApplicationFirewallVerificationModelId -ExpandProperty "provider" + +``` +This example will retrieve a specific webapplicationfirewallverifications object along with the details of their associated provider + diff --git a/src/Identity.SignIns/v1.0/examples/Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration.md b/src/Identity.SignIns/v1.0/examples/Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration.md index 6fac0127bc..372f3696a6 100644 --- a/src/Identity.SignIns/v1.0/examples/Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration.md +++ b/src/Identity.SignIns/v1.0/examples/Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration.md @@ -1,28 +1,11 @@ -### Example 1: Using the Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet +### Example 1: Code snippet + ```powershell + Import-Module Microsoft.Graph.Identity.SignIns + Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId $authenticationMethodConfigurationId + ``` This example shows how to use the Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). -### Example 2: Using the Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet -```powershell -Import-Module Microsoft.Graph.Identity.SignIns -Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId $authenticationMethodConfigurationId -``` -This example shows how to use the Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). -### Example 3: Using the Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet -```powershell -Import-Module Microsoft.Graph.Identity.SignIns -Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId $authenticationMethodConfigurationId -``` -This example shows how to use the Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). -### Example 4: Using the Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet -```powershell -Import-Module Microsoft.Graph.Identity.SignIns -Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId $authenticationMethodConfigurationId -``` -This example shows how to use the Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). + diff --git a/src/Identity.SignIns/v1.0/examples/New-MgIdentityAuthenticationEventFlowAsOnAuthenticationMethodLoadStartExternalUserSelfServiceSignUpIdentityProviderByRef.md b/src/Identity.SignIns/v1.0/examples/New-MgIdentityAuthenticationEventFlowAsOnAuthenticationMethodLoadStartExternalUserSelfServiceSignUpIdentityProviderByRef.md index e69de29bb2..f2d9614e86 100644 --- a/src/Identity.SignIns/v1.0/examples/New-MgIdentityAuthenticationEventFlowAsOnAuthenticationMethodLoadStartExternalUserSelfServiceSignUpIdentityProviderByRef.md +++ b/src/Identity.SignIns/v1.0/examples/New-MgIdentityAuthenticationEventFlowAsOnAuthenticationMethodLoadStartExternalUserSelfServiceSignUpIdentityProviderByRef.md @@ -0,0 +1,15 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$params = @{ + "@odata.id" = "https://graph.microsoft.com/v1.0/identityProviders/Google-OAUTH" +} + +New-MgIdentityAuthenticationEventFlowAsOnAuthenticationMethodLoadStartExternalUserSelfServiceSignUpIdentityProviderByRef -AuthenticationEventsFlowId $authenticationEventsFlowId -BodyParameter $params + +``` +This example shows how to use the New-MgIdentityAuthenticationEventFlowAsOnAuthenticationMethodLoadStartExternalUserSelfServiceSignUpIdentityProviderByRef Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/New-MgIdentityAuthenticationEventListener.md b/src/Identity.SignIns/v1.0/examples/New-MgIdentityAuthenticationEventListener.md index 781005b4fe..2dbf2513a1 100644 --- a/src/Identity.SignIns/v1.0/examples/New-MgIdentityAuthenticationEventListener.md +++ b/src/Identity.SignIns/v1.0/examples/New-MgIdentityAuthenticationEventListener.md @@ -1,4 +1,4 @@ -### Example 1: Code snippet +### Example 1: Create authenticationEventListener ```powershell @@ -26,9 +26,9 @@ $params = @{ New-MgIdentityAuthenticationEventListener -BodyParameter $params ``` -This example shows how to use the New-MgIdentityAuthenticationEventListener Cmdlet. +This example will create authenticationeventlistener -### Example 2: Code snippet +### Example 2: Enable Fraud Protection during sign-up with Arkose Labs ```powershell @@ -60,9 +60,9 @@ $params = @{ New-MgIdentityAuthenticationEventListener -BodyParameter $params ``` -This example shows how to use the New-MgIdentityAuthenticationEventListener Cmdlet. +This example will enable fraud protection during sign-up with arkose labs -### Example 3: Code snippet +### Example 3: Enable Fraud Protection during sign-up with HUMAN Security ```powershell @@ -94,5 +94,38 @@ $params = @{ New-MgIdentityAuthenticationEventListener -BodyParameter $params ``` -This example shows how to use the New-MgIdentityAuthenticationEventListener Cmdlet. +This example will enable fraud protection during sign-up with human security + +### Example 4: Create an onPasswordSubmitListener object + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.onPasswordSubmitListener" + displayName = "JIT migration listener" + conditions = @{ + applications = @{ + includeAllApplications = $false + includeApplications = @( + @{ + appId = "00011111-aaaa-2222-bbbb-3333cccc4444" + } + ) + } + } + handler = @{ + "@odata.type" = "#microsoft.graph.onPasswordMigrationCustomExtensionHandler" + migrationPropertyId = "extension_b7b1c57b532f40b8b5ed4b7a7ba67401_requiresMigration" + customExtension = @{ + id = "6fc5012e-7665-43d6-9708-4370863f4e6e" + } + } +} + +New-MgIdentityAuthenticationEventListener -BodyParameter $params + +``` +This example will create an onpasswordsubmitlistener object diff --git a/src/Identity.SignIns/v1.0/examples/New-MgIdentityB2XUserFlow.md b/src/Identity.SignIns/v1.0/examples/New-MgIdentityB2XUserFlow.md index e69de29bb2..c804900a38 100644 --- a/src/Identity.SignIns/v1.0/examples/New-MgIdentityB2XUserFlow.md +++ b/src/Identity.SignIns/v1.0/examples/New-MgIdentityB2XUserFlow.md @@ -0,0 +1,66 @@ +### Example 1: Create a user flow with the default values + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$params = @{ + id = "Partner" + userFlowType = "signUpOrSignIn" + userFlowTypeVersion = 1 +} + +New-MgIdentityB2XUserFlow -BodyParameter $params + +``` +This example will create a user flow with the default values + +### Example 2: Create a user flow with the default values and an identity provider + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$params = @{ + id = "Partner" + userFlowType = "signUpOrSignIn" + userFlowTypeVersion = 1 + identityProviders = @( + @{ + id = "Facebook-OAuth" + type = "Facebook" + name = "Facebook" + } + ) +} + +New-MgIdentityB2XUserFlow -BodyParameter $params + +``` +This example will create a user flow with the default values and an identity provider + +### Example 3: Create a user flow with the default values and configuration for API connectors + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$params = @{ + id = "UserFlowWithAPIConnector" + userFlowType = "signUpOrSignIn" + userFlowTypeVersion = 1 + apiConnectorConfiguration = @{ + postFederationSignup = @{ + "@odata.id" = "https://graph.microsoft.com/v1/identity/apiConnectors/{id}" + } + postAttributeCollection = @{ + "@odata.id" = "https://graph.microsoft.com/v1/identity/apiConnectors/{id}" + } + } +} + +New-MgIdentityB2XUserFlow -BodyParameter $params + +``` +This example will create a user flow with the default values and configuration for api connectors + diff --git a/src/Identity.SignIns/v1.0/examples/New-MgIdentityRiskPreventionFraudProtectionProvider.md b/src/Identity.SignIns/v1.0/examples/New-MgIdentityRiskPreventionFraudProtectionProvider.md index e69de29bb2..16574fca5a 100644 --- a/src/Identity.SignIns/v1.0/examples/New-MgIdentityRiskPreventionFraudProtectionProvider.md +++ b/src/Identity.SignIns/v1.0/examples/New-MgIdentityRiskPreventionFraudProtectionProvider.md @@ -0,0 +1,38 @@ +### Example 1: Create a new arkoseFraudProtectionProvider object + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.arkoseFraudProtectionProvider" + displayName = "Arkose Sign-Up Protection" + publicKey = "A1EE42E0-C88B-47FE-A176-5E9FB8F116FB" + privateKey = "19BBE628-7DEF-4E28-AB25-BF129C760B7E" + clientSubDomain = "client-api" + verifySubDomain = "verify-api" +} + +New-MgIdentityRiskPreventionFraudProtectionProvider -BodyParameter $params + +``` +This example will create a new arkosefraudprotectionprovider object + +### Example 2: Create a new humanSecurityFraudProtectionProvider object + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.humanSecurityFraudProtectionProvider" + displayName = "HUMAN Security Sign-Up Protection" + appId = "XXyy1XXXy" + serverToken = "xxYYxxXXX1" +} + +New-MgIdentityRiskPreventionFraudProtectionProvider -BodyParameter $params + +``` +This example will create a new humansecurityfraudprotectionprovider object + diff --git a/src/Identity.SignIns/v1.0/examples/New-MgIdentityRiskPreventionWebApplicationFirewallProvider.md b/src/Identity.SignIns/v1.0/examples/New-MgIdentityRiskPreventionWebApplicationFirewallProvider.md index e69de29bb2..4952417a06 100644 --- a/src/Identity.SignIns/v1.0/examples/New-MgIdentityRiskPreventionWebApplicationFirewallProvider.md +++ b/src/Identity.SignIns/v1.0/examples/New-MgIdentityRiskPreventionWebApplicationFirewallProvider.md @@ -0,0 +1,38 @@ +### Example 1: Create a new AkamaiWebApplicationFirewallProvider object + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.akamaiWebApplicationFirewallProvider" + displayName = "Akamai Provider Example" + hostPrefix = "akab-exampleprefix" + clientSecret = "akamai_example_secret_123" + clientToken = "akamai_example_token_456" + accessToken = "akamai_example_token_789" +} + +New-MgIdentityRiskPreventionWebApplicationFirewallProvider -BodyParameter $params + +``` +This example will create a new akamaiwebapplicationfirewallprovider object + +### Example 2: Create a new cloudFlareWebApplicationFirewallProvider object + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.cloudFlareWebApplicationFirewallProvider" + displayName = "Cloudflare Provider Example" + zoneId = "11111111111111111111111111111111" + apiToken = "cf_example_token_123" +} + +New-MgIdentityRiskPreventionWebApplicationFirewallProvider -BodyParameter $params + +``` +This example will create a new cloudflarewebapplicationfirewallprovider object + diff --git a/src/Identity.SignIns/v1.0/examples/New-MgUserAuthenticationExternalAuthenticationMethod.md b/src/Identity.SignIns/v1.0/examples/New-MgUserAuthenticationExternalAuthenticationMethod.md new file mode 100644 index 0000000000..aa2cfcefc1 --- /dev/null +++ b/src/Identity.SignIns/v1.0/examples/New-MgUserAuthenticationExternalAuthenticationMethod.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.externalAuthenticationMethod" + configurationId = "26310fee-860b-4eab-8749-ab730dcf335e" + displayName = "Adatum" +} + +New-MgUserAuthenticationExternalAuthenticationMethod -UserId $userId -BodyParameter $params + +``` +This example shows how to use the New-MgUserAuthenticationExternalAuthenticationMethod Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityB2XUserFlowLanguageOverridePageContent.md b/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityB2XUserFlowLanguageOverridePageContent.md index e69de29bb2..81f4fc2127 100644 --- a/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityB2XUserFlowLanguageOverridePageContent.md +++ b/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityB2XUserFlowLanguageOverridePageContent.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +Remove-MgIdentityB2XUserFlowLanguageOverridePageContent -B2xIdentityUserFlowId $b2xIdentityUserFlowId -UserFlowLanguageConfigurationId $userFlowLanguageConfigurationId -UserFlowLanguagePageId $userFlowLanguagePageId + +``` +This example shows how to use the Remove-MgIdentityB2XUserFlowLanguageOverridePageContent Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityB2XUserFlowUserAttributeAssignment.md b/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityB2XUserFlowUserAttributeAssignment.md index 48f6f7aae1..a5bc744a9b 100644 --- a/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityB2XUserFlowUserAttributeAssignment.md +++ b/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityB2XUserFlowUserAttributeAssignment.md @@ -1,11 +1,11 @@ ### Example 1: Code snippet ```powershell + Import-Module Microsoft.Graph.Identity.SignIns Remove-MgIdentityB2XUserFlowUserAttributeAssignment -B2xIdentityUserFlowId $b2xIdentityUserFlowId -IdentityUserFlowAttributeAssignmentId $identityUserFlowAttributeAssignmentId + ``` This example shows how to use the Remove-MgIdentityB2XUserFlowUserAttributeAssignment Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). - diff --git a/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityRiskPreventionFraudProtectionProvider.md b/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityRiskPreventionFraudProtectionProvider.md index e69de29bb2..5c4bf55a93 100644 --- a/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityRiskPreventionFraudProtectionProvider.md +++ b/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityRiskPreventionFraudProtectionProvider.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +Remove-MgIdentityRiskPreventionFraudProtectionProvider -FraudProtectionProviderId $fraudProtectionProviderId + +``` +This example shows how to use the Remove-MgIdentityRiskPreventionFraudProtectionProvider Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityRiskPreventionWebApplicationFirewallProvider.md b/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityRiskPreventionWebApplicationFirewallProvider.md index e69de29bb2..6e7c0846c9 100644 --- a/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityRiskPreventionWebApplicationFirewallProvider.md +++ b/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityRiskPreventionWebApplicationFirewallProvider.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +Remove-MgIdentityRiskPreventionWebApplicationFirewallProvider -WebApplicationFirewallProviderId $webApplicationFirewallProviderId + +``` +This example shows how to use the Remove-MgIdentityRiskPreventionWebApplicationFirewallProvider Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityRiskPreventionWebApplicationFirewallVerification.md b/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityRiskPreventionWebApplicationFirewallVerification.md index e69de29bb2..2fd7c05009 100644 --- a/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityRiskPreventionWebApplicationFirewallVerification.md +++ b/src/Identity.SignIns/v1.0/examples/Remove-MgIdentityRiskPreventionWebApplicationFirewallVerification.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +Remove-MgIdentityRiskPreventionWebApplicationFirewallVerification -WebApplicationFirewallVerificationModelId $webApplicationFirewallVerificationModelId + +``` +This example shows how to use the Remove-MgIdentityRiskPreventionWebApplicationFirewallVerification Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration.md b/src/Identity.SignIns/v1.0/examples/Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration.md index 35e83587f0..76680e2ff2 100644 --- a/src/Identity.SignIns/v1.0/examples/Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration.md +++ b/src/Identity.SignIns/v1.0/examples/Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration.md @@ -1,28 +1,11 @@ -### Example 1: Using the Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet +### Example 1: Code snippet + ```powershell + Import-Module Microsoft.Graph.Identity.SignIns + Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId $authenticationMethodConfigurationId + ``` This example shows how to use the Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). -### Example 2: Using the Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet -```powershell -Import-Module Microsoft.Graph.Identity.SignIns -Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId $authenticationMethodConfigurationId -``` -This example shows how to use the Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). -### Example 3: Using the Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet -```powershell -Import-Module Microsoft.Graph.Identity.SignIns -Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId $authenticationMethodConfigurationId -``` -This example shows how to use the Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). -### Example 4: Using the Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet -```powershell -Import-Module Microsoft.Graph.Identity.SignIns -Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId $authenticationMethodConfigurationId -``` -This example shows how to use the Remove-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). + diff --git a/src/Identity.SignIns/v1.0/examples/Remove-MgUserAuthenticationExternalAuthenticationMethod.md b/src/Identity.SignIns/v1.0/examples/Remove-MgUserAuthenticationExternalAuthenticationMethod.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Identity.SignIns/v1.0/examples/Update-MgIdentityRiskPreventionFraudProtectionProvider.md b/src/Identity.SignIns/v1.0/examples/Update-MgIdentityRiskPreventionFraudProtectionProvider.md index e69de29bb2..b6dfba3a54 100644 --- a/src/Identity.SignIns/v1.0/examples/Update-MgIdentityRiskPreventionFraudProtectionProvider.md +++ b/src/Identity.SignIns/v1.0/examples/Update-MgIdentityRiskPreventionFraudProtectionProvider.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.arkoseFraudProtectionProvider" + displayName = "Arkose Sign-Up Protection Updated" +} + +Update-MgIdentityRiskPreventionFraudProtectionProvider -FraudProtectionProviderId $fraudProtectionProviderId -BodyParameter $params + +``` +This example shows how to use the Update-MgIdentityRiskPreventionFraudProtectionProvider Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/Update-MgIdentityRiskPreventionWebApplicationFirewallProvider.md b/src/Identity.SignIns/v1.0/examples/Update-MgIdentityRiskPreventionWebApplicationFirewallProvider.md index e69de29bb2..f2e72b87ef 100644 --- a/src/Identity.SignIns/v1.0/examples/Update-MgIdentityRiskPreventionWebApplicationFirewallProvider.md +++ b/src/Identity.SignIns/v1.0/examples/Update-MgIdentityRiskPreventionWebApplicationFirewallProvider.md @@ -0,0 +1,16 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +$params = @{ + "@odata.type" = "#microsoft.graph.cloudFlareWebApplicationFirewallProvider" + displayName = "String" +} + +Update-MgIdentityRiskPreventionWebApplicationFirewallProvider -WebApplicationFirewallProviderId $webApplicationFirewallProviderId -BodyParameter $params + +``` +This example shows how to use the Update-MgIdentityRiskPreventionWebApplicationFirewallProvider Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration.md b/src/Identity.SignIns/v1.0/examples/Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration.md index 6538a87062..bef6ff3a42 100644 --- a/src/Identity.SignIns/v1.0/examples/Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration.md +++ b/src/Identity.SignIns/v1.0/examples/Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration.md @@ -1,45 +1,23 @@ -### Example 1: Using the Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet +### Example 1: Code snippet + ```powershell + Import-Module Microsoft.Graph.Identity.SignIns + $params = @{ - "@odata.type" = "#microsoft.graph.emailAuthenticationMethodConfiguration" - AllowExternalIdToUseEmailOtp = "enabled" + "@odata.type" = "#microsoft.graph.externalAuthenticationMethodConfiguration" + includeTargets = @( + @{ + targetType = "group" + id = "b183b746-e7db-4fa2-bafc-69ecf18850dd" + isRegistrationRequired = $false + } + ) + state = "enabled" } + Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId $authenticationMethodConfigurationId -BodyParameter $params + ``` This example shows how to use the Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). -### Example 2: Using the Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet -```powershell -Import-Module Microsoft.Graph.Identity.SignIns -$params = @{ - "@odata.type" = "#microsoft.graph.fido2AuthenticationMethodConfiguration" - State = "enabled" - IsAttestationEnforced = "true" -} -Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId $authenticationMethodConfigurationId -BodyParameter $params -``` -This example shows how to use the Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). -### Example 3: Using the Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet -```powershell -Import-Module Microsoft.Graph.Identity.SignIns -$params = @{ - "@odata.type" = "#microsoft.graph.microsoftAuthenticatorAuthenticationMethodConfiguration" - State = "String" -} -Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId $authenticationMethodConfigurationId -BodyParameter $params -``` -This example shows how to use the Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). -### Example 4: Using the Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet -```powershell -Import-Module Microsoft.Graph.Identity.SignIns -$params = @{ - "@odata.type" = "#microsoft.graph.temporaryAccessPassAuthenticationMethodConfiguration" - IsUsableOnce = $true -} -Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId $authenticationMethodConfigurationId -BodyParameter $params -``` -This example shows how to use the Update-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). + diff --git a/src/Mail/v1.0/examples/New-MgUserMessageForward.md b/src/Mail/v1.0/examples/New-MgUserMessageForward.md index 4f5160a4bd..fba62ca696 100644 --- a/src/Mail/v1.0/examples/New-MgUserMessageForward.md +++ b/src/Mail/v1.0/examples/New-MgUserMessageForward.md @@ -4,8 +4,23 @@ Import-Module Microsoft.Graph.Mail +$params = @{ + message = @{ + isDeliveryReceiptRequested = $true + toRecipients = @( + @{ + emailAddress = @{ + address = "danas@contoso.com" + name = "Dana Swope" + } + } + ) + } + comment = "Dana, just want to make sure you get this; you'll need this if the project gets approved." +} + # A UPN can also be used as -UserId. -New-MgUserMessageForward -UserId $userId -MessageId $messageId +New-MgUserMessageForward -UserId $userId -MessageId $messageId -BodyParameter $params ``` This example shows how to use the New-MgUserMessageForward Cmdlet. diff --git a/src/Migrations/beta/examples/New-MgBetaCrossTenantMigrationJob.md b/src/Migrations/beta/examples/New-MgBetaCrossTenantMigrationJob.md index e69de29bb2..87440b72ae 100644 --- a/src/Migrations/beta/examples/New-MgBetaCrossTenantMigrationJob.md +++ b/src/Migrations/beta/examples/New-MgBetaCrossTenantMigrationJob.md @@ -0,0 +1,32 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Migrations + +$params = @{ + displayName = "xtmigration_user_req_1" + completeAfterDateTime = [System.DateTime]::Parse("2024-12-09T22:48:03.092Z") + sourceTenantId = "12345678-1234-1234-1234-123456789012" + exchangeSettings = @{ + targetDeliveryDomain = "xtmigration.onmicrosoft.com" + sourceEndpoint = "sampleEndpointText" + } + resources = @( + "4dd550d9-9ea2-4e71-a16b-60b1d1c4f506" +"63f15b55-f61a-49cb-a599-2e3d233afb2c" +"41d94bac-3a53-47d6-a89e-583830104e15" +) +resourceType = "Users" +workloads = @( +"Teams" +"Exchange" +"ODSP" +) +} + +New-MgBetaCrossTenantMigrationJob -BodyParameter $params + +``` +This example shows how to use the New-MgBetaCrossTenantMigrationJob Cmdlet. + diff --git a/src/Migrations/beta/examples/Stop-MgBetaCrossTenantMigrationJob.md b/src/Migrations/beta/examples/Stop-MgBetaCrossTenantMigrationJob.md index e69de29bb2..80d9b69d8a 100644 --- a/src/Migrations/beta/examples/Stop-MgBetaCrossTenantMigrationJob.md +++ b/src/Migrations/beta/examples/Stop-MgBetaCrossTenantMigrationJob.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Migrations + +Stop-MgBetaCrossTenantMigrationJob -CrossTenantMigrationJobId $crossTenantMigrationJobId + +``` +This example shows how to use the Stop-MgBetaCrossTenantMigrationJob Cmdlet. + diff --git a/src/Migrations/beta/examples/Stop-MgBetaCrossTenantMigrationJobUser.md b/src/Migrations/beta/examples/Stop-MgBetaCrossTenantMigrationJobUser.md index e69de29bb2..75aef649e7 100644 --- a/src/Migrations/beta/examples/Stop-MgBetaCrossTenantMigrationJobUser.md +++ b/src/Migrations/beta/examples/Stop-MgBetaCrossTenantMigrationJobUser.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Migrations + +Stop-MgBetaCrossTenantMigrationJobUser -CrossTenantMigrationJobId $crossTenantMigrationJobId -CrossTenantMigrationTaskId $crossTenantMigrationTaskId + +``` +This example shows how to use the Stop-MgBetaCrossTenantMigrationJobUser Cmdlet. + diff --git a/src/Migrations/beta/examples/Test-MgBetaCrossTenantMigrationJob.md b/src/Migrations/beta/examples/Test-MgBetaCrossTenantMigrationJob.md index e69de29bb2..b0fda5d70f 100644 --- a/src/Migrations/beta/examples/Test-MgBetaCrossTenantMigrationJob.md +++ b/src/Migrations/beta/examples/Test-MgBetaCrossTenantMigrationJob.md @@ -0,0 +1,29 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Migrations + +$params = @{ + displayName = "Contoso_migration_validation_job" + completeAfterDateTime = "2025-05-22T17:14:52Z" + sourceTenantId = "12345678-1234-1234-1234-123456789012" + exchangeSettings = @{ + targetDeliveryDomain = "fabrikam.com" + sourceEndpoint = "EXOHandler" + } + resources = @( + "b5b8bc4f-0e36-4ad3-8ddf-248b68260b89" +"ac87d040-a081-426c-a73b-81133f458a29" +) +workloads = @( +"Teams" +) +resourceType = "Users" +} + +Test-MgBetaCrossTenantMigrationJob -BodyParameter $params + +``` +This example shows how to use the Test-MgBetaCrossTenantMigrationJob Cmdlet. + diff --git a/src/Migrations/beta/examples/Update-MgBetaCrossTenantMigrationJob.md b/src/Migrations/beta/examples/Update-MgBetaCrossTenantMigrationJob.md index e69de29bb2..dd5d3a6275 100644 --- a/src/Migrations/beta/examples/Update-MgBetaCrossTenantMigrationJob.md +++ b/src/Migrations/beta/examples/Update-MgBetaCrossTenantMigrationJob.md @@ -0,0 +1,15 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Migrations + +$params = @{ + completeAfterDateTime = [System.DateTime]::Parse("2025-05-22T17:14:52Z") +} + +Update-MgBetaCrossTenantMigrationJob -CrossTenantMigrationJobId $crossTenantMigrationJobId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaCrossTenantMigrationJob Cmdlet. + diff --git a/src/NetworkAccess/beta/examples/Update-MgBetaNetworkAccessSettingCustomBlockPage.md b/src/NetworkAccess/beta/examples/Update-MgBetaNetworkAccessSettingCustomBlockPage.md index e69de29bb2..bc9b362234 100644 --- a/src/NetworkAccess/beta/examples/Update-MgBetaNetworkAccessSettingCustomBlockPage.md +++ b/src/NetworkAccess/beta/examples/Update-MgBetaNetworkAccessSettingCustomBlockPage.md @@ -0,0 +1,19 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.NetworkAccess + +$params = @{ + state = "enabled" + configuration = @{ + "@odata.type" = "#microsoft.graph.networkaccess.markdownBlockMessageConfiguration" + body = "Your admin at NaaSLitware has blocked your access. [Click here for NaaSLitware's Terms of Use](https://www.bing.com)." + } +} + +Update-MgBetaNetworkAccessSettingCustomBlockPage -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaNetworkAccessSettingCustomBlockPage Cmdlet. + diff --git a/src/Reports/v1.0/examples/Get-MgReportTeamCount.md b/src/Reports/v1.0/examples/Get-MgReportTeamCount.md index e69de29bb2..18ab872d77 100644 --- a/src/Reports/v1.0/examples/Get-MgReportTeamCount.md +++ b/src/Reports/v1.0/examples/Get-MgReportTeamCount.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Reports + +Get-MgReportTeamCount -Format "text/csv" -Period $periodId + +``` +This example shows how to use the Get-MgReportTeamCount Cmdlet. + diff --git a/src/Search/v1.0/examples/Get-MgExternalConnectionItem.md b/src/Search/v1.0/examples/Get-MgExternalConnectionItem.md index 808ff3609e..d9a6978c2a 100644 --- a/src/Search/v1.0/examples/Get-MgExternalConnectionItem.md +++ b/src/Search/v1.0/examples/Get-MgExternalConnectionItem.md @@ -1,11 +1,11 @@ ### Example 1: Code snippet ```powershell + Import-Module Microsoft.Graph.Search Get-MgExternalConnectionItem -ExternalConnectionId $externalConnectionId -ExternalItemId $externalItemId + ``` This example shows how to use the Get-MgExternalConnectionItem Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). - diff --git a/src/Security/beta/examples/New-MgBetaSecurityCaseEdiscoveryCaseLegalHoldUserSource.md b/src/Security/beta/examples/New-MgBetaSecurityCaseEdiscoveryCaseLegalHoldUserSource.md index 07c8176714..9da978ee6c 100644 --- a/src/Security/beta/examples/New-MgBetaSecurityCaseEdiscoveryCaseLegalHoldUserSource.md +++ b/src/Security/beta/examples/New-MgBetaSecurityCaseEdiscoveryCaseLegalHoldUserSource.md @@ -6,7 +6,7 @@ Import-Module Microsoft.Graph.Beta.Security $params = @{ email = "admin@contoso.com" - includedSources = "mailbox, site" + includedSources = "mailbox" } New-MgBetaSecurityCaseEdiscoveryCaseLegalHoldUserSource -EdiscoveryCaseId $ediscoveryCaseId -EdiscoveryHoldPolicyId $ediscoveryHoldPolicyId -BodyParameter $params diff --git a/src/Security/beta/examples/New-MgBetaSecurityLabelRetentionLabel.md b/src/Security/beta/examples/New-MgBetaSecurityLabelRetentionLabel.md index b271bd7639..3e602dadc9 100644 --- a/src/Security/beta/examples/New-MgBetaSecurityLabelRetentionLabel.md +++ b/src/Security/beta/examples/New-MgBetaSecurityLabelRetentionLabel.md @@ -6,28 +6,34 @@ Import-Module Microsoft.Graph.Beta.Security $params = @{ "@odata.type" = "#microsoft.graph.security.retentionLabel" - displayName = "String" - behaviorDuringRetentionPeriod = "String" - actionAfterRetentionPeriod = "String" - retentionTrigger = "String" + displayName = "Retention Schedule 10005" + behaviorDuringRetentionPeriod = "retain" + actionAfterRetentionPeriod = "startDispositionReview" + retentionTrigger = "dateOfEvent" + "retentionEventType@odata.bind" = "https://graph.microsoft.com/beta/security/triggerTypes/retentionEventTypes('e095f4fc-b966-4c40-94de-fb8a383658e4')" retentionDuration = @{ - "@odata.type" = "microsoft.graph.security.retentionDuration" + "@odata.type" = "microsoft.graph.security.retentionDurationInDays" + days = } - isInUse = "Boolean" - descriptionForAdmins = "String" - descriptionForUsers = "String" - createdBy = @{ - "@odata.type" = "microsoft.graph.identitySet" - } - labelToBeApplied = "String" - defaultRecordBehavior = "String" - descriptors = @{ - "authorityTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/authorities('fie3f4fc-b966-4c40-94de-fb8a383658e4')" - "categoryTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/categories('0bjk8-b966-4c40-94de-fb8a383658e4')" - "citationTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/citations('0e23f4fc-b966-4c40-94de-fb8a383658e4')" - "departmentTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/departments('p99ef4fc-b966-4c40-94de-fb8a383658e4')" - "filePlanReferenceTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/filePlanReferences('e095f4fc-b966-4c40-94de-fb8a383658e4')" + dispositionReviewStages = @( + @{ + stageNumber = 1 + name = "Stage1" + "reviewersEmailAddresses " = @( + "Admin@contoso.onmicrosoft.com" + ) } +) +descriptionForAdmins = "retain for 7 years" +descriptionForUsers = "retain for 7 years" +descriptors = @{ + "authorityTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/authorities('fie3f4fc-b966-4c40-94de-fb8a383658e4')" + "categoryTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/categories('0bjk8-b966-4c40-94de-fb8a383658e4')" + "citationTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/citations('0e23f4fc-b966-4c40-94de-fb8a383658e4')" + "departmentTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/departments('p99ef4fc-b966-4c40-94de-fb8a383658e4')" + "filePlanReferenceTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/filePlanReferences('e095f4fc-b966-4c40-94de-fb8a383658e4')" +} +defaultRecordBehavior = "startLocked" } New-MgBetaSecurityLabelRetentionLabel -BodyParameter $params diff --git a/src/Security/v1.0/examples/Get-MgSecurityCaseEdiscoveryCaseMember.md b/src/Security/v1.0/examples/Get-MgSecurityCaseEdiscoveryCaseMember.md index e69de29bb2..1adee039ec 100644 --- a/src/Security/v1.0/examples/Get-MgSecurityCaseEdiscoveryCaseMember.md +++ b/src/Security/v1.0/examples/Get-MgSecurityCaseEdiscoveryCaseMember.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Security + +Get-MgSecurityCaseEdiscoveryCaseMember -EdiscoveryCaseId $ediscoveryCaseId + +``` +This example shows how to use the Get-MgSecurityCaseEdiscoveryCaseMember Cmdlet. + diff --git a/src/Security/v1.0/examples/Get-MgSecurityIdentityAccount.md b/src/Security/v1.0/examples/Get-MgSecurityIdentityAccount.md index e69de29bb2..e3439b34d6 100644 --- a/src/Security/v1.0/examples/Get-MgSecurityIdentityAccount.md +++ b/src/Security/v1.0/examples/Get-MgSecurityIdentityAccount.md @@ -0,0 +1,22 @@ +### Example 1: Get details of an identity account + +```powershell + +Import-Module Microsoft.Graph.Security + +Get-MgSecurityIdentityAccount -IdentityAccountsId $identityAccountsId + +``` +This example will get details of an identity account + +### Example 2: Get the account details of an identity account + +```powershell + +Import-Module Microsoft.Graph.Security + +Get-MgSecurityIdentityAccount -IdentityAccountsId $identityAccountsId -Property "accounts" + +``` +This example will get the account details of an identity account + diff --git a/src/Security/v1.0/examples/Get-MgSecurityIdentitySensorCandidate.md b/src/Security/v1.0/examples/Get-MgSecurityIdentitySensorCandidate.md index e69de29bb2..d19fbace28 100644 --- a/src/Security/v1.0/examples/Get-MgSecurityIdentitySensorCandidate.md +++ b/src/Security/v1.0/examples/Get-MgSecurityIdentitySensorCandidate.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Security + +Get-MgSecurityIdentitySensorCandidate + +``` +This example shows how to use the Get-MgSecurityIdentitySensorCandidate Cmdlet. + diff --git a/src/Security/v1.0/examples/Get-MgSecurityIdentitySensorCandidateActivationConfiguration.md b/src/Security/v1.0/examples/Get-MgSecurityIdentitySensorCandidateActivationConfiguration.md index e69de29bb2..1a27a879f0 100644 --- a/src/Security/v1.0/examples/Get-MgSecurityIdentitySensorCandidateActivationConfiguration.md +++ b/src/Security/v1.0/examples/Get-MgSecurityIdentitySensorCandidateActivationConfiguration.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Security + +Get-MgSecurityIdentitySensorCandidateActivationConfiguration + +``` +This example shows how to use the Get-MgSecurityIdentitySensorCandidateActivationConfiguration Cmdlet. + diff --git a/src/Security/v1.0/examples/Invoke-MgInvokeSecurityIdentityAccountAction.md b/src/Security/v1.0/examples/Invoke-MgInvokeSecurityIdentityAccountAction.md index e69de29bb2..9888755124 100644 --- a/src/Security/v1.0/examples/Invoke-MgInvokeSecurityIdentityAccountAction.md +++ b/src/Security/v1.0/examples/Invoke-MgInvokeSecurityIdentityAccountAction.md @@ -0,0 +1,17 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Security + +$params = @{ + accountId = "256db173-930a-4991-9061-0d51a9a93ba5" + action = "disable" + identityProvider = "activeDirectory" +} + +Invoke-MgInvokeSecurityIdentityAccountAction -IdentityAccountsId $identityAccountsId -BodyParameter $params + +``` +This example shows how to use the Invoke-MgInvokeSecurityIdentityAccountAction Cmdlet. + diff --git a/src/Security/v1.0/examples/New-MgSecurityCaseEdiscoveryCaseMember.md b/src/Security/v1.0/examples/New-MgSecurityCaseEdiscoveryCaseMember.md index e69de29bb2..25d445c9d0 100644 --- a/src/Security/v1.0/examples/New-MgSecurityCaseEdiscoveryCaseMember.md +++ b/src/Security/v1.0/examples/New-MgSecurityCaseEdiscoveryCaseMember.md @@ -0,0 +1,64 @@ +### Example 1: Add a case member of type **user** using **smtpAddress** + +```powershell + +Import-Module Microsoft.Graph.Security + +$params = @{ + recipientType = "user" + smtpAddress = "johnadams@microsoft.com" +} + +New-MgSecurityCaseEdiscoveryCaseMember -EdiscoveryCaseId $ediscoveryCaseId -BodyParameter $params + +``` +This example will add a case member of type **user** using **smtpaddress** + +### Example 2: Add a case member of type **roleGroup** using **displayName** + +```powershell + +Import-Module Microsoft.Graph.Security + +$params = @{ + recipientType = "roleGroup" + displayName = "Security Administrator" +} + +New-MgSecurityCaseEdiscoveryCaseMember -EdiscoveryCaseId $ediscoveryCaseId -BodyParameter $params + +``` +This example will add a case member of type **rolegroup** using **displayname** + +### Example 3: Add a case member of type **user** using **ID** + +```powershell + +Import-Module Microsoft.Graph.Security + +$params = @{ + recipientType = "user" + id = "c4af6f9d-37f6-43f9-9e17-601544234146" +} + +New-MgSecurityCaseEdiscoveryCaseMember -EdiscoveryCaseId $ediscoveryCaseId -BodyParameter $params + +``` +This example will add a case member of type **user** using **id** + +### Example 4: Add a case member of type **roleGroup** using **ID** + +```powershell + +Import-Module Microsoft.Graph.Security + +$params = @{ + recipientType = "roleGroup" + id = "b9fb4f22-5f90-47a0-b309-44fe96a959fd" +} + +New-MgSecurityCaseEdiscoveryCaseMember -EdiscoveryCaseId $ediscoveryCaseId -BodyParameter $params + +``` +This example will add a case member of type **rolegroup** using **id** + diff --git a/src/Security/v1.0/examples/New-MgSecurityLabelRetentionLabel.md b/src/Security/v1.0/examples/New-MgSecurityLabelRetentionLabel.md index e69de29bb2..a9bbd23060 100644 --- a/src/Security/v1.0/examples/New-MgSecurityLabelRetentionLabel.md +++ b/src/Security/v1.0/examples/New-MgSecurityLabelRetentionLabel.md @@ -0,0 +1,43 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.retentionLabel" + displayName = "Retention Schedule 10005" + behaviorDuringRetentionPeriod = "retain" + actionAfterRetentionPeriod = "startDispositionReview" + retentionTrigger = "dateOfEvent" + "retentionEventType@odata.bind" = "https://graph.microsoft.com/v1.0/security/triggerTypes/retentionEventTypes('e095f4fc-b966-4c40-94de-fb8a383658e4')" + retentionDuration = @{ + "@odata.type" = "microsoft.graph.security.retentionDurationInDays" + days = + } + dispositionReviewStages = @( + @{ + stageNumber = 1 + name = "Stage1" + "reviewersEmailAddresses " = @( + "Admin@contoso.onmicrosoft.com" + ) + } +) +descriptionForAdmins = "retain for 7 years" +descriptionForUsers = "retain for 7 years" +descriptors = @{ + "authorityTemplate@odata.bind" = "https://graph.microsoft.com/v1.0/security/labels/authorities('fie3f4fc-b966-4c40-94de-fb8a383658e4')" + "categoryTemplate@odata.bind" = "https://graph.microsoft.com/v1.0/security/labels/categories('0bjk8-b966-4c40-94de-fb8a383658e4')" + "citationTemplate@odata.bind" = "https://graph.microsoft.com/v1.0/security/labels/citations('0e23f4fc-b966-4c40-94de-fb8a383658e4')" + "departmentTemplate@odata.bind" = "https://graph.microsoft.com/v1.0/security/labels/departments('p99ef4fc-b966-4c40-94de-fb8a383658e4')" + "filePlanReferenceTemplate@odata.bind" = "https://graph.microsoft.com/v1.0/security/labels/filePlanReferences('e095f4fc-b966-4c40-94de-fb8a383658e4')" +} +defaultRecordBehavior = "startLocked" +} + +New-MgSecurityLabelRetentionLabel -BodyParameter $params + +``` +This example shows how to use the New-MgSecurityLabelRetentionLabel Cmdlet. + diff --git a/src/Security/v1.0/examples/Remove-MgSecurityCaseEdiscoveryCaseMember.md b/src/Security/v1.0/examples/Remove-MgSecurityCaseEdiscoveryCaseMember.md index e69de29bb2..880e35b778 100644 --- a/src/Security/v1.0/examples/Remove-MgSecurityCaseEdiscoveryCaseMember.md +++ b/src/Security/v1.0/examples/Remove-MgSecurityCaseEdiscoveryCaseMember.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Security + +Remove-MgSecurityCaseEdiscoveryCaseMember -EdiscoveryCaseId $ediscoveryCaseId -EdiscoveryCaseMemberId $ediscoveryCaseMemberId + +``` +This example shows how to use the Remove-MgSecurityCaseEdiscoveryCaseMember Cmdlet. + diff --git a/src/Security/v1.0/examples/Update-MgSecurityLabelRetentionLabel.md b/src/Security/v1.0/examples/Update-MgSecurityLabelRetentionLabel.md index e69de29bb2..09b22cda53 100644 --- a/src/Security/v1.0/examples/Update-MgSecurityLabelRetentionLabel.md +++ b/src/Security/v1.0/examples/Update-MgSecurityLabelRetentionLabel.md @@ -0,0 +1,19 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Security + +$params = @{ + "@odata.type" = "#microsoft.graph.security.retentionLabel" + retentionDuration = @{ + "@odata.type" = "microsoft.graph.security.retentionDurationInDays" + days = + } +} + +Update-MgSecurityLabelRetentionLabel -RetentionLabelId $retentionLabelId -BodyParameter $params + +``` +This example shows how to use the Update-MgSecurityLabelRetentionLabel Cmdlet. + diff --git a/src/Sites/beta/examples/Get-MgBetaSiteOperationStatus.md b/src/Sites/beta/examples/Get-MgBetaSiteOperationStatus.md index e69de29bb2..974f5e1136 100644 --- a/src/Sites/beta/examples/Get-MgBetaSiteOperationStatus.md +++ b/src/Sites/beta/examples/Get-MgBetaSiteOperationStatus.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Sites + +Get-MgBetaSiteOperationStatus -OperationId $operationIdId + +``` +This example shows how to use the Get-MgBetaSiteOperationStatus Cmdlet. + diff --git a/src/Sites/beta/examples/New-MgBetaSiteListPermission.md b/src/Sites/beta/examples/New-MgBetaSiteListPermission.md index e69de29bb2..ed15ffa550 100644 --- a/src/Sites/beta/examples/New-MgBetaSiteListPermission.md +++ b/src/Sites/beta/examples/New-MgBetaSiteListPermission.md @@ -0,0 +1,23 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Sites + +$params = @{ + grantedToV2 = @{ + application = @{ + id = "89ea5c94-7736-4e25-95ad-3fa95f62b66e" + displayName = "Contoso Time Manager App" + } + } + roles = @( + "write" +) +} + +New-MgBetaSiteListPermission -SiteId $siteId -ListId $listId -BodyParameter $params + +``` +This example shows how to use the New-MgBetaSiteListPermission Cmdlet. + diff --git a/src/Sites/v1.0/examples/New-MgSitePermission.md b/src/Sites/v1.0/examples/New-MgSitePermission.md index da0a6fcffe..b0dbeb834e 100644 --- a/src/Sites/v1.0/examples/New-MgSitePermission.md +++ b/src/Sites/v1.0/examples/New-MgSitePermission.md @@ -8,11 +8,14 @@ $params = @{ roles = @( "write" ) -grantedTo = @{ - application = @{ - id = "89ea5c94-7736-4e25-95ad-3fa95f62b66e" +grantedToIdentities = @( + @{ + application = @{ + id = "89ea5c94-7736-4e25-95ad-3fa95f62b66e" + displayName = "Contoso Time Manager App" + } } -} +) } New-MgSitePermission -SiteId $siteId -BodyParameter $params diff --git a/src/Teams/beta/examples/Remove-MgBetaChatAccessForUser.md b/src/Teams/beta/examples/Remove-MgBetaChatAccessForUser.md index 54c7611d9b..2da9e8a891 100644 --- a/src/Teams/beta/examples/Remove-MgBetaChatAccessForUser.md +++ b/src/Teams/beta/examples/Remove-MgBetaChatAccessForUser.md @@ -7,6 +7,8 @@ Import-Module Microsoft.Graph.Beta.Teams $params = @{ user = @{ "@odata.type" = "microsoft.graph.teamworkUserIdentity" + id = "f47ac10b-58cc-4372-a567-0e02b2c3d479" + tenantId = "a1b2c3d4-e5f6-7890-1234-567890abcdef" } } diff --git a/src/Teams/beta/examples/Start-MgBetaChatMigration.md b/src/Teams/beta/examples/Start-MgBetaChatMigration.md index e69de29bb2..537aa5ff32 100644 --- a/src/Teams/beta/examples/Start-MgBetaChatMigration.md +++ b/src/Teams/beta/examples/Start-MgBetaChatMigration.md @@ -0,0 +1,22 @@ +### Example 1: Start the migration in a chat + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Start-MgBetaChatMigration -ChatId $chatId + +``` +This example will start the migration in a chat + +### Example 2: Start the migration when a chat is already in migration mode + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Start-MgBetaChatMigration -ChatId $chatId + +``` +This example will start the migration when a chat is already in migration mode + diff --git a/src/Teams/beta/examples/Start-MgBetaGroupTeamChannelMigration.md b/src/Teams/beta/examples/Start-MgBetaGroupTeamChannelMigration.md index e69de29bb2..8b13789179 100644 --- a/src/Teams/beta/examples/Start-MgBetaGroupTeamChannelMigration.md +++ b/src/Teams/beta/examples/Start-MgBetaGroupTeamChannelMigration.md @@ -0,0 +1 @@ + diff --git a/src/Teams/beta/examples/Start-MgBetaGroupTeamPrimaryChannelMigration.md b/src/Teams/beta/examples/Start-MgBetaGroupTeamPrimaryChannelMigration.md index e69de29bb2..8b13789179 100644 --- a/src/Teams/beta/examples/Start-MgBetaGroupTeamPrimaryChannelMigration.md +++ b/src/Teams/beta/examples/Start-MgBetaGroupTeamPrimaryChannelMigration.md @@ -0,0 +1 @@ + diff --git a/src/Teams/beta/examples/Start-MgBetaTeamChannelMigration.md b/src/Teams/beta/examples/Start-MgBetaTeamChannelMigration.md index e69de29bb2..dc88ed7461 100644 --- a/src/Teams/beta/examples/Start-MgBetaTeamChannelMigration.md +++ b/src/Teams/beta/examples/Start-MgBetaTeamChannelMigration.md @@ -0,0 +1,22 @@ +### Example 1: Start the migration on an existing channel with a specific timestamp + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Start-MgBetaTeamChannelMigration -TeamId $teamId -ChannelId $channelId + +``` +This example will start the migration on an existing channel with a specific timestamp + +### Example 2: Start the migration when a channel is already in migration mode + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +Start-MgBetaTeamChannelMigration -TeamId $teamId -ChannelId $channelId + +``` +This example will start the migration when a channel is already in migration mode + diff --git a/src/Teams/beta/examples/Start-MgBetaTeamPrimaryChannelMigration.md b/src/Teams/beta/examples/Start-MgBetaTeamPrimaryChannelMigration.md index e69de29bb2..8b13789179 100644 --- a/src/Teams/beta/examples/Start-MgBetaTeamPrimaryChannelMigration.md +++ b/src/Teams/beta/examples/Start-MgBetaTeamPrimaryChannelMigration.md @@ -0,0 +1 @@ + diff --git a/src/Teams/beta/examples/Start-MgBetaTeamworkDeletedTeamChannelMigration.md b/src/Teams/beta/examples/Start-MgBetaTeamworkDeletedTeamChannelMigration.md index e69de29bb2..8b13789179 100644 --- a/src/Teams/beta/examples/Start-MgBetaTeamworkDeletedTeamChannelMigration.md +++ b/src/Teams/beta/examples/Start-MgBetaTeamworkDeletedTeamChannelMigration.md @@ -0,0 +1 @@ + diff --git a/src/Teams/beta/examples/Start-MgBetaUserChatMigration.md b/src/Teams/beta/examples/Start-MgBetaUserChatMigration.md index e69de29bb2..8b13789179 100644 --- a/src/Teams/beta/examples/Start-MgBetaUserChatMigration.md +++ b/src/Teams/beta/examples/Start-MgBetaUserChatMigration.md @@ -0,0 +1 @@ + diff --git a/src/Teams/beta/examples/Update-MgBetaTeamChannel.md b/src/Teams/beta/examples/Update-MgBetaTeamChannel.md index 9d1721612d..e14a183e5d 100644 --- a/src/Teams/beta/examples/Update-MgBetaTeamChannel.md +++ b/src/Teams/beta/examples/Update-MgBetaTeamChannel.md @@ -20,3 +20,33 @@ Update-MgBetaTeamChannel -TeamId $teamId -ChannelId $channelId -BodyParameter $p ``` This example shows how to use the Update-MgBetaTeamChannel Cmdlet. +### Example 2: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +$params = @{ + layoutType = "chat" +} + +Update-MgBetaTeamChannel -TeamId $teamId -ChannelId $channelId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaTeamChannel Cmdlet. + +### Example 3: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Teams + +$params = @{ + layoutType = "post" +} + +Update-MgBetaTeamChannel -TeamId $teamId -ChannelId $channelId -BodyParameter $params + +``` +This example shows how to use the Update-MgBetaTeamChannel Cmdlet. + diff --git a/src/Teams/v1.0/examples/Remove-MgChatAccessForUser.md b/src/Teams/v1.0/examples/Remove-MgChatAccessForUser.md index e69de29bb2..17c84e7696 100644 --- a/src/Teams/v1.0/examples/Remove-MgChatAccessForUser.md +++ b/src/Teams/v1.0/examples/Remove-MgChatAccessForUser.md @@ -0,0 +1,19 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Teams + +$params = @{ + user = @{ + "@odata.type" = "microsoft.graph.teamworkUserIdentity" + id = "f47ac10b-58cc-4372-a567-0e02b2c3d479" + tenantId = "a1b2c3d4-e5f6-7890-1234-567890abcdef" + } +} + +Remove-MgChatAccessForUser -ChatId $chatId -BodyParameter $params + +``` +This example shows how to use the Remove-MgChatAccessForUser Cmdlet. + diff --git a/src/Teams/v1.0/examples/Remove-MgTeamChannelEmail.md b/src/Teams/v1.0/examples/Remove-MgTeamChannelEmail.md index bcee4a4189..f85ea25882 100644 --- a/src/Teams/v1.0/examples/Remove-MgTeamChannelEmail.md +++ b/src/Teams/v1.0/examples/Remove-MgTeamChannelEmail.md @@ -1,7 +1,11 @@ -### Example 1: Using the Remove-MgTeamChannelEmail Cmdlet +### Example 1: Code snippet + ```powershell + Import-Module Microsoft.Graph.Teams + Remove-MgTeamChannelEmail -TeamId $teamId -ChannelId $channelId + ``` This example shows how to use the Remove-MgTeamChannelEmail Cmdlet. -To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). + diff --git a/src/Users/beta/examples/Invoke-MgBetaViewUserSettingWorkHourAndLocationOccurrence.md b/src/Users/beta/examples/Invoke-MgBetaViewUserSettingWorkHourAndLocationOccurrence.md index e69de29bb2..21dc99b2cd 100644 --- a/src/Users/beta/examples/Invoke-MgBetaViewUserSettingWorkHourAndLocationOccurrence.md +++ b/src/Users/beta/examples/Invoke-MgBetaViewUserSettingWorkHourAndLocationOccurrence.md @@ -0,0 +1,12 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Users + +# A UPN can also be used as -UserId. +Invoke-MgBetaViewUserSettingWorkHourAndLocationOccurrence -UserId $userId + +``` +This example shows how to use the Invoke-MgBetaViewUserSettingWorkHourAndLocationOccurrence Cmdlet. + diff --git a/src/Users/beta/examples/Set-MgBetaUserSettingWorkHourAndLocationOccurrenceCurrentLocation.md b/src/Users/beta/examples/Set-MgBetaUserSettingWorkHourAndLocationOccurrenceCurrentLocation.md index e69de29bb2..9df10b1d5e 100644 --- a/src/Users/beta/examples/Set-MgBetaUserSettingWorkHourAndLocationOccurrenceCurrentLocation.md +++ b/src/Users/beta/examples/Set-MgBetaUserSettingWorkHourAndLocationOccurrenceCurrentLocation.md @@ -0,0 +1,35 @@ +### Example 1: Set the current location to office + +```powershell + +Import-Module Microsoft.Graph.Beta.Users + +$params = @{ + updateScope = "currentDay" + workLocationType = "office" + placeId = "12345678-1234-1234-1234-123456789012" +} + +# A UPN can also be used as -UserId. +Set-MgBetaUserSettingWorkHourAndLocationOccurrenceCurrentLocation -UserId $userId -BodyParameter $params + +``` +This example will set the current location to office + +### Example 2: Set current location to remote + +```powershell + +Import-Module Microsoft.Graph.Beta.Users + +$params = @{ + updateScope = "currentSegment" + workLocationType = "remote" +} + +# A UPN can also be used as -UserId. +Set-MgBetaUserSettingWorkHourAndLocationOccurrenceCurrentLocation -UserId $userId -BodyParameter $params + +``` +This example will set current location to remote + diff --git a/src/Users/v1.0/examples/Get-MgUserLicenseDetailTeamLicensingDetail.md b/src/Users/v1.0/examples/Get-MgUserLicenseDetailTeamLicensingDetail.md index e69de29bb2..96191d9c87 100644 --- a/src/Users/v1.0/examples/Get-MgUserLicenseDetailTeamLicensingDetail.md +++ b/src/Users/v1.0/examples/Get-MgUserLicenseDetailTeamLicensingDetail.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Users + +Get-MgUserLicenseDetailTeamLicensingDetail -UserId $userId + +``` +This example shows how to use the Get-MgUserLicenseDetailTeamLicensingDetail Cmdlet. + diff --git a/src/Users/v1.0/examples/Invoke-MgViewUserSettingWorkHourAndLocationOccurrence.md b/src/Users/v1.0/examples/Invoke-MgViewUserSettingWorkHourAndLocationOccurrence.md index e69de29bb2..11789168d3 100644 --- a/src/Users/v1.0/examples/Invoke-MgViewUserSettingWorkHourAndLocationOccurrence.md +++ b/src/Users/v1.0/examples/Invoke-MgViewUserSettingWorkHourAndLocationOccurrence.md @@ -0,0 +1,12 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Users + +# A UPN can also be used as -UserId. +Invoke-MgViewUserSettingWorkHourAndLocationOccurrence -UserId $userId + +``` +This example shows how to use the Invoke-MgViewUserSettingWorkHourAndLocationOccurrence Cmdlet. + diff --git a/src/Users/v1.0/examples/Set-MgUserSettingWorkHourAndLocationOccurrenceCurrentLocation.md b/src/Users/v1.0/examples/Set-MgUserSettingWorkHourAndLocationOccurrenceCurrentLocation.md index e69de29bb2..1fde1591b9 100644 --- a/src/Users/v1.0/examples/Set-MgUserSettingWorkHourAndLocationOccurrenceCurrentLocation.md +++ b/src/Users/v1.0/examples/Set-MgUserSettingWorkHourAndLocationOccurrenceCurrentLocation.md @@ -0,0 +1,35 @@ +### Example 1: Set the current location to office + +```powershell + +Import-Module Microsoft.Graph.Users + +$params = @{ + updateScope = "currentDay" + workLocationType = "office" + placeId = "12345678-1234-1234-1234-123456789012" +} + +# A UPN can also be used as -UserId. +Set-MgUserSettingWorkHourAndLocationOccurrenceCurrentLocation -UserId $userId -BodyParameter $params + +``` +This example will set the current location to office + +### Example 2: Set current location to remote + +```powershell + +Import-Module Microsoft.Graph.Users + +$params = @{ + updateScope = "currentSegment" + workLocationType = "remote" +} + +# A UPN can also be used as -UserId. +Set-MgUserSettingWorkHourAndLocationOccurrenceCurrentLocation -UserId $userId -BodyParameter $params + +``` +This example will set current location to remote +