Solved

Exchange Mount Disk Space Script

Posted on 2016-10-10
6
49 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
A brief introduction to what I consider to be the best editor for PowerShell.
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…
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…

860 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