Exchange Server Share

… Information sharing on Exchange Server …

Exchange Powershell Tip #11

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 $ -ErrorAction SilentlyContinue | where{$ -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)


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


Written by Amit Tank

October 1, 2016 at 10:24 pm

%d bloggers like this: