如何在 Exchange 命令行管理程序中过滤从未登录过的邮箱?

发布于 2024-07-14 04:02:18 字数 306 浏览 4 评论 0原文

我需要运行 Get-Mailbox | Get-MailboxStatistics 命令适用于大量邮箱,但大多数邮箱从未使用过,因为它是新安装的。 结果,我不得不阅读数百行

WARNING: There is no data to return for the specified mailbox '<mailbox DN>' because it has not been logged on to.

似乎我需要使用某种服务器端过滤器,但我一直无法找到任何合适的东西。

我在这里能做什么?

I need to run a Get-Mailbox | Get-MailboxStatistics command across a large number of mailboxes but the majority have never been used as it is a new install. As a result, I have to sit through hundreds of lines of

WARNING: There is no data to return for the specified mailbox '<mailbox DN>' because it has not been logged on to.

It would seem that I need to use a server-side filter of some kind but I haven't been able to find anything appropriate.

What can I do here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不爱素颜 2024-07-21 04:02:18

Get-MailboxStatistics 中没有服务器端过滤,我无法重现它。 你可以试试这个:

获取邮箱| Get-MailboxStatistics -warningAction默默继续

There is no server side filtering in Get-MailboxStatistics and I can't repro it. Can you try this:

Get-Mailbox | Get-MailboxStatistics -warningAction silentlyContinue

红玫瑰 2024-07-21 04:02:18

这是警告的标准 PS 行为。 您可以在 common_parameters get-help about_common_parameters 的帮助中找到 Shay 的参数。 或者,您可以设置$WarningPreference =silentlycontinue。 由于邮箱尚未初始化,因此没有统计信息可返回,因此会出现警告。

This is the standard PS behavior for warnings. You can find Shay's parameter in the help for common_parameters get-help about_common_parameters. Alternately, you can set $WarningPreference = silentlycontinue. There are no statistics to return as the mailboxes have not yet been initialized, hence the warning.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文