Skip to content

Commit 7e13e5e

Browse files
authored
Merge pull request #2987 from microsoftgraph/WeeklyExamplesUpdate/202410040310
[v2] Examples Update
2 parents b685838 + 962d256 commit 7e13e5e

File tree

82 files changed

+930
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+930
-169
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Applications
6+
7+
Get-MgBetaServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId
8+
9+
```
10+
This example will### example
11+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Applications
6+
7+
$params = @{
8+
"@odata.type" = "#microsoft.graph.customClaimsPolicy"
9+
includeBasicClaimSet = "Boolean"
10+
includeApplicationIdInIssuer = "Boolean"
11+
audienceOverride = "String"
12+
claims = @(
13+
@{
14+
"@odata.type" = "microsoft.graph.customClaim"
15+
}
16+
)
17+
}
18+
19+
Set-MgBetaServicePrincipalClaimPolicy -ServicePrincipalId $servicePrincipalId -BodyParameter $params
20+
21+
```
22+
This example shows how to use the Set-MgBetaServicePrincipalClaimPolicy Cmdlet.
23+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Applications
6+
7+
Get-MgServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId
8+
9+
```
10+
This example will### example
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Bookings
6+
7+
New-MgBetaApproval
8+
9+
```
10+
This example shows how to use the New-MgBetaApproval Cmdlet.
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Bookings
6+
7+
Stop-MgBetaApprovalItem -ApprovalItemId $approvalItemId
8+
9+
```
10+
This example shows how to use the Stop-MgBetaApprovalItem Cmdlet.
11+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
### Example 1: Activate an inactive protection policy
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Bookings
6+
7+
Initialize-MgBackupRestoreProtectionPolicy -ProtectionPolicyBaseId $protectionPolicyBaseId
8+
9+
```
10+
This example will activate an inactive protection policy
11+
12+
### Example 2: Activate an active protection policy
13+
14+
```powershell
15+
16+
Import-Module Microsoft.Graph.Bookings
17+
18+
Initialize-MgBackupRestoreProtectionPolicy -ProtectionPolicyBaseId $protectionPolicyBaseId
19+
20+
```
21+
This example will activate an active protection policy
22+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Bookings
6+
7+
$params = @{
8+
effectiveDateTime = [System.DateTime]::Parse("2024-04-19T12:01:03.45Z")
9+
}
10+
11+
Initialize-MgBackupRestoreServiceApp -ServiceAppId $serviceAppId -BodyParameter $params
12+
13+
```
14+
This example shows how to use the Initialize-MgBackupRestoreServiceApp Cmdlet.
15+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Bookings
6+
7+
Initialize-MgBackupRestoreSession -RestoreSessionBaseId $restoreSessionBaseId
8+
9+
```
10+
This example shows how to use the Initialize-MgBackupRestoreSession Cmdlet.
11+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
### Example 1: Deactivate an active protection policy
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Bookings
6+
7+
Invoke-MgDeactivateSolutionBackupRestoreProtectionPolicy -ProtectionPolicyBaseId $protectionPolicyBaseId
8+
9+
```
10+
This example will deactivate an active protection policy
11+
12+
### Example 2 : Deactivate a protection policy in updating state
13+
14+
```powershell
15+
16+
Import-Module Microsoft.Graph.Bookings
17+
18+
Invoke-MgDeactivateSolutionBackupRestoreProtectionPolicy -ProtectionPolicyBaseId $protectionPolicyBaseId
19+
20+
```
21+
This example will### example 2 : deactivate a protection policy in updating state
22+

0 commit comments

Comments
 (0)