Skip to content

Commit cdc4f05

Browse files
authored
Merge pull request #2125 from microsoftgraph/WeeklyExamplesUpdate/202307061205
[v2] Examples Update
2 parents d822e05 + f65112c commit cdc4f05

File tree

163 files changed

+1765
-1896
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+1765
-1896
lines changed

src/Applications/beta/examples/New-MgBetaApplicationAppManagementPolicyByRef.md

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

55
$params = @{
6-
"@odata.id" = "https://graph.microsoft.com/v1.0/policies/appManagementPolicies/{id}"
6+
"@odata.id" = "https://graph.microsoft.com/beta/policies/appManagementPolicies/{id}"
77
}
88

99
New-MgBetaApplicationAppManagementPolicyByRef -ApplicationId $applicationId -BodyParameter $params

src/Applications/beta/examples/New-MgBetaApplicationExtensionProperty.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
$params = @{
66
name = "jobGroup"
77
dataType = "String"
8+
isMultiValued = $true
89
targetObjects = @(
910
"User"
1011
)

src/Applications/beta/examples/New-MgBetaApplicationTokenIssuancePolicyByRef.md

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

55
$params = @{
6-
"@odata.id" = "https://graph.microsoft.com/v1.0/policies/tokenIssuancePolicies/cd3d9b57-0aee-4f25-8ee3-ac74ef5986a9"
6+
"@odata.id" = "https://graph.microsoft.com/beta/policies/tokenIssuancePolicies/cd3d9b57-0aee-4f25-8ee3-ac74ef5986a9"
77
}
88

99
New-MgBetaApplicationTokenIssuancePolicyByRef -ApplicationId $applicationId -BodyParameter $params

src/Applications/beta/examples/New-MgBetaApplicationTokenLifetimePolicyByRef.md

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

55
$params = @{
6-
"@odata.id" = "https://graph.microsoft.com/v1.0/policies/tokenLifetimePolicies/4d2f137b-e8a9-46da-a5c3-cc85b2b840a4"
6+
"@odata.id" = "https://graph.microsoft.com/beta/policies/tokenLifetimePolicies/4d2f137b-e8a9-46da-a5c3-cc85b2b840a4"
77
}
88

99
New-MgBetaApplicationTokenLifetimePolicyByRef -ApplicationId $applicationId -BodyParameter $params

src/Applications/beta/examples/New-MgBetaServicePrincipalClaimMappingPolicyByRef.md

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

55
$params = @{
6-
"@odata.id" = "https://graph.microsoft.com/v1.0/policies/claimsMappingPolicies/cd3d9b57-0aee-4f25-8ee3-ac74ef5986a9"
6+
"@odata.id" = "https://graph.microsoft.com/beta/policies/claimsMappingPolicies/cd3d9b57-0aee-4f25-8ee3-ac74ef5986a9"
77
}
88

99
New-MgBetaServicePrincipalClaimMappingPolicyByRef -ServicePrincipalId $servicePrincipalId -BodyParameter $params

src/Applications/beta/examples/New-MgBetaServicePrincipalHomeRealmDiscoveryPolicyByRef.md

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

55
$params = @{
6-
"@odata.id" = "https://graph.microsoft.com/v1.0/policies/homeRealmDiscoveryPolicies/cd3d9b57-0aee-4f25-8ee3-ac74ef5986a9"
6+
"@odata.id" = "https://graph.microsoft.com/beta/policies/homeRealmDiscoveryPolicies/6c6f154f-cb39-4ff9-bf5b-62d5ad585cde"
77
}
88

99
New-MgBetaServicePrincipalHomeRealmDiscoveryPolicyByRef -ServicePrincipalId $servicePrincipalId -BodyParameter $params

src/Calendar/beta/examples/Get-MgBetaUserEvent.md

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

33
```powershellImport-Module Microsoft.Graph.Beta.Calendar
44

@@ -8,7 +8,17 @@ Get-MgBetaUserEvent -UserId $userId -EventId $eventId -Property "subject,body,bo
88
This example shows how to use the Get-MgBetaUserEvent Cmdlet.
99
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
1010
11-
### Example 2: Code snippet
11+
### Example 2: Get the body property in text format
12+
13+
```powershellImport-Module Microsoft.Graph.Beta.Calendar
14+
15+
# A UPN can also be used as -UserId.
16+
Get-MgBetaUserEvent -UserId $userId -EventId $eventId -Property "subject,body,bodyPreview"
17+
```
18+
This example shows how to use the Get-MgBetaUserEvent Cmdlet.
19+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
20+
21+
### Example 3: Get an event that specifies more than one location
1222

1323
```powershellImport-Module Microsoft.Graph.Beta.Calendar
1424

@@ -18,3 +28,13 @@ Get-MgBetaUserEvent -UserId $userId -EventId $eventId -Property "subject,body,bo
1828
This example shows how to use the Get-MgBetaUserEvent Cmdlet.
1929
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
2030
31+
### Example 4: Expand a series master event
32+
33+
```powershellImport-Module Microsoft.Graph.Beta.Calendar
34+
35+
# A UPN can also be used as -UserId.
36+
Get-MgBetaUserEvent -UserId $userId -EventId $eventId -Property "subject,start,end,occurrenceId,exceptionOccurrences,cancelledOccurrences" -ExpandProperty "exceptionOccurrences"
37+
```
38+
This example shows how to use the Get-MgBetaUserEvent Cmdlet.
39+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
40+

src/Calendar/beta/examples/New-MgBetaGroupEvent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ $params = @{
99
content = "Does late morning work for you?"
1010
}
1111
start = @{
12-
dateTime = "2019-06-16T12:00:00"
12+
dateTime = "2019-06-15T12:00:00"
1313
timeZone = "Pacific Standard Time"
1414
}
1515
end = @{
16-
dateTime = "2019-06-16T14:00:00"
16+
dateTime = "2019-06-15T14:00:00"
1717
timeZone = "Pacific Standard Time"
1818
}
1919
location = @{

src/Calendar/beta/examples/New-MgBetaGroupEventExtension.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
### Example 1: {{ Add title here }}
2-
```powershell
3-
PS C:\> {{ Add code here }}
4-
5-
{{ Add output here }}
6-
```
1+
### Example 1: Code snippet
72

8-
{{ Add description here }}
9-
10-
### Example 2: {{ Add title here }}
113
```powershell
12-
PS C:\> {{ Add code here }}
4+
Import-Module Microsoft.Graph.Beta.Calendar
5+
6+
$params = @{
7+
"@odata.type" = "microsoft.graph.openTypeExtension"
8+
extensionName = "Com.Contoso.Deal"
9+
companyName = "Alpine Skis"
10+
dealValue =
11+
expirationDate = "2015-07-03T13:04:00.000Z"
12+
}
1313
14-
{{ Add output here }}
14+
New-MgBetaGroupEventExtension -GroupId $groupId -EventId $eventId -BodyParameter $params
1515
```
16+
This example shows how to use the New-MgBetaGroupEventExtension Cmdlet.
17+
18+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
1619

17-
{{ Add description here }}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Example 1: {{ Add title here }}
22
```powershell
3-
PS C:\> {{ Add code here }}
3+
PS C:\> {{ Add code here }}
44
55
{{ Add output here }}
66
```
@@ -9,10 +9,9 @@ PS C:\> {{ Add code here }}
99

1010
### Example 2: {{ Add title here }}
1111
```powershell
12-
PS C:\> {{ Add code here }}
12+
PS C:\> {{ Add code here }}
1313
1414
{{ Add output here }}
1515
```
1616

1717
{{ Add description here }}
18-

src/Calendar/beta/examples/New-MgBetaUserCalendarEvent.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ $params = @{
66
subject = "Let's go for lunch"
77
body = @{
88
contentType = "HTML"
9-
content = "Does mid month work for you?"
9+
content = "Does next month work for you?"
1010
}
1111
start = @{
12-
dateTime = "2019-03-15T12:00:00"
12+
dateTime = "2019-03-10T12:00:00"
1313
timeZone = "Pacific Standard Time"
1414
}
1515
end = @{
16-
dateTime = "2019-03-15T14:00:00"
16+
dateTime = "2019-03-10T14:00:00"
1717
timeZone = "Pacific Standard Time"
1818
}
1919
location = @{

src/Calendar/beta/examples/New-MgBetaUserEvent.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ $params = @{
8282
type = "required"
8383
}
8484
)
85-
allowNewTimeProposals = $true
8685
}
8786
8887
# A UPN can also be used as -UserId.
@@ -95,6 +94,55 @@ This example shows how to use the New-MgBetaUserEvent Cmdlet.
9594

9695
```powershellImport-Module Microsoft.Graph.Beta.Calendar
9796

97+
$params = @{
98+
subject = "Let's go for lunch"
99+
body = @{
100+
contentType = "HTML"
101+
content = "Does noon work for you?"
102+
}
103+
start = @{
104+
dateTime = "2020-02-25T12:00:00"
105+
timeZone = "Pacific Standard Time"
106+
}
107+
end = @{
108+
dateTime = "2020-02-25T14:00:00"
109+
timeZone = "Pacific Standard Time"
110+
}
111+
location = @{
112+
displayName = "Harry's Bar"
113+
}
114+
attendees = @(
115+
@{
116+
emailAddress = @{
117+
address = "AlexW@contoso.OnMicrosoft.com"
118+
name = "Alex Wilbur"
119+
}
120+
type = "required"
121+
}
122+
)
123+
recurrence = @{
124+
pattern = @{
125+
type = "daily"
126+
interval = 1
127+
}
128+
range = @{
129+
type = "numbered"
130+
startDate = "2020-02-25"
131+
numberOfOccurrences = 2
132+
}
133+
}
134+
}
135+
136+
# A UPN can also be used as -UserId.
137+
New-MgBetaUserEvent -UserId $userId -BodyParameter $params
138+
```
139+
This example shows how to use the New-MgBetaUserEvent Cmdlet.
140+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
141+
142+
### Example 4: Code snippet
143+
144+
```powershellImport-Module Microsoft.Graph.Beta.Calendar
145+
98146
$params = @{
99147
subject = "Let's go for lunch"
100148
body = @{

src/Calendar/beta/examples/New-MgBetaUserEventAttachment.md

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,54 @@
1-
### Example 1: Code snippet
1+
### Example 1: Code snippet
22

3-
```powershell
4-
Import-Module Microsoft.Graph.Beta.Calendar
3+
```powershellImport-Module Microsoft.Graph.Beta.Calendar
54

65
$params = @{
7-
"@odata.type" = "#Microsoft.OutlookServices.ItemAttachment"
8-
name = "name-value"
6+
"@odata.type" = "#microsoft.graph.fileAttachment"
7+
name = "menu.txt"
8+
contentBytes = "bWFjIGFuZCBjaGVlc2UgdG9kYXk="
9+
}
10+
11+
# A UPN can also be used as -UserId.
12+
New-MgBetaUserEventAttachment -UserId $userId -EventId $eventId -BodyParameter $params
13+
```
14+
This example shows how to use the New-MgBetaUserEventAttachment Cmdlet.
15+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
16+
17+
### Example 2: Code snippet
18+
19+
```powershellImport-Module Microsoft.Graph.Beta.Calendar
20+
21+
$params = @{
22+
"@odata.type" = "#microsoft.graph.itemAttachment"
23+
name = "Holiday event"
924
item = @{
10-
"@odata.type" = "microsoft.graph.message"
25+
"@odata.type" = "microsoft.graph.event"
26+
subject = "Discuss gifts for children"
1127
}
1228
}
1329
1430
# A UPN can also be used as -UserId.
15-
New-MgBetaUserEventAttachment -UserId $userId -EventId $eventId -BodyParameter $params
16-
```
17-
This example shows how to use the New-MgBetaUserEventAttachment Cmdlet.
31+
New-MgBetaUserEventAttachment -UserId $userId -EventId $eventId -BodyParameter $params
32+
```
33+
This example shows how to use the New-MgBetaUserEventAttachment Cmdlet.
34+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
35+
36+
### Example 3: Code snippet
1837

19-
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
38+
```powershellImport-Module Microsoft.Graph.Beta.Calendar
2039

40+
$params = @{
41+
"@odata.type" = "#microsoft.graph.referenceAttachment"
42+
name = "Personal pictures"
43+
sourceUrl = "https://contoso.com/personal/mario_contoso_net/Documents/Pics"
44+
providerType = "oneDriveConsumer"
45+
permission = "Edit"
46+
isFolder = "True"
47+
}
48+
49+
# A UPN can also be used as -UserId.
50+
New-MgBetaUserEventAttachment -UserId $userId -EventId $eventId -BodyParameter $params
51+
```
52+
This example shows how to use the New-MgBetaUserEventAttachment Cmdlet.
53+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
54+
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Example 1: {{ Add title here }}
22
```powershell
3-
PS C:\> {{ Add code here }}
3+
PS C:\> {{ Add code here }}
44
55
{{ Add output here }}
66
```
@@ -9,10 +9,9 @@ PS C:\> {{ Add code here }}
99

1010
### Example 2: {{ Add title here }}
1111
```powershell
12-
PS C:\> {{ Add code here }}
12+
PS C:\> {{ Add code here }}
1313
1414
{{ Add output here }}
1515
```
1616

1717
{{ Add description here }}
18-
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Example 1: {{ Add title here }}
22
```powershell
3-
PS C:\> {{ Add code here }}
3+
PS C:\> {{ Add code here }}
44
55
{{ Add output here }}
66
```
@@ -9,10 +9,9 @@ PS C:\> {{ Add code here }}
99

1010
### Example 2: {{ Add title here }}
1111
```powershell
12-
PS C:\> {{ Add code here }}
12+
PS C:\> {{ Add code here }}
1313
1414
{{ Add output here }}
1515
```
1616

1717
{{ Add description here }}
18-

src/Calendar/beta/examples/Update-MgBetaPlace.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,21 @@ Update-MgBetaPlace -PlaceId $placeId -BodyParameter $params
1616
This example shows how to use the Update-MgBetaPlace Cmdlet.
1717
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
1818
19+
### Example 2: Code snippet
20+
21+
```powershellImport-Module Microsoft.Graph.Beta.Calendar
22+
23+
$params = @{
24+
"@odata.type" = "microsoft.graph.workspace"
25+
nickname = "Conf Room"
26+
building = "1"
27+
label = "100"
28+
capacity =
29+
isWheelChairAccessible = $false
30+
}
31+
32+
Update-MgBetaPlace -PlaceId $placeId -BodyParameter $params
33+
```
34+
This example shows how to use the Update-MgBetaPlace Cmdlet.
35+
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
36+

src/Calendar/beta/examples/Update-MgBetaUserEvent.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ $params = @{
77
originalEndTimeZone = "originalEndTimeZone-value"
88
responseStatus = @{
99
response = ""
10-
time = [System.DateTime]::Parse("datetime-value")
10+
time = [System.DateTime]::Parse("2016-10-19T10:37:00Z")
1111
}
1212
recurrence = $null
13+
uid = "iCalUId-value"
1314
reminderMinutesBeforeStart = 99
1415
isOnlineMeeting = $true
1516
onlineMeetingProvider = "teamsForBusiness"

0 commit comments

Comments
 (0)