Skip to content

Commit 03afc82

Browse files
committed
Merge branch 'master' into MAEE-chrisda
2 parents 0ed70a8 + aa0f5b2 commit 03afc82

File tree

356 files changed

+2313
-1119
lines changed

Some content is hidden

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

356 files changed

+2313
-1119
lines changed

exchange/docs-conceptual/app-only-auth-powershell-v2.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,42 @@ ms.custom:
1414
ms.assetid:
1515
search.appverid: MET150
1616
ROBOTS: NOINDEX, NOFOLLOW
17-
description: "Learn about using the Exchange Online V2 module in scripts and other long-running tasks."
17+
description: "Learn about using the Exchange Online V2 module in scripts and other long-running tasks with modern authentication and app-only authentication."
1818
---
1919

20-
# Automate tasks in Exchange Online using PowerShell with Modern Authentication
20+
# App-only authentication for unattended scripts in the EXO V2 module
2121

2222
> [!NOTE]
23-
> The features described in this topic are currently in Preview, are subject to change, and aren't available to everyone.
23+
> This feature is currently in Public Preview, and is available in the Preview release of Exchange Online PowerShell V2 Module.
2424
25-
Auditing and reporting scenarios in Exchange Online often involve scripts that run unattended. In most cases, these unattended scripts access Exchange Online PowerShell using Basic authentication (a username and password). Even when the connection to Exchange Online PowerShell uses Modern authentication, the credentials are stored in a local file or a secret vault that's access at run-time.
25+
To install the Preview release of the EXO V2 module, run the following command:
2626

27-
Because storing user credentials locally is not a good security practice, we're releasing this feature to support authentication for app-only scenarios using AzureAD applications and self-signed certificates.
27+
```powershell
28+
Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.3-Preview -AllowPrerelease
29+
```
2830

29-
The following examples show how to use the Exchange Online PowerShell V2 module with app-only authentication
31+
To update from an earlier version of the of the EXO V2 module, run the following command:
32+
33+
```powershell
34+
Update-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.3-Preview -AllowPrerelease
35+
```
36+
37+
Auditing and reporting scenarios in Exchange Online often involve scripts that run unattended. In most cases, these unattended scripts access Exchange Online PowerShell using Basic authentication (a username and password). Even when the connection to Exchange Online PowerShell uses modern authentication, the credentials are stored in a local file or a secret vault that's access at run-time.
38+
39+
Because storing user credentials locally is not a safe practice, we're releasing this feature to support authentication for unattended scripts (automation) scenarios using AzureAD applications and self-signed certificates.
40+
41+
The following examples show how to use the Exchange Online PowerShell V2 module with app-only authentication:
3042

3143
- Connect using a local certificate:
3244

3345
```powershell
34-
Connect-ExchangeOnline -CertificateFilePath "C:\Users\johndoe\Desktop\automation-cert.pfx" -AppID "alpha-beta-gamma-123456" -Organization "contosoelectronics.onmicrosoft.com"
46+
Connect-ExchangeOnline -CertificateFilePath "C:\Users\johndoe\Desktop\automation-cert.pfx" -AppID "36ee4c6c-0812-40a2-b820-b22ebd02bce3" -Organization "contosoelectronics.onmicrosoft.com"
3547
```
3648

3749
- Connect using a certificate thumbprint:
3850

3951
```powershell
40-
Connect-ExchangeOnline -CertificateThumbPrint "012THISISADEMOTHUMBPRINT" -AppID "alpha-beta-gamma-123456" -Organization "contosoelectronics.onmicrosoft.com"
52+
Connect-ExchangeOnline -CertificateThumbPrint "012THISISADEMOTHUMBPRINT" -AppID "36ee4c6c-0812-40a2-b820-b22ebd02bce3" -Organization "contosoelectronics.onmicrosoft.com"
4153
```
4254

