Overview
I use the Microsoft Windows Terminal every day. It comes in very handy in a hybrid environment.
Exchange Online
The Command
"%localappdata%\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe" -NoExit -Command "Import-Module ExchangeOnlineManagement; Connect-ExchangeOnline -UserPrincipalName:jheisler@johnjheisler.com"
The Profile JSON
{
"commandline": "\"%localappdata%\\Microsoft\\WindowsApps\\Microsoft.PowerShell_8wekyb3d8bbwe\\pwsh.exe\" -NoExit -Command \"Import-Module ExchangeOnlineManagement; Connect-ExchangeOnline -UserPrincipalName:jheisler@johnjheisler.com\"",
"icon": "C:\\WindowsTerminal\\ExchangeAdmin.png",
"name": "Exchange Online",
"startingDirectory": "%USERPROFILE%"
}
Exchange On-Prem
The Command
"%localappdata%\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe" -NoExit -Command "$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://mail.johnjheisler.com/powershell/; Import-PSSession $Session -DisableNameChecking"
The Profile JSON
{
"commandline": "\"%localappdata%\\Microsoft\\WindowsApps\\Microsoft.PowerShell_8wekyb3d8bbwe\\pwsh.exe\" -NoExit -Command \"$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://mail.johnjheisler.com/powershell/; Import-PSSession $Session -DisableNameChecking\"",
"icon": "C:\\WindowsTerminal\\MailAdmin.png",
"name": "Exchange On-Prem",
"startingDirectory": "%USERPROFILE%"
}
The Icons
The Icons I use are:
The original blue Exchange Logo for Exchange Online and the Exchange Logo color shifted to Orange for Exchange On-Prem