Solved

Exchange Mount Disk Space Script

Posted on 2016-10-10
6
60 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

691 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