4355
When you use the _CertificateThumbPrint_ parameter, the certificate needs to be installed on the computer where you are running the command. The certificate should be installed in the user certificate store.
@@ -80,7 +92,10 @@ For a detailed visual flow bout creating applications in Azure AD, see <https://
8092
8193
- Create and configure a self-signed X.509 certificate, which will be used to authenticate your Application against Azure AD, while requesting the app-only access token.
8294
83-
- This is similar to generating a password for user accounts. The certificate can be self-signed as well. See the [Appendix](#appendix) section later in this topic for instructions for generating certificates in PowerShell.
95+
- This is similar to generating a password for user accounts. The certificate can be self-signed as well. See the [Appendix](#step-3-generate-a-self-signed-certificate) section later in this topic for instructions for generating certificates in PowerShell.
96+
97+
> [!NOTE]
98+
> Cryptography: Next Generation (CNG) certificates are not supported for app-only authentication with Exchange. CNG certificates are created by default in modern Windows versions. You must use a certificate from a CSP key provider. The [Appendix](#step-3-generate-a-self-signed-certificate) section covers two supported methods to create a CSP certificate.
8499
85100
4. Assign RBAC roles
86101
@@ -91,7 +106,7 @@ For a detailed visual flow bout creating applications in Azure AD, see <https://
91106
- Security reader
92107
- Security administrator
93108
- Helpdesk administrator
94-
- Exchange Service administrator
109+
- Exchange administrator
95110
- Global Reader
96111
97112
## Appendix
@@ -185,6 +200,8 @@ Azure AD has more than 50 admin roles available. For app-only authentication in
185200
- Security reader
186201
- Security administrator
187202
- Helpdesk administrator
203+
- Exchange Service administrator
204+
- Global Reader
188205

189206
1. In the Azure AD portal under **Manage Azure Active Directory**, click **View**.
190207

exchange/docs-conceptual/connect-to-exchange-online-powershell.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Connect to Exchange Online PowerShell"
2+
title: "Connect to Exchange Online PowerShell with Basic authentication"
33
ms.author: chrisda
44
author: chrisda
55
manager: dansimp
@@ -12,18 +12,20 @@ ms.collection: Strat_EX_Admin
1212
ms.custom:
1313
ms.assetid: c8bea338-6c1a-4bdf-8de0-7895d427ee5b
1414
search.appverid: MET150
15-
description: "Learn how to use remote PowerShell to connect to Exchange Online."
15+
description: "Learn how to use remote PowerShell to connect to Exchange Online with Basic authentication."
1616
---
1717

18-
# Connect to Exchange Online PowerShell
19-
20-
> [!NOTE]
21-
> We recommend that you use the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell. For instructions, see [Use the Exchange Online PowerShell V2 module](exchange-online-powershell-v2.md).
18+
# Connect to Exchange Online PowerShell with Basic authentication
2219

2320
Exchange Online PowerShell allows you to manage your Exchange Online settings from the command line. You use Windows PowerShell on your local computer to create a remote PowerShell session to Exchange Online. It's a simple three-step process where you enter your Microsoft 365 credentials, provide the required connection settings, and then import the Exchange Online cmdlets into your local Windows PowerShell session so that you can use them.
2421

25-
> [!IMPORTANT]
26-
> If you want to use multi-factor authentication (MFA) to connect to Exchange Online PowerShell, you need to download and use the Exchange Online Remote PowerShell Module. For more information, see [Connect to Exchange Online PowerShell using multi-factor authentication](mfa-connect-to-exchange-online-powershell.md). <br/><br/> If you're a standalone Exchange Online Protection (EOP) customer (for example, you're using EOP to protect your on-premises email environment), use the connection instructions in [Connect to Exchange Online Protection PowerShell](connect-to-exchange-online-protection-powershell.md). If your on-premises Exchange organization has Exchange Enterprise CAL with Services licenses, EOP is one of the included services, and the connection instructions in this topic will work for you.
22+
> [!NOTE]
23+
>
24+
> - We're eventually going to [disable Basic authentication in Exchange Online](https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-and-exchange-online-april-2020-update/ba-p/1275508), and the connection method described in this topic uses Basic authentication. We recommend that you use the [Exchange Online PowerShell V2 module](exchange-online-powershell-v2.md) to connect to Exchange Online PowerShell, because it uses modern authentication in all scenarios.
25+
>
26+
> - The Exchange Online PowerShell V2 module works with multi-factor authentication (MFA). For MFA connection instructions using the older Exchange Online Remote PowerShell Module, see [Connect to Exchange Online PowerShell using multi-factor authentication](mfa-connect-to-exchange-online-powershell.md).
27+
>
28+
> - If you're a standalone Exchange Online Protection (EOP) customer (for example, you're using EOP to protect your on-premises email environment), use the connection instructions in [Connect to Exchange Online Protection PowerShell](connect-to-exchange-online-protection-powershell.md). If your on-premises Exchange organization has Exchange Enterprise CAL with Services licenses, EOP is one of the included services, and the connection instructions in this topic will work for you.
2729
2830
## What do you need to know before you begin?
2931

@@ -104,7 +106,7 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
104106
- For Office 365 Germany, use the _ConnectionUri_ value: `https://outlook.office.de/powershell-liveid/`
105107

106108
- For Microsoft 365 Government Community Cloud High (GCC High), use the _ConnectionUri_ value: `https://outlook.office365.us/powershell-liveid/`
107-
109+
108110
- For Microsoft 365 DoD, use the _ConnectionUri_ value: `https://webmail.apps.mil/powershell-liveid`
109111

110112
- If you're behind a proxy server, run this command first: `$ProxyOptions = New-PSSessionOption -ProxyAccessType <Value>`, where the _ProxyAccessType_ value is `IEConfig`, `WinHttpConfig`, or `AutoDetect`.

exchange/docs-conceptual/exchange-online-powershell-v2.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Exchange Online PowerShell V2
2+
title: Exchange Online PowerShell with modern authentication using V2 Module
33
ms.author: chrisda
44
author: chrisda
55
manager: dansimp
@@ -13,14 +13,15 @@ ms.collection: Strat_EX_Admin
1313
ms.custom:
1414
ms.assetid:
1515
search.appverid: MET150
16-
description: "Learn how to download and use the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell."
16+
description: "Learn how to install and use the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell with modern authentication."
1717
---
1818

19-
# Use the Exchange Online PowerShell V2 module
19+
# Use the Exchange Online PowerShell with modern authentication using V2 module
2020

2121
The Exchange Online PowerShell V2 module (abbreviated as the EXO V2 module) enables admins to connect to their Exchange Online environment in Microsoft 365 to retrieve data, create new objects, update existing objects, remove objects as well as configure Exchange Online and its features.
2222

2323
## Report bugs and issues
24+
2425
When you report an issue, be sure to include the log files in your email message. To generate the log files, replace \<Path to store log file\> with the output folder you want, and run the following command:
2526

2627
```PowerShell
@@ -31,14 +32,14 @@ Connect-ExchangeOnline -EnableErrorReporting -LogDirectoryPath <Path to store lo
3132

3233
The Exchange Online PowerShell V2 module contains a small set of new cmdlets that are optimized for bulk data retrieval scenarios (think: thousands and thousands of objects). Until you create a session to connect to your Exchange Online organization, you'll only see these new cmdlets in the module. After you connect to your Exchange Online organization, you'll see all of the older remote PowerShell cmdlets.
3334

34-
The EXO V2 module use Modern authentication for all cmdlets. You can't use Basic authentication in the EXO V2 module; however, you still need to configure the Basic authentication setting in WinRM as described later in this topic.
35+
The EXO V2 module use modern authentication for all cmdlets. You can't use Basic authentication in the EXO V2 module; however, you still need to configure the Basic authentication setting in WinRM as described later in this topic.
3536

3637
The new cmdlets in the EXO V2 module are meant to replace their older, less efficient equivalents. However, the original cmdlets are still available in the EXO V2 module for backwards compatibility **after** you create a session to connect to your Exchange Online organization.
3738

3839
The new cmdlets in the EXO V2 module are listed in the following table:
3940

40-
|**New cmdlet in the EXO V2 module**|**Older related cmdlet**|
41-
|:-----|:-----|
41+
|New cmdlet in the EXO V2 module|Older related cmdlet|
42+
|---|---|
4243
|[Connect-ExchangeOnline](../exchange-ps/exchange/Connect-ExchangeOnline.md)|[Connect-EXOPSSession](mfa-connect-to-exchange-online-powershell.md) <br/> or <br/> [New-PSSession](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/new-pssession)|
4344
|[Get-EXOMailbox](../exchange-ps/exchange/Get-EXOMailbox.md)|[Get-Mailbox](../exchange-ps/exchange/Get-Mailbox.md)|
4445
|[Get-EXORecipient](../exchange-ps/exchange/Get-EXORecipient.md)|[Get-Recipient](../exchange-ps/exchange/Get-Recipient.md)|
@@ -57,7 +58,7 @@ The new cmdlets in the EXO V2 module are listed in the following table:
5758
You can download the EXO V2 module from the PowerShell gallery [here](https://www.powershellgallery.com/packages/ExchangeOnlineManagement/).
5859

5960
> [!NOTE]
60-
> Currently, the latest version of PowerShell that's supported for the EXO V2 module is PowerShell 5.1. Support for later versions of PowerShell (and by definition, support for Linux or Mac) is a work in progress and will be announced soon.
61+
> Currently, the latest version of PowerShell that's supported for the EXO V2 module is PowerShell 5.1. Support for later versions of PowerShell (and by definition, support for Linux or Mac) is a work in progress.
6162
6263
### What do you need to know before you begin?
6364

0 commit comments

Comments
 (0)