Skip to content

Commit

Permalink
Merge pull request #2060 from microsoftgraph/WeeklyExamplesUpdate/202…
Browse files Browse the repository at this point in the history
…306020302

[v1] Examples Update
  • Loading branch information
timayabi2020 authored Jun 4, 2023
2 parents 3281e50 + 2ffd48a commit af18000
Show file tree
Hide file tree
Showing 43 changed files with 825 additions and 860 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
### Example 1: Using the Get-MgApplicationTemplate Cmdlet
```powershell
Import-Module Microsoft.Graph.Applications
Get-MgApplicationTemplate -ApplicationTemplateId $applicationTemplateId
```
This example shows how to use the Get-MgApplicationTemplate Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 2: Using the Get-MgApplicationTemplate Cmdlet
```powershell
Import-Module Microsoft.Graph.Applications
Get-MgApplicationTemplate
```
This example shows how to use the Get-MgApplicationTemplate Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.Applications

Get-MgApplicationTemplate -ApplicationTemplateId $applicationTemplateId
```
This example shows how to use the Get-MgApplicationTemplate Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### Example 1: Using the Remove-MgServicePrincipal Cmdlet
```powershell
Import-Module Microsoft.Graph.Applications
Remove-MgServicePrincipal -ServicePrincipalId $servicePrincipalId
```
This example shows how to use the Remove-MgServicePrincipal Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.Applications

Remove-MgServicePrincipal -ServicePrincipalId $servicePrincipalId
```
This example shows how to use the Remove-MgServicePrincipal Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
53 changes: 15 additions & 38 deletions src/Calendar/Calendar/examples/v1.0/Update-MgPlace.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,18 @@
### Example 1: Using the Update-MgPlace Cmdlet
```powershell
Import-Module Microsoft.Graph.Calendar
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.Calendar

$params = @{
"@odata.type" = "microsoft.graph.room"
Nickname = "Conf Room"
Building = "1"
Label = "100"
Capacity =
IsWheelChairAccessible = $false
nickname = "Conf Room"
building = "1"
label = "100"
capacity =
isWheelChairAccessible = $false
}
Update-MgPlace -PlaceId $placeId -BodyParameter $params
```
This example shows how to use the Update-MgPlace Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 2: Using the Update-MgPlace Cmdlet
```powershell
Import-Module Microsoft.Graph.Calendar
$params = @{
"@odata.type" = "microsoft.graph.roomList"
DisplayName = "Building 1"
Phone = "555-555-0100"
Address = @{
Street = "4567 Main Street"
City = "Buffalo"
State = "NY"
PostalCode = "98052"
CountryOrRegion = "USA"
}
GeoCoordinates = @{
Altitude = $null
Latitude = 47
Longitude = -122
Accuracy = $null
AltitudeAccuracy = $null
}
}
Update-MgPlace -PlaceId $placeId -BodyParameter $params
```
This example shows how to use the Update-MgPlace Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

Update-MgPlace -PlaceId $placeId -BodyParameter $params
```
This example shows how to use the Update-MgPlace Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
### Example 1: Using the Get-MgSubscription Cmdlet
```powershell
Import-Module Microsoft.Graph.ChangeNotifications
Get-MgSubscription -SubscriptionId $subscriptionId
```
This example shows how to use the Get-MgSubscription Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 2: Using the Get-MgSubscription Cmdlet
```powershell
Import-Module Microsoft.Graph.ChangeNotifications
Get-MgSubscription
```
This example shows how to use the Get-MgSubscription Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.ChangeNotifications

Get-MgSubscription -SubscriptionId $subscriptionId
```
This example shows how to use the Get-MgSubscription Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
### Example 1: Using the New-MgSubscription Cmdlet
```powershell
Import-Module Microsoft.Graph.ChangeNotifications
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.ChangeNotifications

$params = @{
ChangeType = "created"
NotificationUrl = "https://webhook.azurewebsites.net/api/send/myNotifyClient"
Resource = "me/mailFolders('Inbox')/messages"
ExpirationDateTime = [System.DateTime]::Parse("2016-11-20T18:23:45.9356913Z")
ClientState = "secretClientValue"
LatestSupportedTlsVersion = "v1_2"
changeType = "created"
notificationUrl = "https://webhook.azurewebsites.net/api/send/myNotifyClient"
resource = "me/mailFolders('Inbox')/messages"
expirationDateTime = [System.DateTime]::Parse("2016-11-20T18:23:45.9356913Z")
clientState = "secretClientValue"
latestSupportedTlsVersion = "v1_2"
}
New-MgSubscription -BodyParameter $params
```
This example shows how to use the New-MgSubscription Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

