Skip to content

Commit 87c2bb0

Browse files
authored
Merge pull request #2888 from microsoftgraph/WeeklyExamplesUpdate/202408020307
[v2] Examples Update
2 parents f6bca78 + 5334428 commit 87c2bb0

File tree

7 files changed

+90
-21
lines changed

7 files changed

+90
-21
lines changed
Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +0,0 @@
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-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.DeviceManagement.Actions
6+
7+
$params = @{
8+
filter = "DisasterRecoveryStatus eq 'Active outage'"
9+
select = @(
10+
"Id"
11+
"CloudPcId"
12+
"UserId"
13+
"UserSettingId"
14+
"DeviceId"
15+
"CloudPCDeviceDisplayName"
16+
"UserPrincipalName"
17+
"IsCrossRegionEnabled"
18+
"CrossRegionHealthStatus"
19+
"LicenseType"
20+
"DisasterRecoveryStatus"
21+
"CurrentRestorePointDateTime"
22+
"ActivationExpirationDateTime"
23+
)
24+
skip = 0
25+
top = 50
26+
}
27+
28+
Get-MgBetaDeviceManagementVirtualEndpointReportCrossRegionDisasterRecoveryReport -BodyParameter $params
29+
30+
```
31+
This example shows how to use the Get-MgBetaDeviceManagementVirtualEndpointReportCrossRegionDisasterRecoveryReport Cmdlet.
32+
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
### Example 1: Get a bundle and its children in a single call
1+
### Example 1: Get metadata about a shared driveItem object
22

33
```powershell
4+
45
Import-Module Microsoft.Graph.Beta.Files
56
6-
Get-MgBetaDriveItem -DriveId $driveId -DriveItemId $driveItemId -ExpandProperty "children"
7-
```
8-
This example shows how to use the Get-MgBetaDriveItem Cmdlet.
7+
Get-MgBetaDriveItem -DriveId $driveId -DriveItemId $driveItemId
98
10-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
9+
```
10+
This example will get metadata about a shared driveitem object
1111

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Example 1: Code snippet
1+
### Example 1: Verify a domain
22

33
```powershell
44
@@ -7,5 +7,20 @@ Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
77
Confirm-MgBetaDomain -DomainId $domainId
88
99
```
10-
This example shows how to use the Confirm-MgBetaDomain Cmdlet.
10+
This example will verify a domain
11+
12+
### Example 2: External admin takeover of a domain
13+
14+
```powershell
15+
16+
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
17+
18+
$params = @{
19+
forceTakeover = $true
20+
}
21+
22+
Confirm-MgBetaDomain -DomainId $domainId -BodyParameter $params
23+
24+
```
25+
This example will external admin takeover of a domain
1126

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.Identity.DirectoryManagement
6+
7+
Get-MgAdminPeopleItemInsight
8+
9+
```
10+
This example shows how to use the Get-MgAdminPeopleItemInsight Cmdlet.
11+
Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1-
### Example 1: Code snippet
1+
### Example 1: Retrieve an agreement
22

33
```powershell
44
55
Import-Module Microsoft.Graph.Beta.Identity.Governance
66
7-
Get-MgBetaIdentityGovernanceTermsOfUseAgreement
7+
Get-MgBetaIdentityGovernanceTermsOfUseAgreement -AgreementId $agreementId
88
99
```
10-
This example shows how to use the Get-MgBetaIdentityGovernanceTermsOfUseAgreement Cmdlet.
10+
This example will retrieve an agreement
11+
12+
### Example 2: Retrieve an agreement and its related files
13+
14+
```powershell
15+
16+
Import-Module Microsoft.Graph.Beta.Identity.Governance
17+
18+
Get-MgBetaIdentityGovernanceTermsOfUseAgreement -AgreementId $agreementId -ExpandProperty "files"
19+
20+
```
21+
This example will retrieve an agreement and its related files
1122

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.Security
6+
7+
Get-MgBetaSecurityThreatIntelligenceSslCertificateRelatedHost -SslCertificateId $sslCertificateId
8+
9+
```
10+
This example shows how to use the Get-MgBetaSecurityThreatIntelligenceSslCertificateRelatedHost Cmdlet.
11+

0 commit comments

Comments
 (0)