Skip to content

Commit c9891c2

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
Updating examples
1 parent 26d47a6 commit c9891c2

20 files changed

+402
-1080
lines changed

src/Groups/beta/examples/New-MgBetaGroupConversation.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
1-
### Example 1: {{ Add title here }}
2-
```powershell
3-
PS C:\> {{ Add code here }}
1+
### Example 1: Code snippet
42

5-
{{ Add output here }}
6-
```
3+
```powershellImport-Module Microsoft.Graph.Beta.Groups
74

8-
{{ Add description here }}
5+
$params = @{
6+
topic = "Take your wellness days and rest"
7+
threads = @(
8+
@{
9+
posts = @(
10+
@{
11+
body = @{
12+
contentType = "html"
13+
content = "Contoso cares about you: Rest and Recharge"
14+
}
15+
newParticipants = @(
16+
@{
17+
emailAddress = @{
18+
name = "Adele Vance"
19+
address = "[email protected]"
20+
}
21+
}
22+
)
23+
}
24+
)
25+
}
26+
)
27+
}
928

10-
### Example 2: {{ Add title here }}
11-
```powershell
12-
PS C:\> {{ Add code here }}
13-
14-
{{ Add output here }}
15-
```
16-
17-
{{ Add description here }}
29+
New-MgBetaGroupConversation -GroupId $groupId -BodyParameter $params
30+
```
31+
This example shows how to use the New-MgBetaGroupConversation Cmdlet.
32+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
33+

src/Groups/v1.0/examples/New-MgGroupConversation.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
1-
### Example 1: {{ Add title here }}
2-
```powershell
3-
PS C:\> {{ Add code here }}
1+
### Example 1: Code snippet
42

5-
{{ Add output here }}
6-
```
3+
```powershellImport-Module Microsoft.Graph.Groups
74

8-
{{ Add description here }}
5+
$params = @{
6+
topic = "Take your wellness days and rest"
7+
threads = @(
8+
@{
9+
posts = @(
10+
@{
11+
body = @{
12+
contentType = "html"
13+
content = "Contoso cares about you: Rest and Recharge"
14+
}
15+
newParticipants = @(
16+
@{
17+
emailAddress = @{
18+
name = "Adele Vance"
19+
address = "[email protected]"
20+
}
21+
}
22+
)
23+
}
24+
)
25+
}
26+
)
27+
}
928

10-
### Example 2: {{ Add title here }}
11-
```powershell
12-
PS C:\> {{ Add code here }}
13-
14-
{{ Add output here }}
15-
```
16-
17-
{{ Add description here }}
29+
New-MgGroupConversation -GroupId $groupId -BodyParameter $params
30+
```
31+
This example shows how to use the New-MgGroupConversation Cmdlet.
32+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
33+
Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,36 @@
1-
### Example 1
1+
### Example 1: Code snippet
22

3-
```powershellImport-Module Microsoft.Graph.Beta.Mail
3+
```powershell
4+
Import-Module Microsoft.Graph.Beta.Mail
45
56
# A UPN can also be used as -UserId.
6-
Get-MgBetaUserMessage -UserId $userId -MessageId $messageId
7-
```
8-
This example shows how to use the Get-MgBetaUserMessage Cmdlet.
9-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
10-
11-
### Example 2
7+
Get-MgBetaUserMessageExtension -UserId $userId -MessageId $messageId -ExtensionId $extensionId
8+
```
9+
This example shows how to use the Get-MgBetaUserMessage Cmdlet.
1210

