Connect to Exchange Online PowerShell From MacOS

Photo by Mikaela Wiedenhoff on Unsplash
PS /Users/userone> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection New-PSSession: This parameter set requires WSMan, and no supported WSMan client library was found. WSMan is either not installed or unavailable for this system.

Quick answer ! Reason behind this problem is openssl version on MacOS . pwsh need openssl v 1.0. We need to reinstall openssl using home brew.

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/64555220bfbf4a25598523c2e4d3a232560eaad7/Formula/openssl.rb -f

Home Brew in MacOS BigSur is broken and unable to install the Openssl 1.0.2 install and to solve this Mac Ports can be used to install Openssl 1.0

sudo port selfupdate sudo port upgrade outdated sudo port install openssl10

some cases may need to update the symbolic links

sudo mkdir -p /usr/local/opt/openssl sudo ln -s /opt/local/lib /usr/local/opt/openssl/lib

That’s it . now open the Exchange Online PowerShell using

$UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session -DisableNameChecking

To Disconnect Enter

#Close Session Remove-PSSession $Session

Originally published at https://affan.info on June 26, 2020.

--

--

--

IT Infrastructure Specialist , Open-source enthusiast

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

No need to reinvent the wheel for User Identity Management

How to Monitor Network Connectivity to Microsoft Teams, Office 365 & Azure

How to Monitor Network Connectivity to Microsoft Teams, Office 365 & Azure Obkio

I will convert psd, xd, figma, sketch to html css bootstrap

How to install 3.5 inch touch screen with Raspberry PI and Volumio

What could kill our SAFe Implementation?

CertiK Audit Completed

Testing LiDAR LD06

My First Date with an Arduino

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Affan Javid

Affan Javid

IT Infrastructure Specialist , Open-source enthusiast

More from Medium

Setup SFTP-only user for accessing Drupal’s public files on Ubuntu 22.04

Setup SFTP-only user for accessing Drupal’s public files on Ubuntu 22.04

Rebuilding with Eleventy

SOPHOS FIREWALL PERMIT MAC ADDRESS

How to use grunt in Magento 2?