{"id":3122,"date":"2021-03-19T13:36:18","date_gmt":"2021-03-19T18:36:18","guid":{"rendered":"https:\/\/microsoftgeek.com\/?p=3122"},"modified":"2021-03-19T13:36:49","modified_gmt":"2021-03-19T18:36:49","slug":"connect-to-o365-v2-exo-v2","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=3122","title":{"rendered":"Connect to O365 v2  (EXO v2)"},"content":{"rendered":"\n<p>In order to Connect to O365 (EXO v2) using modern authentication you will need to install and import the EXO v2 module.<\/p>\n\n\n\n<p><strong>***PowerShell needs to have TLS 1.2 enabled in order to run EXO v2***<\/strong><\/p>\n\n\n\n<p>Run this in PowerShell:&nbsp; <em>&nbsp;[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12<\/em><\/p>\n\n\n\n<p><strong>Install-Module -Name ExchangeOnlineManagement -Force<\/strong><\/p>\n\n\n\n<p>If you have this module already installed, then you just need to import it to your current PowerShell session:<\/p>\n\n\n\n<p><strong>Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement<\/strong><\/p>\n\n\n\n<p>To update the module:<\/p>\n\n\n\n<p><strong>Update-Module -Name ExchangeOnlineManagement<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp; ===========================================================================<\/p>\n\n\n\n<p><strong>CONNECT TO O365 v2<\/strong><\/p>\n\n\n\n<p><strong>Accounts without MFA enabled:<\/strong><\/p>\n\n\n\n<p>$UserCredential = Get-Credential<\/p>\n\n\n\n<p>Connect-ExchangeOnline -Credential $UserCredential -ShowProgress $true<\/p>\n\n\n\n<p><strong>Accounts with MFA enabled:<\/strong><\/p>\n\n\n\n<p>$UserCredential = Get-Credential<\/p>\n\n\n\n<p>Connect-ExchangeOnline -UserPrincipalName <em>username@cdirad.onmicrosoft.com<\/em> -ShowProgress $true<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"340\" src=\"https:\/\/microsoftgeek.com\/wp-content\/uploads\/2021\/03\/EXOv2-1024x340.png\" alt=\"\" class=\"wp-image-3123\" srcset=\"https:\/\/microsoftgeek.com\/wp-content\/uploads\/2021\/03\/EXOv2-1024x340.png 1024w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2021\/03\/EXOv2-300x100.png 300w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2021\/03\/EXOv2-768x255.png 768w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2021\/03\/EXOv2-1536x510.png 1536w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2021\/03\/EXOv2.png 1555w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>PowerShell Gallery for ExchangeOnlineManagement:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.powershellgallery.com\/packages\/ExchangeOnlineManagement\/2.0.3\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.powershellgallery.com\/packages\/ExchangeOnlineManagement\/2.0.3<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In order to Connect to O365 (EXO v2) using modern authentication you will need to install and import the EXO v2 module. ***PowerShell needs to have TLS 1.2 enabled in order to run EXO v2*** Run this in PowerShell:&nbsp; &nbsp;[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Install-Module -Name ExchangeOnlineManagement -Force If you have this module already installed, then you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60,59],"tags":[],"class_list":["post-3122","post","type-post","status-publish","format-standard","hentry","category-office-365","category-powershell"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/3122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3122"}],"version-history":[{"count":2,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/3122\/revisions"}],"predecessor-version":[{"id":3125,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/3122\/revisions\/3125"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}