-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2676 from microsoftgraph/WeeklyExamplesUpdate/202…
…404120305 [v2] Examples Update
- Loading branch information
Showing
10 changed files
with
148 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
### Example 1: Using the Get-MgBetaSearchAcronym Cmdlet | ||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Search | ||
Get-MgBetaSearchAcronym -AcronymId $acronymId | ||
``` | ||
This example shows how to use the Get-MgBetaSearchAcronym Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
### Example 2: Using the Get-MgBetaSearchAcronym Cmdlet | ||
### Example 1: Code snippet | ||
|
||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Search | ||
Get-MgBetaSearchAcronym | ||
``` | ||
This example shows how to use the Get-MgBetaSearchAcronym Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
### Example 1: Using the Get-MgBetaSearchBookmark Cmdlet | ||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Search | ||
Get-MgBetaSearchBookmark -BookmarkId $bookmarkId | ||
``` | ||
This example shows how to use the Get-MgBetaSearchBookmark Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
### Example 2: Using the Get-MgBetaSearchBookmark Cmdlet | ||
### Example 1: Code snippet | ||
|
||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Search | ||
Get-MgBetaSearchBookmark | ||
``` | ||
This example shows how to use the Get-MgBetaSearchBookmark Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
### Example 1: Using the Get-MgBetaSearchQna Cmdlet | ||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Search | ||
Get-MgBetaSearchQna -QnaId $qnaId | ||
``` | ||
This example shows how to use the Get-MgBetaSearchQna Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
### Example 2: Using the Get-MgBetaSearchQna Cmdlet | ||
### Example 1: Code snippet | ||
|
||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Search | ||
Get-MgBetaSearchQna | ||
``` | ||
This example shows how to use the Get-MgBetaSearchQna Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
### Example 1: Using the New-MgBetaSearchAcronym Cmdlet | ||
### Example 1: Code snippet | ||
|
||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Search | ||
$params = @{ | ||
DisplayName = "DNN" | ||
StandsFor = "Deep Neural Network" | ||
Description = "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers." | ||
WebUrl = "http://microsoft.com/deep-neural-network" | ||
State = "draft" | ||
displayName = "DNN" | ||
standsFor = "Deep Neural Network" | ||
description = "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers." | ||
webUrl = "http://microsoft.com/deep-neural-network" | ||
state = "draft" | ||
} | ||
New-MgBetaSearchAcronym -BodyParameter $params | ||
``` | ||
This example shows how to use the New-MgBetaSearchAcronym Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,40 @@ | ||
### Example 1: Using the New-MgBetaSearchBookmark Cmdlet | ||
### Example 1: Code snippet | ||
|
||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Search | ||
$params = @{ | ||
DisplayName = "Contoso Install Site" | ||
WebUrl = "http://www.contoso.com/" | ||
Description = "Try or buy Contoso for Home or Business and view product information" | ||
Keywords = @{ | ||
Keywords = @( | ||
"Contoso" | ||
"install" | ||
) | ||
ReservedKeywords = @( | ||
"Contoso" | ||
) | ||
MatchSimilarKeywords = $true | ||
} | ||
AvailabilityStartDateTime = $null | ||
AvailabilityEndDateTime = $null | ||
Platforms = @( | ||
"windows" | ||
) | ||
TargetedVariations = @( | ||
@{ | ||
LanguageTag = "es-es" | ||
DisplayName = "Sitio de instalación Contoso" | ||
Description = "Pruebe o compre Contoso hogar o negocios y vea la información del producto" | ||
} | ||
) | ||
State = "published" | ||
displayName = "Contoso Install Site" | ||
webUrl = "http://www.contoso.com/" | ||
description = "Try or buy Contoso for Home or Business and view product information" | ||
keywords = @{ | ||
keywords = @( | ||
"Contoso" | ||
"install" | ||
) | ||
reservedKeywords = @( | ||
"Contoso" | ||
) | ||
matchSimilarKeywords = $true | ||
} | ||
availabilityStartDateTime = $null | ||
availabilityEndDateTime = $null | ||
platforms = @( | ||
"windows" | ||
) | ||
targetedVariations = @( | ||
@{ | ||
languageTag = "es-es" | ||
displayName = "Sitio de instalación Contoso" | ||
description = "Pruebe o compre Contoso hogar o negocios y vea la información del producto" | ||
} | ||
) | ||
state = "published" | ||
} | ||
New-MgBetaSearchBookmark -BodyParameter $params | ||
``` | ||
This example shows how to use the New-MgBetaSearchBookmark Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,43 @@ | ||
### Example 1: Using the New-MgBetaSearchQna Cmdlet | ||
### Example 1: Code snippet | ||
|
||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Search | ||
$params = @{ | ||
DisplayName = "Global Country Holidays" | ||
WebUrl = "http://www.contoso.com/" | ||
Description = "The dates that Contoso offices will be closed to observe holidays. These dates may differ from the actual date of the holiday in cases where the holiday falls on a weekend. <table> <thead> <tr> <td><strong>2021 Dates</strong></td> <td><strong>Holiday</strong></td> </tr> </thead> <tbody> <tr> <td>January 1, 2021</td> <td>New Year's Day</td> </tr> <tr> <td>January 18, 2021</td> <td>Martin Luther King Day</td> </tr> <tr> <td>February 15, 2021</td> <td>Presidents Day</td> </tr> <tr> <td>May 31, 2021</td> <td>Memorial Day</td> </tr> <tr> <td>July 5, 2021</td> <td>Independence Day</td> </tr> <tr> <td>September 6, 2021</td> <td>Labor Day</td> </tr> <tr> <td>November 25, 2021 - November 26, 2021</td> <td>Thanksgiving Day and Day after Thanksgiving</td> </tr> <tr> <td>December 23, 2021 - December 24, 2021</td> <td>Christmas Eve and Christmas Day</td> </tr> </tbody> </table>" | ||
Keywords = @{ | ||
Keywords = @( | ||
"new years day" | ||
"martin luther king day" | ||
"presidents day" | ||
"memorial day" | ||
"independence day" | ||
"labor day" | ||
"thanksgiving" | ||
"christmas" | ||
) | ||
ReservedKeywords = @( | ||
"holidays" | ||
"paid days off" | ||
) | ||
MatchSimilarKeywords = $true | ||
} | ||
AvailabilityStartDateTime = [System.DateTime]::Parse("2020-09-21T20:01:37Z") | ||
AvailabilityEndDateTime = [System.DateTime]::Parse("2021-12-31T20:01:37Z") | ||
LanguageTags = @( | ||
"en-us" | ||
) | ||
Platforms = @( | ||
"ios" | ||
) | ||
State = "published" | ||
displayName = "Global Country Holidays" | ||
webUrl = "http://www.contoso.com/" | ||
description = "The dates that Contoso offices will be closed to observe holidays. These dates may differ from the actual date of the holiday in cases where the holiday falls on a weekend. <table> <thead> <tr> <td><strong>2021 Dates</strong></td> <td><strong>Holiday</strong></td> </tr> </thead> <tbody> <tr> <td>January 1, 2021</td> <td>New Year's Day</td> </tr> <tr> <td>January 18, 2021</td> <td>Martin Luther King Day</td> </tr> <tr> <td>February 15, 2021</td> <td>Presidents Day</td> </tr> <tr> <td>May 31, 2021</td> <td>Memorial Day</td> </tr> <tr> <td>July 5, 2021</td> <td>Independence Day</td> </tr> <tr> <td>September 6, 2021</td> <td>Labor Day</td> </tr> <tr> <td>November 25, 2021 - November 26, 2021</td> <td>Thanksgiving Day and Day after Thanksgiving</td> </tr> <tr> <td>December 23, 2021 - December 24, 2021</td> <td>Christmas Eve and Christmas Day</td> </tr> </tbody> </table>" | ||
keywords = @{ | ||
keywords = @( | ||
"new years day" | ||
"martin luther king day" | ||
"presidents day" | ||
"memorial day" | ||
"independence day" | ||
"labor day" | ||
"thanksgiving" | ||
"christmas" | ||
) | ||
reservedKeywords = @( | ||
"holidays" | ||
"paid days off" | ||
) | ||
matchSimilarKeywords = $true | ||
} | ||
availabilityStartDateTime = [System.DateTime]::Parse("2020-09-21T20:01:37Z") | ||
availabilityEndDateTime = [System.DateTime]::Parse("2021-12-31T20:01:37Z") | ||
languageTags = @( | ||
"en-us" | ||
) | ||
platforms = @( | ||
"ios" | ||
) | ||
state = "published" | ||
} | ||
New-MgBetaSearchQna -BodyParameter $params | ||
``` | ||
This example shows how to use the New-MgBetaSearchQna Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
|
15 changes: 6 additions & 9 deletions
15
src/Security/beta/examples/Get-MgBetaSecurityLabelRetentionLabel.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
### Example 1: Using the Get-MgBetaSecurityLabelRetentionLabel Cmdlet | ||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Security | ||
Get-MgBetaSecurityLabelRetentionLabel -RetentionLabelId $retentionLabelId | ||
``` | ||
This example shows how to use the Get-MgBetaSecurityLabelRetentionLabel Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
### Example 2: Using the Get-MgBetaSecurityLabelRetentionLabel Cmdlet | ||
### Example 1: Code snippet | ||
|
||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Security | ||
Get-MgBetaSecurityLabelRetentionLabel | ||
``` | ||
This example shows how to use the Get-MgBetaSecurityLabelRetentionLabel Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
|
38 changes: 25 additions & 13 deletions
38
src/Security/beta/examples/New-MgBetaSecurityLabelRetentionLabel.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,37 @@ | ||
### Example 1: Using the New-MgBetaSecurityLabelRetentionLabel Cmdlet | ||
### Example 1: Code snippet | ||
|
||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Security | ||
$params = @{ | ||
"@odata.type" = "#microsoft.graph.security.retentionLabel" | ||
DisplayName = "String" | ||
BehaviorDuringRetentionPeriod = "String" | ||
ActionAfterRetentionPeriod = "String" | ||
RetentionTrigger = "String" | ||
RetentionDuration = @{ | ||
displayName = "String" | ||
behaviorDuringRetentionPeriod = "String" | ||
actionAfterRetentionPeriod = "String" | ||
retentionTrigger = "String" | ||
retentionDuration = @{ | ||
"@odata.type" = "microsoft.graph.security.retentionDuration" | ||
} | ||
IsInUse = "Boolean" | ||
DescriptionForAdmins = "String" | ||
DescriptionForUsers = "String" | ||
CreatedBy = @{ | ||
isInUse = "Boolean" | ||
descriptionForAdmins = "String" | ||
descriptionForUsers = "String" | ||
createdBy = @{ | ||
"@odata.type" = "microsoft.graph.identitySet" | ||
} | ||
LabelToBeApplied = "String" | ||
DefaultRecordBehavior = "String" | ||
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')" | ||
} | ||
} | ||
New-MgBetaSecurityLabelRetentionLabel -BodyParameter $params | ||
``` | ||
This example shows how to use the New-MgBetaSecurityLabelRetentionLabel Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
|
8 changes: 6 additions & 2 deletions
8
src/Security/beta/examples/Remove-MgBetaSecurityLabelRetentionLabel.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
### Example 1: Using the Remove-MgBetaSecurityLabelRetentionLabel Cmdlet | ||
### Example 1: Code snippet | ||
|
||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Security | ||
Remove-MgBetaSecurityLabelRetentionLabel -RetentionLabelId $retentionLabelId | ||
``` | ||
This example shows how to use the Remove-MgBetaSecurityLabelRetentionLabel Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
|
27 changes: 12 additions & 15 deletions
27
src/Security/beta/examples/Update-MgBetaSecurityLabelRetentionLabel.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
### Example 1: Using the Update-MgBetaSecurityLabelRetentionLabel Cmdlet | ||
### Example 1: Code snippet | ||
|
||
```powershell | ||
Import-Module Microsoft.Graph.Beta.Security | ||
$params = @{ | ||
"@odata.type" = "#microsoft.graph.security.retentionLabel" | ||
DisplayName = "String" | ||
BehaviorDuringRetentionPeriod = "String" | ||
ActionAfterRetentionPeriod = "String" | ||
RetentionTrigger = "String" | ||
RetentionDuration = @{ | ||
retentionDuration = @{ | ||
"@odata.type" = "microsoft.graph.security.retentionDuration" | ||
} | ||
IsInUse = "Boolean" | ||
DescriptionForAdmins = "String" | ||
DescriptionForUsers = "String" | ||
CreatedBy = @{ | ||
"@odata.type" = "microsoft.graph.identitySet" | ||
} | ||
LabelToBeApplied = "String" | ||
DefaultRecordBehavior = "String" | ||
descriptionForAdmins = "String" | ||
descriptionForUsers = "String" | ||
labelToBeApplied = "String" | ||
defaultRecordBehavior = "String" | ||
} | ||
Update-MgBetaSecurityLabelRetentionLabel -RetentionLabelId $retentionLabelId -BodyParameter $params | ||
``` | ||
This example shows how to use the Update-MgBetaSecurityLabelRetentionLabel Cmdlet. | ||
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). | ||
|