Skip to content

Commit db6dcf3

Browse files
authored
Merge pull request #2676 from microsoftgraph/WeeklyExamplesUpdate/202404120305
[v2] Examples Update
2 parents 6807b32 + 6836655 commit db6dcf3

10 files changed

+148
-132
lines changed
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
### Example 1: Using the Get-MgBetaSearchAcronym Cmdlet
2-
```powershell
3-
Import-Module Microsoft.Graph.Beta.Search
4-
Get-MgBetaSearchAcronym -AcronymId $acronymId
5-
```
6-
This example shows how to use the Get-MgBetaSearchAcronym Cmdlet.
7-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
8-
### Example 2: Using the Get-MgBetaSearchAcronym Cmdlet
1+
### Example 1: Code snippet
2+
93
```powershell
4+
105
Import-Module Microsoft.Graph.Beta.Search
6+
117
Get-MgBetaSearchAcronym
8+
129
```
1310
This example shows how to use the Get-MgBetaSearchAcronym Cmdlet.
14-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11+
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
### Example 1: Using the Get-MgBetaSearchBookmark Cmdlet
2-
```powershell
3-
Import-Module Microsoft.Graph.Beta.Search
4-
Get-MgBetaSearchBookmark -BookmarkId $bookmarkId
5-
```
6-
This example shows how to use the Get-MgBetaSearchBookmark Cmdlet.
7-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
8-
### Example 2: Using the Get-MgBetaSearchBookmark Cmdlet
1+
### Example 1: Code snippet
2+
93
```powershell
4+
105
Import-Module Microsoft.Graph.Beta.Search
6+
117
Get-MgBetaSearchBookmark
8+
129
```
1310
This example shows how to use the Get-MgBetaSearchBookmark Cmdlet.
14-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11+
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
### Example 1: Using the Get-MgBetaSearchQna Cmdlet
2-
```powershell
3-
Import-Module Microsoft.Graph.Beta.Search
4-
Get-MgBetaSearchQna -QnaId $qnaId
5-
```
6-
This example shows how to use the Get-MgBetaSearchQna Cmdlet.
7-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
8-
### Example 2: Using the Get-MgBetaSearchQna Cmdlet
1+
### Example 1: Code snippet
2+
93
```powershell
4+
105
Import-Module Microsoft.Graph.Beta.Search
6+
117
Get-MgBetaSearchQna
8+
129
```
1310
This example shows how to use the Get-MgBetaSearchQna Cmdlet.
14-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11+
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
### Example 1: Using the New-MgBetaSearchAcronym Cmdlet
1+
### Example 1: Code snippet
2+
23
```powershell
4+
35
Import-Module Microsoft.Graph.Beta.Search
6+
47
$params = @{
5-
DisplayName = "DNN"
6-
StandsFor = "Deep Neural Network"
7-
Description = "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers."
8-
WebUrl = "http://microsoft.com/deep-neural-network"
9-
State = "draft"
8+
displayName = "DNN"
9+
standsFor = "Deep Neural Network"
10+
description = "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers."
11+
webUrl = "http://microsoft.com/deep-neural-network"
12+
state = "draft"
1013
}
14+
1115
New-MgBetaSearchAcronym -BodyParameter $params
16+
1217
```
1318
This example shows how to use the New-MgBetaSearchAcronym Cmdlet.
14-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
19+
Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
1-
### Example 1: Using the New-MgBetaSearchBookmark Cmdlet
1+
### Example 1: Code snippet
2+
23
```powershell
4+
35
Import-Module Microsoft.Graph.Beta.Search
6+
47
$params = @{
5-
DisplayName = "Contoso Install Site"
6-
WebUrl = "http://www.contoso.com/"
7-
Description = "Try or buy Contoso for Home or Business and view product information"
8-
Keywords = @{
9-
Keywords = @(
10-
"Contoso"
11-
"install"
12-
)
13-
ReservedKeywords = @(
14-
"Contoso"
15-
)
16-
MatchSimilarKeywords = $true
17-
}
18-
AvailabilityStartDateTime = $null
19-
AvailabilityEndDateTime = $null
20-
Platforms = @(
21-
"windows"
22-
)
23-
TargetedVariations = @(
24-
@{
25-
LanguageTag = "es-es"
26-
DisplayName = "Sitio de instalación Contoso"
27-
Description = "Pruebe o compre Contoso hogar o negocios y vea la información del producto"
28-
}
29-
)
30-
State = "published"
8+
displayName = "Contoso Install Site"
9+
webUrl = "http://www.contoso.com/"
10+
description = "Try or buy Contoso for Home or Business and view product information"
11+
keywords = @{
12+
keywords = @(
13+
"Contoso"
14+
"install"
15+
)
16+
reservedKeywords = @(
17+
"Contoso"
18+
)
19+
matchSimilarKeywords = $true
3120
}
21+
availabilityStartDateTime = $null
22+
availabilityEndDateTime = $null
23+
platforms = @(
24+
"windows"
25+
)
26+
targetedVariations = @(
27+
@{
28+
languageTag = "es-es"
29+
displayName = "Sitio de instalación Contoso"
30+
description = "Pruebe o compre Contoso hogar o negocios y vea la información del producto"
31+
}
32+
)
33+
state = "published"
34+
}
35+
3236
New-MgBetaSearchBookmark -BodyParameter $params
37+
3338
```
3439
This example shows how to use the New-MgBetaSearchBookmark Cmdlet.
35-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
40+
Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,43 @@
1-
### Example 1: Using the New-MgBetaSearchQna Cmdlet
1+
### Example 1: Code snippet
2+
23
```powershell
4+
35
Import-Module Microsoft.Graph.Beta.Search
6+
47
$params = @{
5-
DisplayName = "Global Country Holidays"
6-
WebUrl = "http://www.contoso.com/"
7-
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 wee​kend. <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>"
8-
Keywords = @{
9-
Keywords = @(
10-
"new years day"
11-
"martin luther king day"
12-
"presidents day"
13-
"memorial day"
14-
"independence day"
15-
"labor day"
16-
"thanksgiving"
17-
"christmas"
18-
)
19-
ReservedKeywords = @(
20-
"holidays"
21-
"paid days off"
22-
)
23-
MatchSimilarKeywords = $true
24-
}
25-
AvailabilityStartDateTime = [System.DateTime]::Parse("2020-09-21T20:01:37Z")
26-
AvailabilityEndDateTime = [System.DateTime]::Parse("2021-12-31T20:01:37Z")
27-
LanguageTags = @(
28-
"en-us"
29-
)
30-
Platforms = @(
31-
"ios"
32-
)
33-
State = "published"
8+
displayName = "Global Country Holidays"
9+
webUrl = "http://www.contoso.com/"
10+
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>"
11+
keywords = @{
12+
keywords = @(
13+
"new years day"
14+
"martin luther king day"
15+
"presidents day"
16+
"memorial day"
17+
"independence day"
18+
"labor day"
19+
"thanksgiving"
20+
"christmas"
21+
)
22+
reservedKeywords = @(
23+
"holidays"
24+
"paid days off"
25+
)
26+
matchSimilarKeywords = $true
3427
}
28+
availabilityStartDateTime = [System.DateTime]::Parse("2020-09-21T20:01:37Z")
29+
availabilityEndDateTime = [System.DateTime]::Parse("2021-12-31T20:01:37Z")
30+
languageTags = @(
31+
"en-us"
32+
)
33+
platforms = @(
34+
"ios"
35+
)
36+
state = "published"
37+
}
38+
3539
New-MgBetaSearchQna -BodyParameter $params
40+
3641
```
3742
This example shows how to use the New-MgBetaSearchQna Cmdlet.
38-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
43+
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
### Example 1: Using the Get-MgBetaSecurityLabelRetentionLabel Cmdlet
2-
```powershell
3-
Import-Module Microsoft.Graph.Beta.Security
4-
Get-MgBetaSecurityLabelRetentionLabel -RetentionLabelId $retentionLabelId
5-
```
6-
This example shows how to use the Get-MgBetaSecurityLabelRetentionLabel Cmdlet.
7-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
8-
### Example 2: Using the Get-MgBetaSecurityLabelRetentionLabel Cmdlet
1+
### Example 1: Code snippet
2+
93
```powershell
4+
105
Import-Module Microsoft.Graph.Beta.Security
6+
117
Get-MgBetaSecurityLabelRetentionLabel
8+
129
```
1310
This example shows how to use the Get-MgBetaSecurityLabelRetentionLabel Cmdlet.
14-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11+
Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
1-
### Example 1: Using the New-MgBetaSecurityLabelRetentionLabel Cmdlet
1+
### Example 1: Code snippet
2+
23
```powershell
4+
35
Import-Module Microsoft.Graph.Beta.Security
6+
47
$params = @{
58
"@odata.type" = "#microsoft.graph.security.retentionLabel"
6-
DisplayName = "String"
7-
BehaviorDuringRetentionPeriod = "String"
8-
ActionAfterRetentionPeriod = "String"
9-
RetentionTrigger = "String"
10-
RetentionDuration = @{
9+
displayName = "String"
10+
behaviorDuringRetentionPeriod = "String"
11+
actionAfterRetentionPeriod = "String"
12+
retentionTrigger = "String"
13+
retentionDuration = @{
1114
"@odata.type" = "microsoft.graph.security.retentionDuration"
1215
}
13-
IsInUse = "Boolean"
14-
DescriptionForAdmins = "String"
15-
DescriptionForUsers = "String"
16-
CreatedBy = @{
16+
isInUse = "Boolean"
17+
descriptionForAdmins = "String"
18+
descriptionForUsers = "String"
19+
createdBy = @{
1720
"@odata.type" = "microsoft.graph.identitySet"
1821
}
19-
LabelToBeApplied = "String"
20-
DefaultRecordBehavior = "String"
22+
labelToBeApplied = "String"
23+
defaultRecordBehavior = "String"
24+
descriptors = @{
25+
"authorityTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/authorities('fie3f4fc-b966-4c40-94de-fb8a383658e4')"
26+
"categoryTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/categories('0bjk8-b966-4c40-94de-fb8a383658e4')"
27+
"citationTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/citations('0e23f4fc-b966-4c40-94de-fb8a383658e4')"
28+
"departmentTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/departments('p99ef4fc-b966-4c40-94de-fb8a383658e4')"
29+
"filePlanReferenceTemplate@odata.bind" = "https://graph.microsoft.com/beta/security/labels/filePlanReferences('e095f4fc-b966-4c40-94de-fb8a383658e4')"
30+
}
2131
}
32+
2233
New-MgBetaSecurityLabelRetentionLabel -BodyParameter $params
34+
2335
```
2436
This example shows how to use the New-MgBetaSecurityLabelRetentionLabel Cmdlet.
25-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
37+
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
### Example 1: Using the Remove-MgBetaSecurityLabelRetentionLabel Cmdlet
1+
### Example 1: Code snippet
2+
23
```powershell
4+
35
Import-Module Microsoft.Graph.Beta.Security
6+
47
Remove-MgBetaSecurityLabelRetentionLabel -RetentionLabelId $retentionLabelId
8+
59
```
610
This example shows how to use the Remove-MgBetaSecurityLabelRetentionLabel Cmdlet.
7-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
11+
Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
1-
### Example 1: Using the Update-MgBetaSecurityLabelRetentionLabel Cmdlet
1+
### Example 1: Code snippet
2+
23
```powershell
4+
35
Import-Module Microsoft.Graph.Beta.Security
6+
47
$params = @{
58
"@odata.type" = "#microsoft.graph.security.retentionLabel"
6-
DisplayName = "String"
7-
BehaviorDuringRetentionPeriod = "String"
8-
ActionAfterRetentionPeriod = "String"
9-
RetentionTrigger = "String"
10-
RetentionDuration = @{
9+
retentionDuration = @{
1110
"@odata.type" = "microsoft.graph.security.retentionDuration"
1211
}
13-
IsInUse = "Boolean"
14-
DescriptionForAdmins = "String"
15-
DescriptionForUsers = "String"
16-
CreatedBy = @{
17-
"@odata.type" = "microsoft.graph.identitySet"
18-
}
19-
LabelToBeApplied = "String"
20-
DefaultRecordBehavior = "String"
12+
descriptionForAdmins = "String"
13+
descriptionForUsers = "String"
14+
labelToBeApplied = "String"
15+
defaultRecordBehavior = "String"
2116
}
17+
2218
Update-MgBetaSecurityLabelRetentionLabel -RetentionLabelId $retentionLabelId -BodyParameter $params
19+
2320
```
2421
This example shows how to use the Update-MgBetaSecurityLabelRetentionLabel Cmdlet.
25-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
22+

0 commit comments

Comments
 (0)