Skip to content

Commit 4b695b9

Browse files
committed
Update connect-to-exchange-online-powershell.md
Basic auth updates and SkipLoadingFormatData per Issue #11092
1 parent 166bae4 commit 4b695b9

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Connect to Exchange Online PowerShell
33
author: chrisda
44
manager: dansimp
5-
ms.date: 02/07/2023
5+
ms.date: 7/20/2023
66
ms.audience: Admin
77
audience: Admin
88
ms.topic: article
@@ -62,14 +62,14 @@ Import-Module ExchangeOnlineManagement
6262
The command that you need to run uses the following syntax:
6363

6464
```powershell
65-
Connect-ExchangeOnline -UserPrincipalName <UPN> [-UseRPSSession] [-ExchangeEnvironmentName <Value>] [-ShowBanner:$false] [-DelegatedOrganization <String>] [-PSSessionOption $ProxyOptions]
65+
Connect-ExchangeOnline -UserPrincipalName <UPN> [-ExchangeEnvironmentName <Value>] [-ShowBanner:$false] [-DelegatedOrganization <String>] [-SkipLoadingFormatData]
6666
```
6767

6868
For detailed syntax and parameter information, see [Connect-ExchangeOnline](/powershell/module/exchange/connect-exchangeonline).
6969

7070
- _\<UPN\>_ is your account in user principal name format (for example, `[email protected]`).
7171

72-
- With the EXO V3 module (v3.0.0 or later), if you don't use the _UseRPSSession_ switch, you're using REST API cmdlets only. For more information, see [Updates for the EXO V3 module)](exchange-online-powershell-v2.md#updates-for-the-exo-v3-module).
72+
- With the EXO V3 module (v3.0.0 or later) and the [demise of Basic authentication (remote PowerShell) connections to Exchange Online]((https://techcommunity.microsoft.com/t5/exchange-team-blog/deprecation-of-remote-powershell-rps-protocol-in-security-and/ba-p/3815432)), you're using REST API cmdlets only. For more information, see [Updates for the EXO V3 module)](exchange-online-powershell-v2.md#updates-for-the-exo-v3-module).
7373

7474
- When you use the _ExchangeEnvironmentName_ parameter, you don't need use the _ConnectionUri_ or _AzureADAuthorizationEndPointUrl_ parameters. Common values for the _ExchangeEnvironmentName_ parameter are described in the following table:
7575

@@ -85,12 +85,12 @@ For detailed syntax and parameter information, see [Connect-ExchangeOnline](/pow
8585

8686
- The _DelegatedOrganization_ parameter specifies the customer organization that you want to manage as an authorized Microsoft Partner. For more information, see the [connection examples later in this article](#connect-to-exchange-online-powershell-in-customer-organizations).
8787

88-
- If you're behind a proxy server, you can use the _PSSessionOption_ parameter in the connection command, but only if you also use the _UseRPSSession_ switch. First, run this command: `$ProxyOptions = New-PSSessionOption -ProxyAccessType <Value>`, where \<Value\> is `IEConfig`, `WinHttpConfig`, or `AutoDetect`. Then, use the value `$ProxyOptions` for the _PSSessionOption_ parameter. For more information, see [New-PSSessionOption](/powershell/module/microsoft.powershell.core/new-pssessionoption).
89-
9088
- Depending on the nature of your organization, you might be able to omit the _UserPrincipalName_ parameter in the connection command. Instead, you enter the username and password or select stored credentials after you run the **Connect-ExchangeOnline** command. If it doesn't work, then you need to use the _UserPrincipalName_ parameter.
9189

9290
- If you aren't using MFA, you should be able to use the _Credential_ parameter instead of the _UserPrincipalName_ parameter. First, run the command `$Credential = Get-Credential`, enter your username and password, and then use the variable name for the _Credential_ parameter (`-Credential $Credential`). If it doesn't work, then you need to use the _UserPrincipalName_ parameter.
9391

92+
- Use the _SkipLoadingFormatData_ switch to avoid errors when connecting to Exchange Online PowerShell from within a Windows service.
93+
9494
- Using the module in PowerShell 7 requires version 2.0.4 or later.
9595

9696
The connection examples in the following sections use modern authentication, and are incapable of using Basic authentication.
@@ -228,8 +228,6 @@ If you receive errors, check the following requirements:
228228

229229
- A common problem is an incorrect password. Run the connection steps again and pay close attention to the username and password that you use.
230230

231-
- To help prevent denial-of-service (DoS) attacks, when you connect using the _UseRPSSession_ switch, you're limited to five open connections to Exchange Online PowerShell.
232-
233231
- The account that you use to connect to must be enabled for PowerShell access. For more information, see [Enable or disable access to Exchange Online PowerShell](disable-access-to-exchange-online-powershell.md).
234232

235233
- TCP port 80 traffic needs to be open between your local computer and Microsoft 365. It's probably open, but it's something to consider if your organization has a restrictive internet access policy.
@@ -365,7 +363,7 @@ This section attempts to compare older connection methods that have been replace
365363
366364
$o365cred = New-Object System.Management.Automation.PSCredential ("[email protected]", $oauthTokenAsPassword)
367365
368-
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/PowerShell-LiveID/? DelegatedOrg=delegated.onmicrosoft.com&BasicAuthToOAuthConversion=true&email=SystemMailbox{bb558c35-97f1-4cb9-8ff7-d53741dc928c}@delegated.onmicrosoft.com -Credential $o365cred -Authentication Basic -AllowRedirection
366+
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/PowerShell-LiveID/?DelegatedOrg=delegated.onmicrosoft.com&BasicAuthToOAuthConversion=true&email=SystemMailbox{bb558c35-97f1-4cb9-8ff7-d53741dc928c}@delegated.onmicrosoft.com -Credential $o365cred -Authentication Basic -AllowRedirection
369367
370368
Import-PSSession $Session
371369
```

0 commit comments

Comments
 (0)