Difference between revisions of "Powershell Commands"
Line 4: | Line 4: | ||
</code> | </code> | ||
+ | ==Users and Mailbox Items== | ||
+ | A quick overview of users and how many items they have in their mailbox: | ||
− | |||
<code> | <code> | ||
Get-Mailbox | Get-MailboxStatistics | Get-Mailbox | Get-MailboxStatistics | ||
Line 11: | Line 12: | ||
For more detail add "| FL" but it would be best to pipe to a file | For more detail add "| FL" but it would be best to pipe to a file | ||
+ | |||
<code> | <code> | ||
Get-Mailbox | Get-MailboxStatistics | FL > c:\stats.txt | Get-Mailbox | Get-MailboxStatistics | FL > c:\stats.txt | ||
+ | </code> | ||
+ | |||
+ | ==Queues== | ||
+ | An Exchange server can become bogged down if the queues cannot clear. You can see the queue status with: | ||
+ | |||
+ | <code> | ||
+ | Get-Queue | ||
+ | </code> | ||
+ | |||
+ | If there are thousands of message (e.g. in \Unreachable) and they are not clearing then there is an issue. You can open Exchange Toolbox and in Queue Viewer delete messages. If that is not successful then you need to restart the Microsoft Exchange Edge Transport, Microsoft Exchange Mailbox Transport Delivery and/or SMTP services | ||
+ | |||
+ | ==Basic Authentication== | ||
+ | Retain needs Basic Authentication enabled across the system not just on one CAS. | ||
+ | |||
+ | ===EWS=== | ||
+ | This script shows the | ||
+ | <code> | ||
+ | Get-WebServicesVirtualDirectory | ft server,basicauthentication | ||
</code> | </code> |
Revision as of 19:47, 6 October 2015
Useful Powershell commands
Contents |
Users and Mailbox Items
A quick overview of users and how many items they have in their mailbox:
Get-Mailbox | Get-MailboxStatistics
For more detail add "| FL" but it would be best to pipe to a file
Get-Mailbox | Get-MailboxStatistics | FL > c:\stats.txt
Queues
An Exchange server can become bogged down if the queues cannot clear. You can see the queue status with:
Get-Queue
If there are thousands of message (e.g. in \Unreachable) and they are not clearing then there is an issue. You can open Exchange Toolbox and in Queue Viewer delete messages. If that is not successful then you need to restart the Microsoft Exchange Edge Transport, Microsoft Exchange Mailbox Transport Delivery and/or SMTP services
Basic Authentication
Retain needs Basic Authentication enabled across the system not just on one CAS.
EWS
This script shows the
Get-WebServicesVirtualDirectory | ft server,basicauthentication