Solved

Exchange Mount Disk Space Script

Posted on 2016-10-10
6
32 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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

Integrate social media with email signatures

Is your company active on social media? Do you also use email signatures? Including social media icons in your email signature is a great way to get fans for free. Let all your email users know you’re on social media quickly and easily, in a single click.

Join & Write a Comment

Synchronize a new Active Directory domain with an existing Office 365 tenant
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this video we show how to create a User Mailbox 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 >> Mailb…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

708 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

17 Experts available now in Live!

Get 1:1 Help Now