13-
```powershellImport-Module Microsoft.Graph.Beta.Mail
11+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
12+
13+
### Example 2: Code snippet
14+
15+
```powershell
16+
Import-Module Microsoft.Graph.Beta.Mail
1417
1518
# A UPN can also be used as -UserId.
16-
Get-MgBetaUserMessage -UserId $userId -MessageId $messageId -ExpandProperty "microsoft.graph.eventMessage/event"
17-
```
18-
This example shows how to use the Get-MgBetaUserMessage Cmdlet.
19-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
20-
19+
Get-MgBetaUserMessage -UserId $userId -MessageId $messageId -ExpandProperty "extensions(`$filter=id eq 'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')"
20+
```
21+
This example shows how to use the Get-MgBetaUserMessage Cmdlet.
22+
23+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
24+
25+
### Example 3: Code snippet
26+
27+
```powershell
28+
Import-Module Microsoft.Graph.Beta.Mail
29+
30+
# A UPN can also be used as -UserId.
31+
Get-MgBetaUserMessage -UserId $userId -Filter "Extensions/any(f:f/id eq 'Com.Contoso.Referral')" -ExpandProperty "Extensions(`$filter=id eq 'Com.Contoso.Referral')"
32+
```
33+
This example shows how to use the Get-MgBetaUserMessage Cmdlet.
34+
35+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
36+

src/Mail/beta/examples/New-MgBetaUserMessage.md

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,61 @@
1-
### Example 1: {{ Add title here }}
2-
```powershell
3-
PS C:\> {{ Add code here }}
1+
### Example 1: Code snippet
42

5-
{{ Add output here }}
6-
```
3+
```powershellImport-Module Microsoft.Graph.Beta.Mail
74

8-
{{ Add description here }}
5+
$params = @{
6+
subject = "Did you see last night's game?"
7+
importance = "Low"
8+
body = @{
9+
contentType = "HTML"
10+
content = "They were <b>awesome</b>!"
11+
}
12+
toRecipients = @(
13+
@{
14+
emailAddress = @{
15+
address = "[email protected]"
16+
}
17+
}
18+
)
19+
}
920

10-
### Example 2: {{ Add title here }}
11-
```powershell
12-
PS C:\> {{ Add code here }}
21+
# A UPN can also be used as -UserId.
22+
New-MgBetaUserMessage -UserId $userId -BodyParameter $params
23+
```
24+
This example shows how to use the New-MgBetaUserMessage Cmdlet.
25+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
26+
27+
### Example 2: Code snippet
1328
14-
{{ Add output here }}
15-
```
29+
```powershellImport-Module Microsoft.Graph.Beta.Mail
1630
17-
{{ Add description here }}
31+
$params = @{
32+
subject = "9/8/2018: concert"
33+
body = @{
34+
contentType = "HTML"
35+
content = "The group represents Washington."
36+
}
37+
toRecipients = @(
38+
@{
39+
emailAddress = @{
40+
address = "[email protected]"
41+
}
42+
}
43+
)
44+
internetMessageHeaders = @(
45+
@{
46+
name = "x-custom-header-group-name"
47+
value = "Washington"
48+
}
49+
@{
50+
name = "x-custom-header-group-id"
51+
value = "WA001"
52+
}
53+
)
54+
}
55+
56+
# A UPN can also be used as -UserId.
57+
New-MgBetaUserMessage -UserId $userId -BodyParameter $params
58+
```
59+
This example shows how to use the New-MgBetaUserMessage Cmdlet.
60+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
61+

src/Mail/beta/examples/Update-MgBetaUserMailFolder.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
```powershellImport-Module Microsoft.Graph.Beta.Mail
44

55
$params = @{
6-
displayName = "displayName-value"
6+
"@odata.type" = "microsoft.graph.mailSearchFolder"
7+
filterQuery = "contains(subject, 'Analytics')"
78
}
89

910
# A UPN can also be used as -UserId.
Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,36 @@
1-
### Example 1
1+
### Example 1: Code snippet
22

3-
```powershellImport-Module Microsoft.Graph.Mail
3+
```powershell
4+
Import-Module Microsoft.Graph.Mail
45
56
# A UPN can also be used as -UserId.
6-
Get-MgUserMessage -UserId $userId -MessageId $messageId
7-
```
8-
This example shows how to use the Get-MgUserMessage Cmdlet.
9-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
10-
11-
### Example 2
7+
Get-MgUserMessageExtension -UserId $userId -MessageId $messageId -ExtensionId $extensionId
8+
```
9+
This example shows how to use the Get-MgUserMessage Cmdlet.
1210

