Combining Get-MailboxDatabase script with win32_logicaldisk script
We're watching our mail database sizes with a simple Powershell script Get-MailboxDatabase -Status | ft name,databasesize,availablenewmailboxspace -auto We'd like to somehow add the actual disk size that we pull from get-WmiObject win32_logicaldisk -ComputerName servername -Filter "Drivetype=3" | ft SystemName,DeviceID,VolumeName,@{Label="Total Size";Expression={$_.Size / 1gb -as [int] }},@{Label="Free Size";Expression={$_.freespace / 1gb -as [int] }} -autosize Has anyone done this before? Orange County District Attorney
March 27th, 2012 10:46am

Hello Sandy, You can put this command in notepad one by one and save it as .PS1 file. Then run the .ps1 file from the shell.Kottees : My Blog : Please mark it as an answer if it really helps you.
Free Windows Admin Tool Kit Click here and download it now
March 27th, 2012 2:36pm

Thanks for the note, I appreciate the response. Did the code get missed?Orange County District Attorney
March 27th, 2012 2:46pm

I'm sorry, not getting you. Kottees : My Blog : Please mark it as an answer if it really helps you.
Free Windows Admin Tool Kit Click here and download it now
March 27th, 2012 2:48pm

My apologies. You mentioned that I could "put this command in notepad...." I don't see any commands.......Orange County District Attorney
March 27th, 2012 2:54pm

the same what you have.. like this.. Get-MailboxDatabase -Status | ft name,databasesize,availablenewmailboxspace -auto get-WmiObject win32_logicaldisk -ComputerName servername -Filter "Drivetype=3" | ft SystemName,DeviceID,VolumeName,@{Label="Total Size";Expression={$_.Size / 1gb -as [int] }},@{Label="Free Size";Expression={$_.freespace / 1gb -as [int] }} -autosize Kottees : My Blog : Please mark it as an answer if it really helps you.
Free Windows Admin Tool Kit Click here and download it now
March 27th, 2012 2:56pm

Thanks!Orange County District Attorney
March 27th, 2012 3:06pm

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

Other recent topics Other recent topics