From 253905c7cb374111b79442a75dbbb4ca530302fd Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Thu, 16 Oct 2025 17:53:02 -0600 Subject: [PATCH] Add Scripts/Powershell/Exchange Online/Connect to Exchange Online.md --- .../Connect to Exchange Online.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Scripts/Powershell/Exchange Online/Connect to Exchange Online.md diff --git a/Scripts/Powershell/Exchange Online/Connect to Exchange Online.md b/Scripts/Powershell/Exchange Online/Connect to Exchange Online.md new file mode 100644 index 0000000..36d8155 --- /dev/null +++ b/Scripts/Powershell/Exchange Online/Connect to Exchange Online.md @@ -0,0 +1,19 @@ +**Purpose**: Sometimes you will need to connect to Office365 via powershell in order to perform troubleshooting / automation that either is too complex to do via the website, or is not exposed / possible to do via the website. + +## Update Nuget Package Manager +``` powershell +Install-PackageProvider -Name NuGet -Force -ForceBootstrap +``` + +## Install ExchangeOnlineManagement Powershell Modules +You will need to install and import the modules for Exchange Online before you can run the commands necessary for interacting with it. +``` powershell +Install-Module -Name ExchangeOnlineManagement -Force +Import-Module ExchangeOnlineManagement +``` + +## Connect to Exchange Online +When you run the following command, it will open a dialog box to take the username, password, and MFA code (if applicable) for an administrative account in the Exchange Online environment. +``` powershell +Connect-ExchangeOnline -UserPrincipalName user@domain.com +``` \ No newline at end of file