{"id":217,"date":"2010-09-20T11:58:16","date_gmt":"2010-09-20T09:58:16","guid":{"rendered":"http:\/\/marwin.e-blog.cz\/?p=217"},"modified":"2011-03-07T14:27:20","modified_gmt":"2011-03-07T12:27:20","slug":"powershell-commands-exchange-2007","status":"publish","type":"post","link":"https:\/\/svobodma.cz\/?p=217","title":{"rendered":"powershell commands exchange 2007"},"content":{"rendered":"<p><strong>dostanete ve v\u00fdstupu &#8211; jm\u00e9no serveru , Storage groups , jm\u00e9no , po\u010det mailbox\u016f v DB<\/strong><\/p>\n<p>Get-MailboxDatabase | Select Server, StorageGroupName, Name, @{Name=&#8220;Number Of Mailboxes&#8220;;expression={(Get-Mailbox -Database $_.Identity | Measure-Object).Count}} | Format-Table -AutoSize<\/p>\n<p><strong>p\u0159evzato a odzkou\u0161eno <\/strong><\/p>\n<p><a href=\"http:\/\/exchangeshare.wordpress.com\/2009\/07\/27\/exchange-2007-database-statistics-in-powershell\/\">http:\/\/exchangeshare.wordpress.com\/2009\/07\/27\/exchange-2007-database-statistics-in-powershell\/<\/a><\/p>\n<p><strong>Velikost DB<\/strong><\/p>\n<p><span style=\"font-family: Verdana, Tahoma, Arial, sans-serif; line-height: 21px; color: #016fdc;\">Get-MailboxDatabase | Select Server, StorageGroupName, Name, @{Name=&#8220;Size (GB)&#8220;;Expression={$objitem = (Get-MailboxDatabase $_.Identity); $path = &#8222;`\\`\\&#8220; + $objitem.server + &#8222;`\\&#8220; + $objItem.EdbFilePath.DriveName.Remove(1).ToString() + &#8222;$&#8220;+ $objItem.EdbFilePath.PathName.Remove(0,2); $size = ((Get-ChildItem $path).length)\/1048576KB; [math]::round($size, 2)}}, @{Name=&#8220;Size (MB)&#8220;;Expression={$objitem = (Get-MailboxDatabase $_.Identity); $path = &#8222;`\\`\\&#8220; + $objitem.server + &#8222;`\\&#8220; + $objItem.EdbFilePath.DriveName.Remove(1).ToString() + &#8222;$&#8220;+ $objItem.EdbFilePath.PathName.Remove(0,2); $size = ((Get-ChildItem $path).length)\/1024KB; [math]::round($size, 2)}}, @{Name=&#8220;No. Of Mbx&#8220;;expression={(Get-Mailbox -Database $_.Identity | Measure-Object).Count}} | Format-table -AutoSize<\/span><\/p>\n<p><strong>velikost DB<\/strong><\/p>\n<div id=\"_mcePaste\"><em>[PS] C:\\Documents and Settings\\Administrator&gt;<\/em>$dbs = Get-MailboxDatabase -server<\/div>\n<div id=\"_mcePaste\"><strong>e<\/strong> ; $dbsizes=@{}; ForEach ($db in $dbs) {$file = Get-ChildItem $db.EdbFilePath;<\/div>\n<div id=\"_mcePaste\">$dbsizes.Add($db.Name,$File.Length)}; $dbsizes.GetEnumerator() | Sort-object Val<\/div>\n<div id=\"_mcePaste\">ue<\/div>\n<p>\n<a href=\"http:\/\/powergui.org\" title=\"Best free PowerShell script editor\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.powergui.org\/servlet\/KbServlet\/download\/3065-102-5115\/PowerGUI_Badge_GetToThePrompt2-Pro.jpg\" alt=\"Get-ToThePrompt -at PowerGUI.org\" width=\"200\" height=\"75\" \/><br \/>\n<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>dostanete ve v\u00fdstupu &#8211; jm\u00e9no serveru , Storage groups , jm\u00e9no , po\u010det mailbox\u016f v DB Get-MailboxDatabase | Select Server, StorageGroupName, Name, @{Name=&#8220;Number Of Mailboxes&#8220;;expression={(Get-Mailbox -Database $_.Identity | Measure-Object).Count}} | Format-Table -AutoSize p\u0159evzato a odzkou\u0161eno http:\/\/exchangeshare.wordpress.com\/2009\/07\/27\/exchange-2007-database-statistics-in-powershell\/ Velikost DB Get-MailboxDatabase | &hellip; <a href=\"https:\/\/svobodma.cz\/?p=217\">Cel\u00fd p\u0159\u00edsp\u011bvek <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-217","post","type-post","status-publish","format-standard","hentry","category-exchange-server"],"_links":{"self":[{"href":"https:\/\/svobodma.cz\/index.php?rest_route=\/wp\/v2\/posts\/217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/svobodma.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/svobodma.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/svobodma.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/svobodma.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=217"}],"version-history":[{"count":6,"href":"https:\/\/svobodma.cz\/index.php?rest_route=\/wp\/v2\/posts\/217\/revisions"}],"predecessor-version":[{"id":219,"href":"https:\/\/svobodma.cz\/index.php?rest_route=\/wp\/v2\/posts\/217\/revisions\/219"}],"wp:attachment":[{"href":"https:\/\/svobodma.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/svobodma.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/svobodma.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}