Solved

Exchange Mount Disk Space Script

Posted on 2016-10-10
6
39 Views
Last Modified: 2016-11-02
Hi Expert Team -

I’m looking for a script that can provide me with Exchange Mailbox mount points disk space info. This is what I’m looking for:

The script should have the following
1.      Should only look for the MBX severs in our site
2.      It should look for all mount points on each MBX server
3.      Each server should be on its own excel tab
4.      Plus, the following headers for each tab

Headers:
Volume Name – Capacity GB – Free Space GB - %Free

Any assistance would be greatly appreciated.

Thank you
JohnM
0
Comment
Question by:johnmerrick99
  • 2
  • 2
  • 2
6 Comments
 
LVL 36

Expert Comment

by:Jian An Lim
ID: 41837992
it can be done easily via powershell

what version of exchange you using?

(i need to check which powershell to look for mount point)
0
 

Author Comment

by:johnmerrick99
ID: 41840110
Thank you Jian An Lim -

The version of Exchange we are using is Exchange 2010 SP3 RU14.

Thanks for your assistance. I greatly appreciate it.

JohnM
0
 
LVL 36

Expert Comment

by:Jian An Lim
ID: 41841177
next question is your mount on a disk or a volume?

do you seperate your log file to database ?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:johnmerrick99
ID: 41841900
HI Jian An Lim -

Thanks for the quick response.

Our Exchange has a dedicated storage array. LUNs are presented to the vplex (storage virtualization) and then to the Exchange hosts. So to the Exchange servers, there are multiple physical disks. So DBs and Logs are on separate disks.
Hopes this helps....

JohnM
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points (awarded by participants)
ID: 41843924
I have an old script which I was using to report all database and log volumes. Made some changes based on your requirement, check and see if it works for you..
#load Exchange 2010 PSSnapin
Add-PSSnapin Microsoft.Exchange.Management.Powershell.Support
Add-PSSnapin  Microsoft.Exchange.Management.PowerShell.E2010
#Function to get database and volume information
Function Get-WmiVolumeFromPath([string] $FilePath, [string] $Server) {
    do {
        $FilePath = $FilePath.Substring(0, $FilePath.LastIndexOf('\') + 1)
        $wmiFilter = ('Name="{0}"' -f $FilePath.Replace("\", "\\"))
        $volume = get-wmiobject -class win32_volume -computername $Server -filter $wmiFilter
        $FilePath = $FilePath.Substring(0, $FilePath.LastIndexOf('\'))
    } while ($volume -eq $null)
    return $volume 
}
#Get Server List
$Servers = Get-MailboxServer | Select -Exp Name
$Servers | % {
$Svr = $_
 #Get Mailbox Database
 $DBS = Get-MailboxDatabase -Server $Svr
	$DBS | % {
	$DB = $_.Name
	$LogPath = "$($_.LogFolderPath.pathname)\"
	$DBPath = "$($_.EdbFilePath.pathname)"
	#Get DB Volume
	Get-WmiVolumeFromPath $DBPath $Svr | Select *,@{N="Type";E={"Database"}},@{N="Database";E={$DB}}
	#Get Log Volume
	Get-WmiVolumeFromPath $LogPath $Svr | Select *,@{N="Type";E={"Log"}},@{N="Database";E={$DB}}
	} | %{
	#Create Output
	$TotSpace=[math]::Round(($_.Capacity/1GB),2)
	$FrSpace=[Math]::Round(($_.Freespace/1GB),2)
	$UsedSpace=[Math]::Round(($TotSpace - $FrSpace),2)
	$FreePercent = [Math]::Round((($FrSpace/$TotSpace)*100),2)
	New-Object PSObject -Property @{
		Server = $_.__SERVER
		Database = $_.Database
		Type = $_.Type
		Volume = $_.Caption
		"Total Capacity GB" = $TotSpace
		"Used Capacity GB" = $UsedSpace
		"Free Space GB" = $FrSpace
		"Free Space %" = $FreePercent
	}
 }
} | Select Server,Database,Type,Volume,T*B,U*B,F*B,"F*%" |
Export-Csv C:\Temp\ServerReport.csv -nti

Open in new window

1
 
LVL 40

Expert Comment

by:Subsun
ID: 41869842
The script should provide required details about exchange log volumes.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
Read this checklist to learn more about the 15 things you should never include in an email signature.
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now