

Using the module in PowerShell 7 requires version 2.0.4 or later. If it doesn't work, then you need to use 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 you aren't using MFA, you should be able to use the Credential parameter instead of the UserPrincipalName parameter.
POWERMAIL EXCHANGE PASSWORD
Instead, you enter the username and password or select stored credentials after you run the Connect-ExchangeOnline command. For more information, see New-PSSessionOption.ĭepending on the nature of your organization, you might be able to omit the UserPrincipalName parameter in the connection command. Then, use the value $ProxyOptions for the PSSessionOption parameter. First, run this command: $ProxyOptions = New-PSSessionOption -ProxyAccessType, where is IEConfig, WinHttpConfig, or AutoDetect. 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. For more information, see the connection examples later in this article. The DelegatedOrganization parameter specifies the customer organization that you want to manage as an authorized Microsoft Partner.

* The required value O365Default is also the default value, so you don't need to use the ExchangeEnvironmentName parameter in Microsoft 365 or Microsoft 365 GCC environments. Common values for the ExchangeEnvironmentName parameter are described in the following table: Environment When you use the ExchangeEnvironmentName parameter, you don't need use the ConnectionUri or AzureADAuthorizationEndPointUrl parameters. For more information, see Updates for the EXO V3 module). is your account in user principal name format (for example, the EXO V3 module (v3.0.0 or later), if you don't use the UseRPSSession switch, you're using REST API cmdlets only. The command that you need to run uses the following syntax: Connect-ExchangeOnline -UserPrincipalName įor detailed syntax and parameter information, see Connect-ExchangeOnline. The workaround is to connect using a different account that doesn't have special characters in the profile path. Connect commands will likely fail if the profile path of the account that you used to connect contains special PowerShell characters (for example, $).
