Welcome in this course we'll be talking about managing mail boxes with power shell.
The concept of the mailbox is the core feature of an exchange solution and it's likely that almost everything
you do as an Exchange administrator will revolve around this component.
Now in exchange 2016 the architecture has changed once more and lots of new come glass and features
have been introduced that make life much easier for an Exchange administrator allowing you to do just
about anything you think of when it comes to managing mail boxes through scripts and one liners.
This includes tasks such as movent important export to remove and searching and reconnect and mailboxes
just to name a few.
And this person will learn how to generate reports perform bulk mailbox changes repair corrupt mailboxes
search and delete emails and much more.
So let's start with reporting on mailbox sizes using common glass from both the Exchange management
shell and Lindows Power Shell gives us the ability to generate detailed reports and this video will
use Luscum and glass to report on the mailboxes within the organization and their total size.
Let's look at how to generate and export the report of a mailbox.
You of the following steps will use the following command to generate a report of each mailbox in the
organization and the total mailbox size.
The command looks like this.
Get mailbox database by it to get mailbox statistics and pipe it to filter and request and then will
select object by display name and total item size.
We'll talk about this command a bit later.
And now about the command to export the report so the command even further to export the report to the
CSP file that can be opened and formatted in Excel.
To do this we'll use gurt mailbox database command letter Gamme then we'll pipe it to get mailbox statistics
filtering biocide time and then select the display name total item size and pipe it to experts say 3
command left.
These command that we are use and to export the reporters Fitz's Ripp file.
We have also to specify the path to the file and its name.
So in both the commands we are using that get mailbags database commands let to type.
Each database in the organization to the get mailbox to do sticks command left.
Note that in the next stage of the pipeline we are filtering all the disconnect data property inside
the filter.
Were you the exclamation character which is a shortcut to the not a borate or in power shell.
So we are basically asking to get all the mailboxes in the organization that are not in a disconnected
state.
This can be standard mailboxes as well as archive mailboxes read them select the display name and total
item size properties that give us the name and the total mailbox size of each mailbox.
When we are using the first example to view the mailboxes and their total size you will see that the
output in the shell looks similar to mine.
Here you can see that we get the total size and megabytes as well as in bytes.
If you find that this additional information is not useful you can extend the previous one liner using
the calculated property and the command will look like that.
Get mailboxes by get mailbox statistics by a row object.
We are selecting sort of filtering on the disconnect date property and then we pipe to select object
with display name and my calculated property in which we want size in megabytes in descending order.
Note that we all have a constant proper to call to size and B that reports only the mailbox size in
megabytes.
We have also sorted this property descend in order and my boxes are now listed from largest to smallest.
Based on are size you can continue to pile this compound down to expert.
Skills.
We come and glad to generate a report that can be viewed outside the shell.