Skip to content

Commit a493370

Browse files
authored
Merge pull request #2895 from microsoftgraph/WeeklyExamplesUpdate/202408090307
[v2] Examples Update
2 parents 908a17b + 8dc85c7 commit a493370

File tree

61 files changed

+712
-328
lines changed

Some content is hidden

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

61 files changed

+712
-328
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Applications
6+
7+
Get-MgBetaServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId
8+
9+
```
10+
This example will### example
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Example 1: Code snippet
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Bookings
6+
7+
Get-MgBetaVirtualEventWebinarRegistrationSession -VirtualEventWebinarId $virtualEventWebinarId -VirtualEventRegistrationId $virtualEventRegistrationId
8+
9+
```
10+
This example shows how to use the Get-MgBetaVirtualEventWebinarRegistrationSession Cmdlet.
11+

src/Bookings/beta/examples/New-MgBetaBackupRestoreExchangeProtectionPolicy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ $params = @{
88
displayName = "Exchange Protection Policy"
99
mailboxProtectionUnits = @(
1010
@{
11-
userId = "cdd3a849-dcaf-4a85-af82-7e39fc14019a"
11+
directoryObjectId = "cdd3a849-dcaf-4a85-af82-7e39fc14019a"
1212
}
1313
@{
14-
userId = "9bc069da-b746-41a4-89ab-26125c6373c7"
14+
directoryObjectId = "9bc069da-b746-41a4-89ab-26125c6373c7"
1515
}
1616
@{
17-
userId = "b218eb4a-ea72-42bd-8f0b-d0bbf794bec7"
17+
directoryObjectId = "b218eb4a-ea72-42bd-8f0b-d0bbf794bec7"
1818
}
1919
)
2020
}

src/Bookings/beta/examples/New-MgBetaBackupRestoreOneDriveForBusinessProtectionPolicy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ $params = @{
88
displayName = "OneDrive For Business Protection Policy"
99
driveProtectionUnits = @(
1010
@{
11-
userId = "cdd3a849-dcaf-4a85-af82-7e39fc14019"
11+
directoryObjectId = "cdd3a849-dcaf-4a85-af82-7e39fc14019"
1212
}
1313
@{
14-
userId = "9bc069da-b746-41a4-89ab-26125c6373c7"
14+
directoryObjectId = "9bc069da-b746-41a4-89ab-26125c6373c7"
1515
}
1616
@{
17-
userId = "b218eb4a-ea72-42bd-8f0b-d0bbf794bec7"
17+
directoryObjectId = "b218eb4a-ea72-42bd-8f0b-d0bbf794bec7"
1818
}
1919
)
2020
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
### Example 1: Creating registration record with delegated permission
2+
3+
```powershell
4+
5+
Import-Module Microsoft.Graph.Beta.Bookings
6+
7+
$params = @{
8+
preferredTimezone = "Pacific Standard Time"
9+
preferredLanguage = "en-us"
10+
registrationQuestionAnswers = @(
11+
@{
12+
questionId = "95320781-96b3-4b8f-8cf8-e6561d23447a"
13+
value = $null
14+
booleanValue = $null
15+
multiChoiceValues = @(
16+
"Seattle"
17+
)
18+
}
19+
@{
20+
questionId = "4577afdb-8bee-4219-b482-04b52c6b855c"
21+
value = $null
22+
booleanValue = $true
23+
multiChoiceValues = @(
24+
)
25+
}
26+
@{
27+
questionId = "80fefcf1-caf7-4cd3-b8d7-159e17c47f20"
28+
value = $null
29+
booleanValue = $null
30+
multiChoiceValues = @(
31+
"Cancun"
32+
"Hoboken"
33+
"Beijing"
34+
)
35+
}
36+
)
37+
}
38+
39+
New-MgBetaVirtualEventWebinarRegistration -VirtualEventWebinarId $virtualEventWebinarId -BodyParameter $params
40+
41+
```
42+
This example shows creating registration record with delegated permission
43+
44+
### Example 2: Creating registration record with application permission
45+
46+
```powershell
47+
48+
Import-Module Microsoft.Graph.Beta.Bookings
49+
50+
$params = @{
51+
firstName = "Diane"
52+
lastName = "Demoss"
53+
54+
preferredTimezone = "Pacific Standard Time"
55+
preferredLanguage = "en-us"
56+
registrationQuestionAnswers = @(
57+
@{
58+
questionId = "95320781-96b3-4b8f-8cf8-e6561d23447a"
59+
value = $null
60+
booleanValue = $null
61+
multiChoiceValues = @(
62+
"Seattle"
63+
)
64+
}
65+
@{
66+
questionId = "4577afdb-8bee-4219-b482-04b52c6b855c"
67+
value = $null
68+
booleanValue = $true
69+
multiChoiceValues = @(
70+
)
71+
}
72+
@{
73+
questionId = "80fefcf1-caf7-4cd3-b8d7-159e17c47f20"
74+
value = $null
75+
booleanValue = $null
76+
multiChoiceValues = @(
77+
"London"
78+
"New York City"
79+
)
80+
}
81+
)
82+
}
83+
84+
New-MgBetaVirtualEventWebinarRegistration -VirtualEventWebinarId $virtualEventWebinarId -BodyParameter $params
85+
86+
```
87+
This example shows creating registration record with application permission
88+

src/Bookings/beta/examples/Update-MgBetaBackupRestoreExchangeProtectionPolicy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ $params = @{
88
displayName = "Exchange Policy - Inadvertent data loss"
99
"mailboxProtectionUnits@delta" = @(
1010
@{
11-
userId = "1b014d8c-71fe-4d00-a01a-31850bc5b32c"
11+
directoryObjectId = "1b014d8c-71fe-4d00-a01a-31850bc5b32c"
1212
}
1313
@{
14-
userId = "2b014d8c-71fe-4d00-a01a-31850bc5b32c"
14+
directoryObjectId = "2b014d8c-71fe-4d00-a01a-31850bc5b32c"
1515
}
1616
@{
1717
"@removed" = @{

src/Bookings/beta/examples/Update-MgBetaBackupRestoreOneDriveForBusinessProtectionPolicy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ $params = @{
88
displayName = "One Drive Policy - Inadvertent data loss"
99
"driveProtectionUnits@delta" = @(
1010
@{
11-
userId = "1b014d8c-71fe-4d00-a01a-31850bc5b32c"
11+
directoryObjectId = "1b014d8c-71fe-4d00-a01a-31850bc5b32c"
1212
}
1313
@{
14-
userId = "2b014d8c-71fe-4d00-a01a-31850bc5b32c"
14+
directoryObjectId = "2b014d8c-71fe-4d00-a01a-31850bc5b32c"
1515
}
1616
@{
1717
"@removed" = @{

src/Bookings/v1.0/examples/Get-MgVirtualEventWebinarRegistration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
Import-Module Microsoft.Graph.Bookings
66
7-
Get-MgVirtualEventWebinarRegistration -VirtualEventWebinarId $virtualEventWebinarId
7+
Get-MgVirtualEventWebinarRegistration -VirtualEventWebinarId $virtualEventWebinarId -VirtualEventRegistrationId $virtualEventRegistrationId
88
99
```
1010
This example shows how to use the Get-MgVirtualEventWebinarRegistration Cmdlet.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)