Create Profiles for Managing Microsoft Exchange using Windows Terminal (Online and On-Prem)

I use Windows Terminal a lot and I wanted to show off how I setup Exchange Management profiles to make my life easier.
Enjoy!

Exchange Online:

In Windows Terminal, go to "Settings" and click "Add a new profile" at the bottom.
Give it a name you like, and in the "Command line" field, Paste the following:

powershell.exe -NoExit -Command "Import-Module ExchangeOnlineManagement; Connect-ExchangeOnline -UserPrincipalName user@contoso.com"


 Make sure to replace the UserPrincipalName property with your own.



On-Prem Exchange:

In Windows Terminal, go to "Settings" and click "Add a new profile" at the bottom.
Give it a name you like, and in the "Command line" field, Paste the following:

powershell.exe -NoExit -Command "$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://exchange.domain.com/powershell/; Import-PSSession $Session -DisableNameChecking"


 Make sure to replace the ConnectionUri property with your own.





I use these two images to know which tab is which
R-Click > Save as...






For More info on Connecting to MS 365 Exchange Online, Sharepoint online, Teams, AzureAD, and Local Exchange from powershell. Check out the following post by Kris Olaf: https://www.krisolaf.net/2021/05/connecting-to-ms-365-exchange-online.html

Comments

Popular posts from this blog

Give a User 'SendAs' permssions to a Mail-Enabled AD Group in Exchange Online

Get a User's Active Directory Groups