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-

0 commit comments

Comments
 (0)