1
PS C:\Windows\system32> Connect-ExchangeOnline -Credential $Credential | Out-Null

We have released new management cmdlets which are faster and more reliable.

|--------------------------------------------------------------------------|

| Old Cmdlets | New/Reliable/Faster Cmdlets |

|--------------------------------------------------------------------------|
| Get-CASMailbox | Get-EXOCASMailbox |
| Get-Mailbox | Get-EXOMailbox |
etc.
|--------------------------------------------------------------------------|

Connect-ExchangeOnline always prints this banner message whenever the command is invoked. How to disable this from getting printed.

Steps I tried:

- Piping to Out-Null.
- Assigning to $null.
- Invoking the command with -NoLogo attached
        Connect-ExchangeOnline -Credential $Credential -NoLogo

The command banner is getting printed even then.

I cannot change the way the PowerShell process is getting invoked as there is a wrapper layer that is calling the PowerShell.

The only modification that can be made is in the PowerShell script.

vonPryz
  • 22,996
  • 7
  • 54
  • 65
AJain2810
  • 375
  • 3
  • 11

1 Answers1

4

This is poorly documented, as Connect-ExchangeOnline doesn't mention -ShowBanner:$false switch, as Use the Exchange Online PowerShell V2 module page does.

To disable the banner, pass $false as ShowBanner switch parameter. Exchange cmdlets are the odd man out there, as most cmdlets just require the switch presence. Not so with Exchange, which I wondered about five years ago. In Exchange cmdlets, switch values need to be specified too.

vonPryz
  • 22,996
  • 7
  • 54
  • 65