Exchange Server Share

… Information sharing on Exchange Server …

Exchange Powershell Tip #11

leave a comment »

Exchange Powershell Tip #11

How much free disk space I have on my Exchange Servers?

This is more Windows related tip but we often need to find out how much free disk space we have on our Exchange Servers. More importantly on the database/log drives. Also we know that if we have more number of disks then instead of Drive Letters we have mount points on Exchange servers.

This cmdlet will get the list of all the Disks (excluding CD/DVD with $_.drivetype -ne 5 filter) and Mount Points on all the Exchange Servers in the environment.

Get-ExchangeServer | ForEach{Get-WmiObject -query “Select * from Win32_Volume” -ComputerName $_.name -ErrorAction SilentlyContinue | where{$_.name -notlike “\\?*” -and $_.drivetype -ne 5} | Sort-Object -Property Name | Format-Table SystemName, Name, @{Name=”Capacity (GB)”;expression={[math]::Round(($_.Capacity/1GB),2) }}, @{Name=”FreeSpace (GB)”;expression={[math]::Round(($_.FreeSpace/1GB),2) }}, @{Name=”Free %”;expression={[math]::Round(($_.FreeSpace/$_.Capacity *100),2) }}}

Sample output: (I have only one drive on my test machines, but you would see all the Drives including Mount Points)

#11-1

==> Get All Exchange Powershell Tips from the ArchiveĀ Here<==

Written by Amit Tank

October 1, 2016 at 10:24 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: