Skip to content

[v2] Examples Update #2888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +0,0 @@
### Example

```powershell
Import-Module Microsoft.Graph.Beta.Applications
Get-MgBetaServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId
```
This example will### example

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
### Example 1: Code snippet

```powershell
Import-Module Microsoft.Graph.Beta.DeviceManagement.Actions
$params = @{
filter = "DisasterRecoveryStatus eq 'Active outage'"
select = @(
"Id"
"CloudPcId"
"UserId"
"UserSettingId"
"DeviceId"
"CloudPCDeviceDisplayName"
"UserPrincipalName"
"IsCrossRegionEnabled"
"CrossRegionHealthStatus"
"LicenseType"
"DisasterRecoveryStatus"
"CurrentRestorePointDateTime"
"ActivationExpirationDateTime"
)
skip = 0
top = 50
}
Get-MgBetaDeviceManagementVirtualEndpointReportCrossRegionDisasterRecoveryReport -BodyParameter $params
```
This example shows how to use the Get-MgBetaDeviceManagementVirtualEndpointReportCrossRegionDisasterRecoveryReport Cmdlet.

10 changes: 5 additions & 5 deletions src/Files/beta/examples/Get-MgBetaDriveItem.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
### Example 1: Get a bundle and its children in a single call
### Example 1: Get metadata about a shared driveItem object

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

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Example 1: Code snippet
### Example 1: Verify a domain

```powershell
Expand All @@ -7,5 +7,20 @@ Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
Confirm-MgBetaDomain -DomainId $domainId
```
This example shows how to use the Confirm-MgBetaDomain Cmdlet.
This example will verify a domain

### Example 2: External admin takeover of a domain

```powershell
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
$params = @{
forceTakeover = $true
}
Confirm-MgBetaDomain -DomainId $domainId -BodyParameter $params
```
This example will external admin takeover of a domain

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell
Import-Module Microsoft.Graph.Identity.DirectoryManagement
Get-MgAdminPeopleItemInsight
```
This example shows how to use the Get-MgAdminPeopleItemInsight Cmdlet.

Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
### Example 1: Code snippet
### Example 1: Retrieve an agreement

```powershell
Import-Module Microsoft.Graph.Beta.Identity.Governance
Get-MgBetaIdentityGovernanceTermsOfUseAgreement
Get-MgBetaIdentityGovernanceTermsOfUseAgreement -AgreementId $agreementId
```
This example shows how to use the Get-MgBetaIdentityGovernanceTermsOfUseAgreement Cmdlet.
This example will retrieve an agreement

### Example 2: Retrieve an agreement and its related files

```powershell
Import-Module Microsoft.Graph.Beta.Identity.Governance
Get-MgBetaIdentityGovernanceTermsOfUseAgreement -AgreementId $agreementId -ExpandProperty "files"
```
This example will retrieve an agreement and its related files

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell
Import-Module Microsoft.Graph.Beta.Security
Get-MgBetaSecurityThreatIntelligenceSslCertificateRelatedHost -SslCertificateId $sslCertificateId
```
This example shows how to use the Get-MgBetaSecurityThreatIntelligenceSslCertificateRelatedHost Cmdlet.