Reputation: 435
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.
Upvotes: 1
Views: 3299
Reputation: 24071
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.
Upvotes: 4