New-MgSubscription -BodyParameter $params
```
This example shows how to use the New-MgSubscription Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### Example 1: Using the Remove-MgSubscription Cmdlet
```powershell
Import-Module Microsoft.Graph.ChangeNotifications
Remove-MgSubscription -SubscriptionId $subscriptionId
```
This example shows how to use the Remove-MgSubscription Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.ChangeNotifications

Remove-MgSubscription -SubscriptionId $subscriptionId
```
This example shows how to use the Remove-MgSubscription Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
### Example 1: Using the Update-MgSubscription Cmdlet
```powershell
Import-Module Microsoft.Graph.ChangeNotifications
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.ChangeNotifications

$params = @{
ExpirationDateTime = [System.DateTime]::Parse("2016-11-22T18:23:45.9356913Z")
expirationDateTime = [System.DateTime]::Parse("2016-11-22T18:23:45.9356913Z")
}
Update-MgSubscription -SubscriptionId $subscriptionId -BodyParameter $params
```
This example shows how to use the Update-MgSubscription Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

Update-MgSubscription -SubscriptionId $subscriptionId -BodyParameter $params
```
This example shows how to use the Update-MgSubscription Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### Example 1: Using the Get-MgDirectoryObject Cmdlet
```powershell
Import-Module Microsoft.Graph.DirectoryObjects
Get-MgDirectoryObject -DirectoryObjectId $directoryObjectId
```
This example shows how to use the Get-MgDirectoryObject Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.DirectoryObjects

Get-MgDirectoryObject -DirectoryObjectId $directoryObjectId
```
This example shows how to use the Get-MgDirectoryObject Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### Example 1: Using the Remove-MgDirectoryObject Cmdlet
```powershell
Import-Module Microsoft.Graph.DirectoryObjects
Remove-MgDirectoryObject -DirectoryObjectId $directoryObjectId
```
This example shows how to use the Remove-MgDirectoryObject Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.DirectoryObjects

Remove-MgDirectoryObject -DirectoryObjectId $directoryObjectId
```
This example shows how to use the Remove-MgDirectoryObject Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
### Example 1: Using the Get-MgShareSharedDriveItemSharedDriveItem Cmdlet
### Example 1: Code snippet

```powershell
Import-Module Microsoft.Graph.Files
Get-MgShareSharedDriveItemSharedDriveItem -SharedDriveItemId $sharedDriveItemId
```
This example shows how to use the Get-MgShareSharedDriveItemSharedDriveItem Cmdlet.

To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

23 changes: 9 additions & 14 deletions src/Groups/Groups/examples/v1.0/Get-MgGroupLifecyclePolicy.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
### Example 1: Using the Get-MgGroupLifecyclePolicy Cmdlet
```powershell
Import-Module Microsoft.Graph.Groups
Get-MgGroupLifecyclePolicy -GroupLifecyclePolicyId $groupLifecyclePolicyId
```
This example shows how to use the Get-MgGroupLifecyclePolicy Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 2: Using the Get-MgGroupLifecyclePolicy Cmdlet
```powershell
Import-Module Microsoft.Graph.Groups
Get-MgGroupLifecyclePolicy
```
This example shows how to use the Get-MgGroupLifecyclePolicy Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.Groups

Get-MgGroupLifecyclePolicy -GroupLifecyclePolicyId $groupLifecyclePolicyId
```
This example shows how to use the Get-MgGroupLifecyclePolicy Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
### Example 1: Code snippet