13-
```powershellImport-Module Microsoft.Graph.Mail
11+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
12+
13+
### Example 2: Code snippet
14+
15+
```powershell
16+
Import-Module Microsoft.Graph.Mail
1417
1518
# A UPN can also be used as -UserId.
16-
Get-MgUserMessage -UserId $userId -MessageId $messageId -ExpandProperty "microsoft.graph.eventMessage/event"
17-
```
18-
This example shows how to use the Get-MgUserMessage Cmdlet.
19-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
20-
19+
Get-MgUserMessage -UserId $userId -MessageId $messageId -ExpandProperty "extensions(`$filter=id eq 'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')"
20+
```
21+
This example shows how to use the Get-MgUserMessage Cmdlet.
22+
23+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
24+
25+
### Example 3: Code snippet
26+
27+
```powershell
28+
Import-Module Microsoft.Graph.Mail
29+
30+
# A UPN can also be used as -UserId.
31+
Get-MgUserMessage -UserId $userId -Filter "Extensions/any(f:f/id eq 'Com.Contoso.Referral')" -ExpandProperty "Extensions(`$filter=id eq 'Com.Contoso.Referral')"
32+
```
33+
This example shows how to use the Get-MgUserMessage Cmdlet.
34+
35+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
36+

src/Mail/v1.0/examples/New-MgUserMessage.md

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,61 @@
1-
### Example 1: {{ Add title here }}
2-
```powershell
3-
PS C:\> {{ Add code here }}
1+
### Example 1: Code snippet
42

5-
{{ Add output here }}
6-
```
3+
```powershellImport-Module Microsoft.Graph.Mail
74

8-
{{ Add description here }}
5+
$params = @{
6+
subject = "Did you see last night's game?"
7+
importance = "Low"
8+
body = @{
9+
contentType = "HTML"
10+
content = "They were <b>awesome</b>!"
11+
}
12+
toRecipients = @(
13+
@{
14+
emailAddress = @{
15+
address = "[email protected]"
16+
}
17+
}
18+
)
19+
}
920

10-
### Example 2: {{ Add title here }}
11-
```powershell
12-
PS C:\> {{ Add code here }}
21+
# A UPN can also be used as -UserId.
22+
New-MgUserMessage -UserId $userId -BodyParameter $params
23+
```
24+
This example shows how to use the New-MgUserMessage Cmdlet.
25+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
26+
27+
### Example 2: Code snippet
1328
14-
{{ Add output here }}
15-
```
29+
```powershellImport-Module Microsoft.Graph.Mail
1630
17-
{{ Add description here }}
31+
$params = @{
32+
subject = "9/8/2018: concert"
33+
body = @{
34+
contentType = "HTML"
35+
content = "The group represents Washington."
36+
}
37+
toRecipients = @(
38+
@{
39+
emailAddress = @{
40+
address = "[email protected]"
41+
}
42+
}
43+
)
44+
internetMessageHeaders = @(
45+
@{
46+
name = "x-custom-header-group-name"
47+
value = "Washington"
48+
}
49+
@{
50+
name = "x-custom-header-group-id"
51+
value = "WA001"
52+
}
53+
)
54+
}
55+
56+
# A UPN can also be used as -UserId.
57+
New-MgUserMessage -UserId $userId -BodyParameter $params
58+
```
59+
This example shows how to use the New-MgUserMessage Cmdlet.
60+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
61+

src/Mail/v1.0/examples/Update-MgUserMailFolder.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
```powershellImport-Module Microsoft.Graph.Mail
44

55
$params = @{
6-
displayName = "displayName-value"
6+
"@odata.type" = "microsoft.graph.mailSearchFolder"
7+
filterQuery = "contains(subject, 'Analytics')"
78
}
89

910
# A UPN can also be used as -UserId.
Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
### Example 1: Code snippet
1+
### Example 1: {{ Add title here }}
2+
```powershell
3+
PS C:\> {{ Add code here }}
24
3-
```powershellImport-Module Microsoft.Graph.Beta.Security
5+
{{ Add output here }}
6+
```
47

5-
Get-MgBetaSecurityAlert -AlertId $alertId
6-
```
7-
This example shows how to use the Get-MgBetaSecurityAlert Cmdlet.
8-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
9-
8+
{{ Add description here }}
9+
10+
### Example 2: {{ Add title here }}
11+
```powershell
12+
PS C:\> {{ Add code here }}
13+
14+
{{ Add output here }}
15+
```
16+
17+
{{ Add description here }}

0 commit comments

Comments
 (0)