O'Reilly logo

Microsoft Exchange 2010 PowerShell Cookbook by Mike Pfeiffer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reporting on disk usage

Keeping an eye on hard disk utilization is a key component in any monitoring solution. Depending on the environment, Exchange databases can grow quickly, and several gigabytes of log files can be generated in a short period of time. Obviously, you need to know if you are getting low on free disk space. In addition, you may want to track your disk utilization over time to plan upgrades and changes to your systems. This recipe will show you how you can quickly report on the disk usage on each of your servers.

How to do it...

  1. One of the quickest ways to determine disk usage is using WMI. Use the following code to display the capacity and free space of each local fixed disk:
    Get-WmiObject Win32_LogicalDisk -Filter "DriveType='3'" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required