{{ Add output here }}
```

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
{{ Add output here }}
```

{{ Add description here }}
```powershellImport-Module Microsoft.Graph.Groups

Get-MgGroupSettingTemplateGroupSettingTemplateGroupSettingTemplate -GroupSettingTemplateId $groupSettingTemplateId
```
This example shows how to use the Get-MgGroupSettingTemplateGroupSettingTemplateGroupSettingTemplate Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
23 changes: 13 additions & 10 deletions src/Groups/Groups/examples/v1.0/New-MgGroupLifecyclePolicy.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
### Example 1: Using the New-MgGroupLifecyclePolicy Cmdlet
```powershell
Import-Module Microsoft.Graph.Groups
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.Groups

$params = @{
GroupLifetimeInDays = 100
ManagedGroupTypes = "Selected"
AlternateNotificationEmails = "[email protected]"
groupLifetimeInDays = 100
managedGroupTypes = "Selected"
alternateNotificationEmails = "[email protected]"
}
New-MgGroupLifecyclePolicy -BodyParameter $params
```
This example shows how to use the New-MgGroupLifecyclePolicy Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

New-MgGroupLifecyclePolicy -BodyParameter $params
```
This example shows how to use the New-MgGroupLifecyclePolicy Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
16 changes: 9 additions & 7 deletions src/Groups/Groups/examples/v1.0/Remove-MgGroupLifecyclePolicy.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### Example 1: Using the Remove-MgGroupLifecyclePolicy Cmdlet
```powershell
Import-Module Microsoft.Graph.Groups
Remove-MgGroupLifecyclePolicy -GroupLifecyclePolicyId $groupLifecyclePolicyId
```
This example shows how to use the Remove-MgGroupLifecyclePolicy Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.Groups

Remove-MgGroupLifecyclePolicy -GroupLifecyclePolicyId $groupLifecyclePolicyId
```
This example shows how to use the Remove-MgGroupLifecyclePolicy Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
23 changes: 13 additions & 10 deletions src/Groups/Groups/examples/v1.0/Update-MgGroupLifecyclePolicy.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
### Example 1: Using the Update-MgGroupLifecyclePolicy Cmdlet
```powershell
Import-Module Microsoft.Graph.Groups
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.Groups

$params = @{
GroupLifetimeInDays = 180
ManagedGroupTypes = "Selected"
AlternateNotificationEmails = "[email protected]"
groupLifetimeInDays = 180
managedGroupTypes = "Selected"
alternateNotificationEmails = "[email protected]"
}
Update-MgGroupLifecyclePolicy -GroupLifecyclePolicyId $groupLifecyclePolicyId -BodyParameter $params
```
This example shows how to use the Update-MgGroupLifecyclePolicy Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

Update-MgGroupLifecyclePolicy -GroupLifecyclePolicyId $groupLifecyclePolicyId -BodyParameter $params
```
This example shows how to use the Update-MgGroupLifecyclePolicy Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
### Example 1: Using the Get-MgContract Cmdlet
```powershell
Import-Module Microsoft.Graph.Identity.DirectoryManagement
Get-MgContract -ContractId $contractId
```
This example shows how to use the Get-MgContract Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 2: Using the Get-MgContract Cmdlet
```powershell
Import-Module Microsoft.Graph.Identity.DirectoryManagement
Get-MgContract
```
This example shows how to use the Get-MgContract Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.Identity.DirectoryManagement

Get-MgContract -ContractId $contractId
```
This example shows how to use the Get-MgContract Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Expand Down
Loading

0 comments on commit af18000

Please sign in to comment.