Skip to content

Commit 680c29e

Browse files
authored
Merge pull request #664 from MicrosoftDocs/main
Changes from main to live
2 parents 31e899b + d8849bf commit 680c29e

File tree

6 files changed

+95
-93
lines changed

6 files changed

+95
-93
lines changed

azure-pipelines/config/credscan/credscan-suppressions.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,21 @@
6161
"msgraph-sdk-powershell\\src\\Users.Actions\\v1.0\\examples\\Update-MgUserPassword.md",
6262
"msgraph-sdk-powershell\\src\\Users.Actions\\v1.0\\examples\\Reset-MgUserAuthenticationMethodPassword.md",
6363
"microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Users.Actions\\Reset-MgBetaUserAuthenticationMethodPassword.md",
64-
"microsoftgraph\\graph-powershell-1.0\\Microsoft.Graph.Users.Actions\\Reset-MgUserAuthenticationMethodPassword.md"
64+
"microsoftgraph\\graph-powershell-1.0\\Microsoft.Graph.Users.Actions\\Reset-MgUserAuthenticationMethodPassword.md",
65+
"microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Users.Actions\\Convert-MgBetaUserExternalToInternalMemberUser.md"
6566
],
6667
"_justification": "[Users.Actions] Examples contain random values recognized as secret"
6768
},
69+
{
70+
"file": [
71+
"microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Identity.SignIns\\Reset-MgBetaUserAuthenticationMethodPassword.md",
72+
"microsoftgraph\\graph-powershell-1.0\\Microsoft.Graph.Identity.SignIns\\Reset-MgUserAuthenticationMethodPassword.md",
73+
"msgraph-sdk-powershell\\src\\Identity.SignIns\\v1.0\\examples\\Reset-MgUserAuthenticationMethodPassword.md",
74+
"msgraph-sdk-powershell\\src\\Identity.SignIns\\beta\\examples\\Reset-MgBetaUserAuthenticationMethodPassword.md"
75+
],
76+
"_justification": "[Identity.SignIns] Examples contain random values recognized as secret"
77+
},
78+
6879
{
6980
"file": [
7081
"msgraph-sdk-powershell\\src\\DeviceManagement.Actions\\beta\\examples\\Update-MgBetaDeviceManagementVirtualEndpointOnPremiseConnectionAdDomainPassword.md",

microsoftgraph/docs-conceptual/installation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: "Learn how to install the Microsoft Graph PowerShell SDK with Power
55
author: msewaweru
66
manager: CelesteDG
77
ms.topic: how-to
8-
ms.date: 03/05/2024
8+
ms.date: 03/12/2025
99
ms.author: eunicewaweru
1010

1111
#customer intent: As a PowerShell user, I want to install the Microsoft Graph PowerShell SDK, so that I can use it to interact with Microsoft Graph and perform tasks using PowerShell.
@@ -38,7 +38,7 @@ The Microsoft Graph PowerShell SDK comes in two modules, Microsoft.Graph and Mic
3838
Using the **Install-Module** cmdlet is the preferred installation method for the Microsoft Graph PowerShell modules.
3939

4040
> [!NOTE]
41-
> Installing the main modules of the SDK, Microsoft.Graph and Microsoft.Graph.Beta, will install all 38 sub modules for each module. Consider only installing the necessary modules, including `Microsoft.Graph.Authentication` which is installed by default when you opt to install the sub modules individually. For a list of available Microsoft Graph modules, use `Find-Module Microsoft.Graph*`.
41+
> Installing the main modules of the SDK, Microsoft.Graph or Microsoft.Graph.Beta, will install the over 47 sub modules for each module. Consider only installing the necessary modules, including `Microsoft.Graph.Authentication` which is installed by default when you opt to install the sub modules individually. For a list of available Microsoft Graph modules, use `Find-Module Microsoft.Graph*`.
4242
> Only cmdlets for the installed modules will be available for use.
4343
4444
To install the v1 module of the SDK in PowerShell Core or Windows PowerShell, run the following command.
@@ -78,7 +78,7 @@ To verify the installed submodules and their versions, run:
7878
Get-InstalledModule
7979
```
8080

81-
The version in the output should match the latest version published on the PowerShell Gallery. Now you're ready to use the SDK.
81+
The version in the output should match the latest version published on [the PowerShell Gallery](https://www.powershellgallery.com/packages/Microsoft.Graph). Now you're ready to use the SDK.
8282

8383
## Updating the SDK
8484

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,51 @@
11
---
2-
title: "Navigating the Microsoft Graph PowerShell SDK"
2+
title: "Navigate the Microsoft Graph PowerShell SDK"
33
description: "The Microsoft Graph PowerShell SDK contains a large number of commands. Learn how to find the right command for what you want to achieve."
44

55
author: msewaweru
66
manager: CelesteDG
77
ms.topic: conceptual
8-
ms.date: 03/05/2024
8+
ms.date: 03/12/2025
99
ms.author: eunicewaweru
10-
11-
#customer intent: As a user new to the Microsoft Graph PowerShell SDK, I want to find the right command for a specific task, so that I can effectively use the SDK to interact with the Microsoft Graph API.
10+
#customer intent: As a user new to the Microsoft Graph PowerShell SDK, I want to find the right command for a specific task, so that I can effectively use Microsoft Graph PowerShell to interact with the Microsoft Graph API.
1211
---
1312

14-
# Navigating the Microsoft Graph PowerShell SDK
13+
# Navigate the Microsoft Graph PowerShell SDK
1514

1615
The Microsoft Graph API is huge, and it's growing all the time. Therefore, the number of commands in the Microsoft Graph PowerShell SDK is also large. Finding the right command for what you want to achieve can be challenging, especially if you're not already familiar with Microsoft Graph. Let's look at some ways to help find a particular command.
1716

1817
[!INCLUDE [aad-advanced-queries-note](../includes/aad-advanced-queries-note.md)]
1918

2019
## Command naming conventions
2120

22-
The commands in the SDK are generated directly from the [REST API](/graph/api/overview?view=graph-rest-1.0&preserve-view=true), so the names are influenced by the API. You don't have to understand the details of the API to use the Microsoft Graph PowerShell SDK, but it helps to understand the naming convention.
21+
Microsoft Graph PowerShell generates commands directly from the [Microsoft Graph API](/graph/api/overview), so the API influences their names. You don't have to understand the details of the API to use Microsoft Graph PowerShell, but it helps to understand the naming convention.
2322

2423
PowerShell commands are named using a verb-noun pair, such as `Get-Command` or `Update-List`. Let's start with the verb.
2524

2625
### Command verbs
2726

28-
For basic REST operations, the verb is determined by the HTTP method used for the API.
27+
For basic REST operations, the HTTP method determines the verb used for the API.
2928

30-
| HTTP method | Command verb | Example |
31-
|-------------|--------------|---|
32-
| GET | Get | `Get-MgUser` [API reference](/graph/api/user-get?view=graph-rest-1.0&preserve-view=true) |
33-
| POST | New | `New-MgUserMessage` [API reference](/graph/api/user-post-messages?view=graph-rest-1.0&preserve-view=true) |
34-
| PUT | New | `New-MgTeam` [API reference](/graph/api/team-put-teams?view=graph-rest-1.0&preserve-view=true) |
35-
| PATCH | Update | `Update-MgUserEvent` [API reference](/graph/api/event-update?view=graph-rest-1.0&preserve-view=true) |
36-
| DELETE | Remove | `Remove-MgDriveItem` [API reference](/graph/api/driveitem-delete?view=graph-rest-1.0&preserve-view=true) |
29+
| HTTP Method | Command Verb | Example |
30+
|------------|-------------|---------|
31+
| **GET** | Get | `Get-MgUser` [API reference](/graph/api/user-get) |
32+
| **POST** | New | `New-MgUser` [API reference](/graph/api/user-post-users) |
33+
| **PUT** | New | `New-MgTeam` [API reference](/graph/api/team-put-teams) |
34+
| **PATCH** | Update | `Update-MgUser` [API reference](/graph/api/user-update) |
35+
| **DELETE** | Remove | `Remove-MgUser` [API reference](/graph/api/user-delete) |
3736

3837
For functions and actions, it's a little more complicated. APIs in Microsoft Graph that are implemented as OData functions or actions are typically named with at least a verb. The corresponding command's verb is based on the verb in the function or action name. However, command verbs in PowerShell have to conform to specific [naming rules](/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands), which can result in nonintuitive name-to-command mappings.
3938

40-
Let's look at some examples. The [getSchedule](/graph/api/calendar-getschedule?view=graph-rest-1.0&preserve-view=true) API uses `get`, and `Get` is an approved PowerShell verb, so its command is `Get-MgUserCalendarSchedule`. The [cancel](/graph/api/event-cancel?view=graph-rest-beta&preserve-view=true) API on an event on the other hand, uses a nonapproved verb `cancel`. The approved verb for canceling or discontinuing something is `Stop`, so the command is `Stop-MgUserEvent`. Finally, the [snoozeReminder](/graph/api/event-snoozereminder?view=graph-rest-1.0&preserve-view=true) API's verb, `snooze`, has no PowerShell-approved equivalent. For APIs like that, the SDK uses the verb `Invoke`, so that API's command is `Invoke-MgSnoozeUserEventReminder`.
39+
Let's look at some examples. The [getSchedule](/graph/api/calendar-getschedule) API uses `get`, and `Get` is an approved PowerShell verb, so its command is `Get-MgUserCalendarSchedule`. The [cancel](/graph/api/event-cancel) API on an event on the other hand, uses a nonapproved verb `cancel`. The approved verb for canceling or discontinuing something is `Stop`, so the command is `Stop-MgUserEvent`. Finally, the [snoozeReminder](/graph/api/event-snoozereminder) API's verb, `snooze`, has no PowerShell-approved equivalent. For APIs like that, Microsoft Graph PowerShell uses the verb `Invoke`, so that API's command is `Invoke-MgSnoozeUserEventReminder`.
4140

4241
> [!NOTE]
43-
> For Beta cmdlets add a **Beta** prefix before the resource. For example, the beta version of the Get-MgUser cmdlet is **Get-MgBetaUser**.
42+
> For Beta cmdlets, add a **Beta** prefix before the resource. For example, the beta version of the Get-MgUser cmdlet is **Get-MgBetaUser**.
4443
4544
### Command nouns
4645

47-
By now you may have noticed that all nouns in the SDK's commands start with `Mg`. This prefix helps to avoid naming conflicts with other PowerShell modules. With that in mind, it should make sense that a command like `Get-MgUser` is used to get a user. Following PowerShell convention, even though the noun is singular, those same commands can return multiple results if no specific instance is requested.
46+
By now, you might notice that all nouns in Microsoft Graph PowerShell commands start with `Mg`. This prefix helps avoid naming conflicts with other PowerShell modules. With that in mind, a command like `Get-MgUser` gets a user. Following PowerShell convention, even though the noun is singular, these commands return multiple results if no specific instance is requested.
4847

49-
But what about commands like `Get-MgUserMessage` or `Get-MgUserMailFolderMessage`? Both of these commands get a [message](/graph/api/resources/message?view=graph-rest-1.0&preserve-view=true) object, so why not `Get-MgMessage`? The answer comes from the [get message API](/graph/api/message-get?view=graph-rest-1.0&preserve-view=true).
48+
But what about commands like `Get-MgUserMessage` or `Get-MgUserMailFolderMessage`? Both of these commands get a [message](/graph/api/resources/message) object, so why not `Get-MgMessage`? The answer comes from the [get message API](/graph/api/message-get).
5049

5150
Look at the HTTP requests for this API. If you ignore the requests with `/me` in the URL, there are two other ways to call this API.
5251

@@ -63,20 +62,20 @@ Use [Find-MgGraphCommand](find-mg-graph-command.md) to discover which API path a
6362

6463
### Listing parameters
6564

66-
After you've found the right command, you can examine all the available parameters by using the `Get-Help` command. For example, the following command lists all the available parameters for the `Get-MgUser` command.
65+
After you find the right command, you examine all the available parameters using the `Get-Help` command. For example, the following command lists all the available parameters for the `Get-MgUser` command.
6766

6867
```powershell
6968
Get-Help Get-MgUser -Detailed
7069
```
7170

7271
## Finding available commands
7372

74-
Sometimes just knowing the naming conventions isn't enough to guess the right command. In this case, you can use the `Get-Command` command to search the available commands in the SDK. For example, if you're looking for commands related to Microsoft Teams, you can run the following command.
73+
Sometimes just knowing the naming conventions isn't enough to guess the right command. In this case, you can use the `Get-Command` command to search the available commands in Microsoft Graph PowerShell. For example, if you're looking for commands related to Microsoft Teams, you can run the following command.
7574

7675
```powershell
7776
Get-Command -Module Microsoft.Graph* *team*
7877
```
7978

8079
## Next steps
8180

82-
- Discover Microsoft Graph PowerShell cmdlets [Using Find-MgGraphCommand cmdlet](find-mg-graph-command.md).
81+
- Discover Microsoft Graph PowerShell cmdlets [using Find-MgGraphCommand cmdlet](find-mg-graph-command.md).

microsoftgraph/docs-conceptual/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
href: overview.md
55
- name: Getting started
66
items:
7-
- name: Installation
7+
- name: Install the SDK
88
href: installation.md
99
- name: Use PowerShell
1010
href: get-started.md

msgraph-sdk-powershell

0 commit comments

Comments
 (0)