Used and free space
Hello 1) How can I know the overall used and free space of my Exchange 2007 organization. --> I refered to the thread :http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/d9941714-8096-46ab-87b0-b6e3750ca4b2 Using the nice script from Laeeq Qazi, I get Size (GB) / Size (MB) and User Count. But I would need as well the the storage groups' free space 2) As users belong to different Storgae group. Would I be able to set a sort of warning to inform me directly when a storage group is about to be full. OR run from time to time a shell command/script that would give me the used and free space on each storage group. 3) In fact I would like to create an automatic monthly report based on the above questions: - knowing the overall used and free space of my Exchange 2007 organization - get the used and free space on each storage group. Thanks to all in advance. Graig
May 21st, 2010 12:40pm

Hi, Just needed some clarification what do you meant my storage group free space, in my point of view you can get the same by know the free disk space of drive in which its stored & there are a lot of script got disk space alert Here is a good article: http://technet.microsoft.com/en-us/library/ee198866.aspx Const CONVERSION_FACTOR = 1048576 Computer = "ServerA" Set objWMIService = GetObject("winmgmts://" & Computer) Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='c:'") FreeMegaBytes = objLogicalDisk.FreeSpace / CONVERSION_FACTOR Wscript.Echo Int(FreeMegaBytes) Clearly that will only look at C: drive but I am sure you can work out a recursive "for each" and parse it to str. Ripu Daman Mina | MCSE 2003 & MCSA Messaging
Free Windows Admin Tool Kit Click here and download it now
May 21st, 2010 3:55pm

Here is one I built and use often. function get-diskspace ($server){ #This function will return current diskspace for all volumes on the specified server" gwmi WIN32_Volume -computername $server | where {$_.drivetype -eq 3} | ` select @{name="Server Name";Expression={$server}},` Name, @{Name="Total Size (MB)";Expression={"{0:N0}" -f ($_.capacity / 1mb)}},` @{Name="Free Space (MB)";Expression={"{0:N0}" -f ($_.freespace / 1mb)}},` @{Name="% Free Space";Expression={[math]::round((([INT64]$_.freespace / [INT64]$_.capacity) * 100),0)}} } With this script you can not only grab the data from local drives but also mount points. ex. get-diskspace "servername" | ft -auto Server Name Name Total Size (MB) Free Space (MB) % Free Space ----------- ---- --------------- --------------- ------------ localhost C:\ 152,315 119,744 79 Exchange & Powershell Geek MCITP: Enterprise Messaging Administrator MCITP: Enterprise Messaging Administrator 2010
May 21st, 2010 4:39pm

Hello, That script is perfect But I would really need the free Space for each SG. Could you please help me to insert that command in the below script??? # Get all the Mailbox servers and users count ForEach ($server in Get-MailboxServer) { # For each Mailbox server, get all the databases on it $strDB = Get-MailboxDatabase -Server $server # For each Database, get the information from it ForEach ($objItem in $strDB) { $intUsers = ($objitem | Get-Mailbox -ResultSize Unlimited).count # Get the size of the database file $edbfilepath = $objItem.edbfilepath $path = "`\`\" + $server + "`\" + $objItem.EdbFilePath.DriveName.Remove(1).ToString() + "$"+ $objItem.EdbFilePath.PathName.Remove(0,2) $strDBsize = Get-ChildItem $path $ReturnedObj = New-Object PSObject $ReturnedObj | Add-Member NoteProperty -Name "Server\StorageGroup\Database" -Value $objItem.Identity $ReturnedObj | Add-Member NoteProperty -Name "Size (GB)" -Value ("{0:n2}" -f ($strDBsize.Length/1048576KB)) $ReturnedObj | Add-Member NoteProperty -Name "Size (MB)" -Value ("{0:n2}" -f ($strDBsize.Length/1024KB)) $ReturnedObj | Add-Member NoteProperty -Name "User Count" -Value $intUsers Write-Output $ReturnedObj } }
Free Windows Admin Tool Kit Click here and download it now
May 25th, 2010 3:02pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics