
Reporting, Maintenance, and
Administration
By this point in reading this book you probably have a list of scripts that you want to put together
because you want to try them out in your messaging environment. As you can imagine, once you
really begin to harness the power of PowerShell you are going to have more and more ideas that
you want to try out. In this chapter we discuss using PowerShell to create some reports and to help
automate some administrative tasks. Because the sheer breadth of what you can accomplish with
PowerShell scripting is immense, we are going to pick just a few examples to give you the tools
you need to create your own scripts.
This chapter covers:
❑ Reading in files for processing
❑ Advanced output techniques
❑ Examples for using these techniques
Reading in Files
This section discusses the following cmdlets:
❑ Import-Csv
❑ Get-Content
One of the basic functions you will want to perform is to read in a file and work with the data that
you find. You might wish to read in a file with a list of mailboxes that need to be created, or you
might need to update a list of mailboxes with new office information. If you have been using
c16.indd 465c16.indd 465 12/17/07 5:30:24 PM12/17/07 5:30:24 PM