Solved

Exchange Mount Disk Space Script

Posted on 2016-10-10
6
57 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 37

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 37

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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
In this video we show how to create a mailbox database 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 Servers >> Data…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

739 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