CMD 365 PowerShell Prerequisites - Neilitlib/MSP-Simple-Commands GitHub Wiki

  • Install the necessary PowerShell modules to interact with Azure ActiveDirectory or Office 365
  • Once the modules are installed, they need to be Imported, but do not need to be re-installed every time
  • Supports Multifactor Authentication logins with a browser pop-up window
  • NOTE: Results in a list of tenants that you've logged into that you can manually remove from your PC later on
  • NOTE: Use Windows Sandbox to avoid a bunch of 365 accounts being listed on your PC

- Shoot me a message if you know how to prevent accounts/tenants from being added to your PC

PS

  1. Set-ExecutionPolicy RemoteSigned -Force; Install-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201 -Force
  2. Install-Module -Name AzureAD -Force
  3. Install-Module -Name ExchangeOnlineManagement -Force
  4. Import-Module AzureAD or Import-Module ExchangeOnlineManagement
  5. When you Connect-AzureAD or Connect-ExchangeOnline simply login within the pop-up window.

--When done working, ALWAYS--

Disconnect-AzureAD / Disconnect-ExchangeOnline