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 logfiles 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 by using WMI. Use the following command to display the capacity and free space of each local fixed disk:
    Get-WmiObject Win32_LogicalDisk -Filter "DriveType='3'" ...

Get Microsoft Exchange Server 2013 PowerShell Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.