Connect to Office 365 Services using PowerShell

PowerShell script with helper functions to connect to Office 365 or Exchange On-Premises. Makes it easy to connect to different Office 365 services using the same credentials (non-MFA). No more needing to remember various ways to connect to each workload.

 
 
 
 
 
4.9 Star
(8)
8,676 times
Add to favorites
Office 365
5/6/2020
E-mail Twitter del.icio.us Digg Facebook
  • (default) switch for modern authentication
    3 Posts | Last post February 12, 2020
    • Please can you incorporate a switch for modern authentication mode directly on the command line. 
    • You can try below script that allows you to connect all Office 365 services with modern auth by passing -MFA switch.
      
      ./ConnectO365Services.ps1 -MFA
      
      Script available in: https://o365reports.com/2019/10/05/connect-all-office-365-services-powershell/
    • When you approved logon before (bypassing MFA defeats its purpose), the current cached token will be reused, and you will connect using an MFA-enabled account (for modules which support it).
  • MFA support
    2 Posts | Last post October 30, 2019
    • how to modify the script so it can use MFA?
      
    • Bypassing MFA in the script is bad from a security perspective. If you are talking about exchanging tokens when connecting to different services, that depends on the API provided by the PS module.
  • CreateISEMenu
    2 Posts | Last post January 13, 2018
    • I think the ISE Menu items are only created if you hold the LeftShift key down.
      Thanks for sharing.
    • Ugh, yeah. Made a note to fix in next version. Thanks!