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总是在调用命令时打印此横幅消息。如何禁止其打印。
我尝试过的步骤:
- Piping to Out-Null.
- Assigning to $null.
- Invoking the command with -NoLogo attached
Connect-ExchangeOnline -Credential $Credential -NoLogo
即使到那时,命令横幅仍会被打印。
我无法更改PowerShell进程的调用方式,因为有一个包装层正在调用PowerShell。
唯一可以进行的修改是在PowerShell脚本中。
-ShowBanner:$false
页面那样提及Use the Exchange Online PowerShell V2 module开关。要禁用标题,请将$false
作为ShowBanner
开关参数传递。 Exchange cmdlet很奇怪,因为大多数cmdlet都只需要交换机存在。对于Exchange,情况并非如此,我对five years ago感到疑惑。在Exchange cmdlet中,也需要指定开关值。