{"id":910,"date":"2012-02-08T12:45:32","date_gmt":"2012-02-08T17:45:32","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=910"},"modified":"2012-02-08T12:45:32","modified_gmt":"2012-02-08T17:45:32","slug":"check-database-sizes-with-powershell","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2012\/02\/check-database-sizes-with-powershell\/","title":{"rendered":"Check Database Sizes with PowerShell"},"content":{"rendered":"<p>Exchange 2007 check the database size with a powershell ps command.<\/p>\n<p>I found this from Mike Pfeiffer&#8217;s Blog &#8211; thanks <a href=\"http:\/\/www.mikepfeiffer.net\/2010\/05\/quick-tip-how-to-check-exchange-database-size-with-powershell\/\" target=\"_blank\">Mike<\/a>.<\/p>\n<p><code>Get-MailboxDatabase | foreach-object {add-member -inputobject $_ -membertype noteproperty -name mailboxdbsizeinGB -value ([math]::Round(([int64](get-wmiobject cim_datafile -computername $_.server -filter ('name=''' + $_.edbfilepath.pathname.replace(\"\\\",\"\\\\\") + '''')).filesize \/ 1GB),2)) -passthru} | Sort-Object mailboxdbsizeinGB -Descending | format-table identity,mailboxdbsizeinGB <\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exchange 2007 check the database size with a powershell ps command. I found this from Mike Pfeiffer&#8217;s Blog &#8211; thanks Mike. Get-MailboxDatabase | foreach-object {add-member -inputobject $_ -membertype noteproperty -name mailboxdbsizeinGB -value ([math]::Round(([int64](get-wmiobject cim_datafile -computername $_.server -filter (&#8216;name=&#8221;&#8217; + $_.edbfilepath.pathname.replace(&#8220;\\&#8221;,&#8221;\\\\&#8221;) + &#8221;&#8221;)).filesize \/ 1GB),2)) -passthru} | Sort-Object mailboxdbsizeinGB -Descending | format-table identity,mailboxdbsizeinGB<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-910","post","type-post","status-publish","format-standard","hentry","category-microsoft"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/910","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=910"}],"version-history":[{"count":1,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/910\/revisions"}],"predecessor-version":[{"id":911,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/910\/revisions\/911"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=910"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=910"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}