<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Everyday Nerd &#187; Exchange</title>
	<atom:link href="http://everydaynerd.com/category/microsoft/software-microsoft/exchange/feed" rel="self" type="application/rss+xml" />
	<link>http://everydaynerd.com</link>
	<description>Just your everyday nerd</description>
	<lastBuildDate>Mon, 21 Nov 2011 17:55:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
  <link>http://everydaynerd.com</link>
  <url>http://everydaynerd.com/apple-touch-icon.png</url>
  <title>Everyday Nerd</title>
</image>
		<item>
		<title>PowerShell: Drive Space Info from multiple systems</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-drive-space-info-from-multiple-systems</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-drive-space-info-from-multiple-systems#comments</comments>
		<pubDate>Wed, 28 Sep 2011 18:24:13 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://everydaynerd.com/?p=1650</guid>
		<description><![CDATA[With PowerShell 2 came Powershell remoting and jobs, both of which are REALLY cool!  I&#8217;m going to show you two ways to get drive space info from multiple systems, first with a normal foreach loop, and then with remoting (which &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-drive-space-info-from-multiple-systems">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-get-uptime-for-computers' rel='bookmark' title='PowerShell: Get-Uptime for Computer(s)'>PowerShell: Get-Uptime for Computer(s)</a></li>
<li><a href='http://everydaynerd.com/how-to/easy-hyperlink-trick-for-windows-even-if-it-has-a-space-in-the-unc-path' rel='bookmark' title='Easy hyperlink trick for Windows (Even if it has a space in the UNC path)'>Easy hyperlink trick for Windows (Even if it has a space in the UNC path)</a></li>
<li><a href='http://everydaynerd.com/microsoft/create-multiple-rdp-files-with-powershell' rel='bookmark' title='Create multiple RDP files with Powershell'>Create multiple RDP files with Powershell</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>With PowerShell 2 came Powershell remoting and jobs, both of which are REALLY cool!  I&#8217;m going to show you two ways to get drive space info from multiple systems, first with a normal foreach loop, and then with remoting (which is basically a remote job).  Both methods use WMI class Win32_LogicalDisk to query the drives for information.</p>
<p>First, the old fashion foreach loop.  Notice the &#8220;Process&#8221; section &#8211; this in essence does a foreach of the $Identity &#8211; notice that in the parameter that the $Identity has  [object[]] in front of it.  Two things about this:  One, [] denotes an array, versus a single object.  Two, it&#8217;s object, instead of string, int or other data type.  Object allows the parameter to be just a string &#8211; a computer name (&#8220;SERVER01&#8243;), a string array (&#8220;SERVER01&#8243;, &#8220;SERVER02&#8243;), or even the identity from other objects (Get-ExchangeServer | GetDriveSpace).  I&#8217;ll be posting more in the future about parameters, and advanced functions (cmdletbinding).</p>
<pre class="brush: powershell; light: false; title: ; toolbar: true; notranslate">
Function GetDriveSpace
{
	[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact=&quot;Low&quot;)]
	param (
	[parameter(Mandatory=$true,HelpMessage=&quot;ComputerName(s)&quot;,ValueFromPipeline=$true)]
	[Object[]]$Identity
	)
	Process
	{
		$Name = (Get-WmiObject -ComputerName $Identity win32_computersystem  | Select Name).Name.ToString()
		$drives = Get-WmiObject -ComputerName $Identity Win32_LogicalDisk | Where-Object {$_.DriveType -eq 3}

		foreach($drive in $drives)
		{
			$NewObjectProperties = @{
				ComputerName=$Name;`
				DriveLetter=$drive.DeviceID;`
				Label=($drive.VolumeName);`
				DriveSize=($drive.Size/1gb).ToString(&quot;0.00&quot;);`
				FreeSpaceMB=($drive.freespace/1GB).tostring(&quot;0.00&quot;);`
				PercentFree=((($drive.freespace/1GB)/($drive.size/1GB))*100).tostring(&quot;0.00&quot;)`
			}
			New-Object psobject -Property $NewObjectProperties
		}
	}

	GetDriveSpace -Identity SERVER01

		Returns Drive Space Info for SERVER01

		.EXAMPLE
		PS] C:\&gt;Get-MailboxServer | GetDriveSpace | FT

		Returns Drive Space Info for Exchange Mailbox Servers

		.EXAMPLE
		PS] C:\&gt;GetDriveSpace -Identity SERVER01, SERVER02 | FT -AutoSize

		Returns Drive Space Info for SERVER01 &amp; SERVER02

		.NOTES
		Function Name : GetDriveSpace
		Author : Dan Burgess
		Email: nerd@everydaynerd.com
		Script Requires:  Powershell 2.0 or higher
	#&gt;
}
</pre>
<p>Now, lets do the same thing, but this time with PowerShell remoting.  As before, the function is utilizing  CmdletBinding, Parameter, with a single param [object[]]$Identity, and the Process block, but an End block as well.  In the Process block, each server passed in the parameter has a remote job started with the Invoke-Command cmdlet, passing the script block with the code to query WMI to return the disk space information.  Note the -AsJob switch &#8211; this allows the invoke-command to work in the background, instead of waiting on the job to finish.  The End block then checks all the jobs, and waits till none of the jobs have a status of &#8220;Running&#8221; before issuing a &#8220;Receive-Job&#8221;.  This gathers all the returned values from each job that ran.  The -Keep leaves a copy of the results in the job queue &#8211; if receive-job is run with out this, the results are removed from the job status.</p>
<pre class="brush: powershell; light: false; title: ; toolbar: true; notranslate">
Function GetDriveSpace-Remoting
{
	[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact=&quot;Low&quot;)]
	param (
	[parameter(Mandatory=$true,HelpMessage=&quot;ComputerName(s)&quot;,ValueFromPipeline=$true)]
	[Object[]]$Identity
	)
	Process
	{
		Invoke-Command -ComputerName $Identity -ScriptBlock {$drives = Get-WmiObject Win32_LogicalDisk | Where-Object {$_.DriveType -eq 3}
			foreach($drive in $drives)
			{
				$NewObjectProperties = @{
					DriveLetter=$drive.DeviceID;`
					Label=($drive.VolumeName);`
					DriveSizeMB=($drive.Size/1gb).ToString(&quot;0.00&quot;);`
					FreeSpaceMB=($drive.freespace/1GB).tostring(&quot;0.00&quot;);`
					PercentFree=((($drive.freespace/1GB)/($drive.size/1GB))*100).tostring(&quot;0.00&quot;)`
				}
				New-Object psobject -Property $NewObjectProperties
			}
		} -SessionOption (New-PSSessionOption -NoMachineProfile) -AsJob

	}
	End
	{
		While (Get-Job -State &quot;Running&quot;)
		{
			$i = ((Get-Job).Count) - ((Get-Job -State &quot;Running&quot;).count)
			$Progress = [int][Math]::Ceiling(($i / ((Get-Job).Count) * 100))
			Write-Progress -Activity &quot;Waiting on $(((Get-Job -State &quot;Running&quot;).count)) Jobs to finish&quot; -PercentComplete $progress -Status &quot;$($progress)% Complete&quot; -Id 1;
		}
		$Results = Get-Job | % {Receive-Job $_ }
		$Results
	}

	GetDriveSpace-Remoting -Identity SERVER01

		Returns Drive Space Info for SERVER01

		.EXAMPLE
		PS] C:\&gt;Get-MailboxServer | GetDriveSpace-Remoting | FT

		Returns Drive Space Info for Exchange Mailbox Servers

		.EXAMPLE
		PS] C:\&gt;GetDriveSpace-Remoting -Identity SERVER01, SERVER02 | FT -AutoSize

		Returns Drive Space Info for SERVER01 &amp; SERVER02

		.NOTES
		Function Name : GetDriveSpace-Remoting
		Author : Dan Burgess
		Email: nerd@everydaynerd.com
		Script Requires:  Powershell 2.0 or higher and WinRM enabled on remote hosts
	#&gt;
}
</pre>
<p>Both methods work, but in my tests, the remote function was MUCH faster when pulling from multiple systems.  For a list of 48 systems, the normal foreach loop took 30 seconds, while the remote function only took 5 seconds!!!</p>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-get-uptime-for-computers' rel='bookmark' title='PowerShell: Get-Uptime for Computer(s)'>PowerShell: Get-Uptime for Computer(s)</a></li>
<li><a href='http://everydaynerd.com/how-to/easy-hyperlink-trick-for-windows-even-if-it-has-a-space-in-the-unc-path' rel='bookmark' title='Easy hyperlink trick for Windows (Even if it has a space in the UNC path)'>Easy hyperlink trick for Windows (Even if it has a space in the UNC path)</a></li>
<li><a href='http://everydaynerd.com/microsoft/create-multiple-rdp-files-with-powershell' rel='bookmark' title='Create multiple RDP files with Powershell'>Create multiple RDP files with Powershell</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-drive-space-info-from-multiple-systems/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exchange PowerShell Script: Get Mailbox Count by Database</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database#comments</comments>
		<pubDate>Sat, 26 Mar 2011 17:20:55 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database</guid>
		<description><![CDATA[&#160; Here’s a PowerShell script that does a quick count of mailboxes on each database of a server, or all servers – depending if you specify the server name as a script parameter. ** Updated:&#160; I made some improvements to &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/script-to-find-whitespace-on-all-exchange-2007-servers' rel='bookmark' title='Script to Find Whitespace on all Exchange 2007 Servers'>Script to Find Whitespace on all Exchange 2007 Servers</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/script-get-time-of-exchange-last-online-defrag' rel='bookmark' title='Script: Get time of Exchange last online defrag'>Script: Get time of Exchange last online defrag</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-display-exchange-2007-queue-by-site' rel='bookmark' title='Powershell Script: Display Exchange 2007 Queue by Site'>Powershell Script: Display Exchange 2007 Queue by Site</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://everydaynerd.com/wp-content/uploads/2010/07/exchange2k7.png">&nbsp;<img src="http://everydaynerd.com/wp-content/uploads/2011/03/windows_powershell_icon-e1301251108185.png"></p>
<p>Here’s a PowerShell script that does a quick count of mailboxes on each database of a server, or all servers – depending if you specify the server name as a script parameter.</p>
<p>** Updated:&nbsp; I made some improvements to the script, and have posted the updated code.&nbsp; One notable items is that I separated the count of mailboxes and disconnected mailboxes.&nbsp; Previously, the count included both mailboxes and disconnected mailboxes.&nbsp; This may skew the numbers a bit, depending on what&nbsp; you are looking for.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #008000">#=================================================================================================</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #008000"># NAME: Get-MailboxCountPerDatabase.ps1</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #008000">#</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #008000"># AUTHOR:  Dan B.</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> <span style="color: #008000"># EMAIL:   Nerd@EverydayNerd.com </span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span> <span style="color: #008000"># DATE:    03/27/2011</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span> <span style="color: #008000"># Version: 1.0</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span> <span style="color: #008000">#</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span> <span style="color: #008000"># COMMENT: Script to return the count of mailboxes on each server by database</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span> <span style="color: #008000">#</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span> <span style="color: #008000">#=================================== Change Log ==================================================</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span> <span style="color: #008000"># Version 1.0</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span> <span style="color: #008000"># -Initial script</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span> <span style="color: #008000"># -Changed output to an array instead of just write-host</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span> <span style="color: #008000"># -Added total count to single server</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span> <span style="color: #008000">#</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span> <span style="color: #008000">#=================================================================================================</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span> <span style="color: #008000"># Script Paramaters to allow server name to be typed after the script name.   If no Param, all servers are returned</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>  </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span> <span style="color: #0000ff">param</span>([string] $Param )     </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>  </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span> $Results = @()</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span> $CountMB = 0</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>  </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span> <span style="color: #0000ff">if</span>(!$<span style="color: #0000ff">param</span>)</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span>     {</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>         $Servers = Get-ExchangeServer | Where {$_.ServerRole <span style="color: #cc6633">-eq</span> <span style="color: #006080">"Mailbox"</span>} | Sort Name</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>  </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span>         Foreach($Server <span style="color: #0000ff">in</span> $Servers)</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30">  30:</span>             {</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31">  31:</span>                 $dbs = Get-MailboxDatabase -server $Server | Sort Name</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32">  32:</span>                 </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33">  33:</span>                 <span style="color: #0000ff">foreach</span>($db <span style="color: #0000ff">in</span> $dbs)</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34">  34:</span>                     {</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35">  35:</span>                         $mb = Get-MailboxStatistics -Database $db | Where {$_.DisconnectDate <span style="color: #cc6633">-eq</span> $null -and $_.ObjectClass <span style="color: #cc6633">-eq</span> <span style="color: #006080">'Mailbox'</span>} | Measure-Object</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36">  36:</span>                         $mbdis = Get-MailboxStatistics -Database $db | Where {$_.DisconnectDate <span style="color: #cc6633">-ne</span> $null -and $_.ObjectClass <span style="color: #cc6633">-eq</span> <span style="color: #006080">'Mailbox'</span>} | Measure-Object</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37">  37:</span>                         </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38">  38:</span>                         Write-Host <span style="color: #006080">"$($Server) `t $($db.name)`t $($a.count)"</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39">  39:</span>                         </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40">  40:</span>                         $Obj = New-Object PSObject</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41">  41:</span>                         $Obj | Add-Member NoteProperty -Name <span style="color: #006080">"Server"</span> -Value $Server</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42">  42:</span>                         $Obj | Add-Member NoteProperty -Name <span style="color: #006080">"Database"</span> -Value $db.Name</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43">  43:</span>                         $Obj | Add-Member NoteProperty -Name <span style="color: #006080">"Mailboxes"</span> -Value $mb.count</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44">  44:</span>                         $Obj | Add-Member NoteProperty -Name <span style="color: #006080">"Disconnected Mailboxes"</span> -Value $mbdis.count</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum45">  45:</span>                         $Results += $Obj</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum46">  46:</span>                     }</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum47">  47:</span>             }</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum48">  48:</span>     }</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum49">  49:</span> <span style="color: #0000ff">else</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum50">  50:</span>     {</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum51">  51:</span>     $server = $<span style="color: #0000ff">param</span></pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum52">  52:</span>         $dbs = Get-MailboxDatabase -server $Server | Sort Name</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum53">  53:</span>  </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum54">  54:</span>         <span style="color: #0000ff">foreach</span>($db <span style="color: #0000ff">in</span> $dbs)</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum55">  55:</span>             {</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum56">  56:</span>                 $mb = Get-MailboxStatistics -Database $db | Where {$_.DisconnectDate <span style="color: #cc6633">-eq</span> $null -and $_.ObjectClass <span style="color: #cc6633">-eq</span> <span style="color: #006080">'Mailbox'</span>} | Measure-Object</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum57">  57:</span>                 $mbdis = Get-MailboxStatistics -Database $db | Where {$_.DisconnectDate <span style="color: #cc6633">-ne</span> $null -and $_.ObjectClass <span style="color: #cc6633">-eq</span> <span style="color: #006080">'Mailbox'</span>} | Measure-Object</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum58">  58:</span>  </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum59">  59:</span>                 $Obj = New-Object PSObject</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum60">  60:</span>                 $Obj | Add-Member NoteProperty -Name <span style="color: #006080">"Server"</span> -Value $Server</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum61">  61:</span>                 $Obj | Add-Member NoteProperty -Name <span style="color: #006080">"Database"</span> -Value $db.Name</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum62">  62:</span>                 $Obj | Add-Member NoteProperty -Name <span style="color: #006080">"Mailboxes"</span> -Value $mb.count</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum63">  63:</span>                 $Obj | Add-Member NoteProperty -Name <span style="color: #006080">"Disconnected Mailboxes"</span> -Value $mbdis.count</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum64">  64:</span>                 $Results += $Obj</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum65">  65:</span>                 $countmb += $mb.count</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum66">  66:</span>                 </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum67">  67:</span>             }</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum68">  68:</span>         Write-Host</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum69">  69:</span>         Write-Host <span style="color: #006080">"$($Server) has a total of $($CountMB) mailboxes"</span> -ForegroundColor Green</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum70">  70:</span>     }</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum71">  71:</span>  </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum72">  72:</span> $Results | FT -AutoSize</pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum73">  73:</span>  </pre>
<p><!--CRLF-->
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum74">  74:</span> <span style="color: #008000">#===================================== End of Script ==============================================</span></pre>
<p><!--CRLF--></div>
</div>
<p>Script can be downloaded here:&nbsp; <a href="http://everydaynerd.com/files/Get-MailboxCountPerDatabase.ps1" target="_blank">Get-MailboxCountPerDatabase.ps1</a></p>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/script-to-find-whitespace-on-all-exchange-2007-servers' rel='bookmark' title='Script to Find Whitespace on all Exchange 2007 Servers'>Script to Find Whitespace on all Exchange 2007 Servers</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/script-get-time-of-exchange-last-online-defrag' rel='bookmark' title='Script: Get time of Exchange last online defrag'>Script: Get time of Exchange last online defrag</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-display-exchange-2007-queue-by-site' rel='bookmark' title='Powershell Script: Display Exchange 2007 Queue by Site'>Powershell Script: Display Exchange 2007 Queue by Site</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Manage Exchange Certificates with a free GUI</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/exchange/manage-exchange-certificates-with-a-free-gui</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/exchange/manage-exchange-certificates-with-a-free-gui#comments</comments>
		<pubDate>Wed, 26 May 2010 16:11:00 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>

		<guid isPermaLink="false">http://everydaynerd.com/general/manage-exchange-certificates-with-a-free-gui</guid>
		<description><![CDATA[Managing Exchange 2007 certificates form powershell can sometimes be confusing.  U-B Tech has released a free tool that allows Exchange Administrators to manage certificates from a GUI.  The Certificate Manager for Exchange Server 2007 enables administrators to do: Manage your &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/exchange/manage-exchange-certificates-with-a-free-gui">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2007-sp2-is-out' rel='bookmark' title='Exchange 2007 SP2 is out.'>Exchange 2007 SP2 is out.</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/microsoft-releases-beta-exchange-2010-codenamed-exchange-14' rel='bookmark' title='Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)'>Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)</a></li>
<li><a href='http://everydaynerd.com/general/auditing-exchange-2007' rel='bookmark' title='Auditing Exchange 2007'>Auditing Exchange 2007</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Managing Exchange 2007 certificates form powershell can sometimes be confusing.  U-B Tech has released a <strong>free</strong> tool that allows Exchange Administrators to manage certificates from a GUI.  The Certificate Manager for Exchange Server 2007 enables administrators to do:</p>
<ul>
<li>Manage your current server certificates.</li>
<li>Enable certificates for Exchange 2007 Services (POP, IMAP, SMTP, IIS, UM).</li>
<li>Generate an Exchange 2007 Certificate Signing Request and process the Certificate Authority answer.</li>
<li>Generate an Exchange 2007 Self-Signed certificate (not for production use).</li>
<li>Easily include additional subject names in a single certificate.</li>
<li>Import &amp; Export ability for existing certificates.</li>
</ul>
<p><img style="display: inline; border: 0px;" title="image" src="http://everydaynerd.com/wp-content/uploads/HLIC/6af7b1dfe07a247ff3d6f53479a89b04.png" border="0" alt="image" width="500" height="267" /></p>
<p>[<a href="http://www.u-btech.com/products/certificate-manager-for-exchange-2007.html" target="_blank">Certificate Manager for Exchange Server 2007</a>]</p>
<p>[<a href="http://www.u-btech.com/images/certificate-manager-flash.html" target="_blank">Online Flash Demo of Certificate Manager</a>]</p>
<p>[<a href="http://technet.microsoft.com/en-us/library/bb851505.aspx" target="_blank">TechNet: Exchange Certificate Management</a>]</p>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2007-sp2-is-out' rel='bookmark' title='Exchange 2007 SP2 is out.'>Exchange 2007 SP2 is out.</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/microsoft-releases-beta-exchange-2010-codenamed-exchange-14' rel='bookmark' title='Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)'>Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)</a></li>
<li><a href='http://everydaynerd.com/general/auditing-exchange-2007' rel='bookmark' title='Auditing Exchange 2007'>Auditing Exchange 2007</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/exchange/manage-exchange-certificates-with-a-free-gui/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why it’s a bad idea to send large email attachments</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/exchange/why-it%e2%80%99s-a-bad-idea-to-send-large-email-attachments</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/exchange/why-it%e2%80%99s-a-bad-idea-to-send-large-email-attachments#comments</comments>
		<pubDate>Tue, 03 Nov 2009 19:13:00 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>

		<guid isPermaLink="false">http://nerd45.wordpress.com/2009/11/03/why-it%e2%80%99s-a-bad-idea-to-send-large-email-attachments</guid>
		<description><![CDATA[The Google Operating System Blog has a great post explaining why it’s not a good idea to send large attachments: People who demand large message size limits rarely understand the limitations of the email transmission.  Because of the MIME encoding &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/exchange/why-it%e2%80%99s-a-bad-idea-to-send-large-email-attachments">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/general/why-its-a-bad-idea-to-send-large-email-attachments' rel='bookmark' title='Why it&rsquo;s a bad idea to send large email attachments'>Why it&rsquo;s a bad idea to send large email attachments</a></li>
<li><a href='http://everydaynerd.com/adobe/acrobat/send-large-attachments-in-outlook-2007-with-acrobatcom' rel='bookmark' title='Send large attachments in Outlook 2007 with Acrobat.com'>Send large attachments in Outlook 2007 with Acrobat.com</a></li>
<li><a href='http://everydaynerd.com/blackberry/confirm-email-delivery-to-blackberry' rel='bookmark' title='Confirm Email Delivery to Blackberry'>Confirm Email Delivery to Blackberry</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://googlesystem.blogspot.com/2009/11/why-its-bad-idea-to-send-huge-files-by.html" target="_blank">Google Operating System Blog</a> has a great post explaining why it’s not a good idea to send large attachments:</p>
<blockquote><p>People who demand large message size limits rarely understand the limitations of the email transmission.  Because of the MIME encoding used when sending binary attachments, your files expand 33% when sent via email. </p>
<p>In other words, a 15MB attachment requires 20MB plus the message text, plus message headers.      <br />When you carbon copy 20 of your friends &amp; coworkers, a separate message is sent to each. 20MB x 20 = 400MB. That&#8217;s half a freaking CD.</p>
<p>If 5 of those friends are on the same small company email server, downloading those messages saturates the entire bandwidth of their T1 data line for nearly 9 minutes. Because each message has separate headers, it isn&#8217;t easily cached and gets completely downloaded by each recipient.</p>
<p>Compare this to uploading the same attachment to a web server, FTP server, file transmission service like YouSendIt, or video streaming site like YouTube. One copy is uploaded. The download is typically 8-bit so minimal expansion factor. The small business&#8217; network can cache the content, so it&#8217;s only downloaded once then fetched locally from the web caching server.</p>
<p>Bottom line, sending a large attachment via email is relocating using the U.S. Postal Service as your moving company. It is painful, limited, and expensive.</p>
</blockquote>
<p>As an email administrator, I couldn’t agree more…</p>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/general/why-its-a-bad-idea-to-send-large-email-attachments' rel='bookmark' title='Why it&rsquo;s a bad idea to send large email attachments'>Why it&rsquo;s a bad idea to send large email attachments</a></li>
<li><a href='http://everydaynerd.com/adobe/acrobat/send-large-attachments-in-outlook-2007-with-acrobatcom' rel='bookmark' title='Send large attachments in Outlook 2007 with Acrobat.com'>Send large attachments in Outlook 2007 with Acrobat.com</a></li>
<li><a href='http://everydaynerd.com/blackberry/confirm-email-delivery-to-blackberry' rel='bookmark' title='Confirm Email Delivery to Blackberry'>Confirm Email Delivery to Blackberry</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/exchange/why-it%e2%80%99s-a-bad-idea-to-send-large-email-attachments/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exchange 2007 SP2 is out.</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2007-sp2-is-out</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2007-sp2-is-out#comments</comments>
		<pubDate>Wed, 26 Aug 2009 18:55:00 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>

		<guid isPermaLink="false">http://nerd45.wordpress.com/2009/08/26/exchange-2007-sp2-is-out</guid>
		<description><![CDATA[OK all you admins, put in that Change Request, and get installing!  For an overview of the new features that are available in Exchange Server 2007 SP2, see &#8220;What&#8217;s New in Exchange Server 2007 SP2&#8243;. [ Exchange 2007 SP2 ] &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2007-sp2-is-out">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/general/auditing-exchange-2007' rel='bookmark' title='Auditing Exchange 2007'>Auditing Exchange 2007</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2007-ccr-%e2%80%93-move-file-share-witness' rel='bookmark' title='Exchange 2007 CCR – Move File Share Witness'>Exchange 2007 CCR – Move File Share Witness</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/manage-exchange-certificates-with-a-free-gui' rel='bookmark' title='Manage Exchange Certificates with a free GUI'>Manage Exchange Certificates with a free GUI</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>OK all you admins, put in that Change Request, and get installing!  For an overview of the new features that are available in Exchange Server 2007 SP2, see <a href="http://go.microsoft.com/fwlink/?LinkId=154404" target="_blank">&#8220;What&#8217;s New in Exchange Server 2007 SP2&#8243;</a>.</p>
<p>[ <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=4c4bd2a3-5e50-42b0-8bbb-2cc9afe3216a#tm" target="_blank">Exchange 2007 SP2</a> ]</p>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/general/auditing-exchange-2007' rel='bookmark' title='Auditing Exchange 2007'>Auditing Exchange 2007</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2007-ccr-%e2%80%93-move-file-share-witness' rel='bookmark' title='Exchange 2007 CCR – Move File Share Witness'>Exchange 2007 CCR – Move File Share Witness</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/manage-exchange-certificates-with-a-free-gui' rel='bookmark' title='Manage Exchange Certificates with a free GUI'>Manage Exchange Certificates with a free GUI</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2007-sp2-is-out/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exchange 2010 RC is Available!</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2010-rc-is-available</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2010-rc-is-available#comments</comments>
		<pubDate>Tue, 18 Aug 2009 18:32:00 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>

		<guid isPermaLink="false">http://nerd45.wordpress.com/2009/08/18/exchange-2010-rc-is-available</guid>
		<description><![CDATA[Just heard from my friend Scott @ MS that the RC is available for download!  It’s been posted on the Exchange Blog here:  http://msexchangeteam.com/archive/2009/08/17/451974.aspx Related posts: Exchange 2010 &#38; Office 2010 “Visual Pressroom” from Microsoft Auditing Exchange 2007 Exchange 2010 &#038; &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2010-rc-is-available">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2010-office-2010-%e2%80%9cvisual-pressroom%e2%80%9d-from-microsoft' rel='bookmark' title='Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft'>Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft</a></li>
<li><a href='http://everydaynerd.com/general/auditing-exchange-2007' rel='bookmark' title='Auditing Exchange 2007'>Auditing Exchange 2007</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/office/exchange-2010-office-2010-visual-pressroom-from-microsoft' rel='bookmark' title='Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft'>Exchange 2010 &#038; Office 2010 “Visual Pressroom” from Microsoft</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Just heard from my friend Scott @ MS that the RC is available for download!  It’s been posted on the Exchange Blog here:  <a title="http://msexchangeteam.com/archive/2009/08/17/451974.aspx" href="http://msexchangeteam.com/archive/2009/08/17/451974.aspx">http://msexchangeteam.com/archive/2009/08/17/451974.aspx</a></p>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2010-office-2010-%e2%80%9cvisual-pressroom%e2%80%9d-from-microsoft' rel='bookmark' title='Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft'>Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft</a></li>
<li><a href='http://everydaynerd.com/general/auditing-exchange-2007' rel='bookmark' title='Auditing Exchange 2007'>Auditing Exchange 2007</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/office/exchange-2010-office-2010-visual-pressroom-from-microsoft' rel='bookmark' title='Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft'>Exchange 2010 &#038; Office 2010 “Visual Pressroom” from Microsoft</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2010-rc-is-available/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exchange 2007 CCR – Move File Share Witness</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2007-ccr-%e2%80%93-move-file-share-witness</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2007-ccr-%e2%80%93-move-file-share-witness#comments</comments>
		<pubDate>Mon, 10 Aug 2009 20:35:00 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>

		<guid isPermaLink="false">http://nerd45.wordpress.com/2009/08/10/exchange-2007-ccr-%e2%80%93-move-file-share-witness</guid>
		<description><![CDATA[Sometimes it is necessary to move the Exchange 2007 CCR’s File Share Witness.  This is easily done with the command prompt: cluster CLUSTERNAME resource &#8220;Majority Node Set&#8221; /priv MNSFileShare=\\server\share cluster CLUSTERNAME group &#8220;Cluster Group&#8221; /move cluster CLUSTERNAME group &#8220;Cluster Group&#8221; &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2007-ccr-%e2%80%93-move-file-share-witness">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-move-windows-server-2008-cluster-group' rel='bookmark' title='PowerShell: Move Windows Server 2008 Cluster Group'>PowerShell: Move Windows Server 2008 Cluster Group</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-display-exchange-2007-queue-by-site' rel='bookmark' title='Powershell Script: Display Exchange 2007 Queue by Site'>Powershell Script: Display Exchange 2007 Queue by Site</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/microsoft-releases-beta-exchange-2010-codenamed-exchange-14' rel='bookmark' title='Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)'>Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Sometimes it is necessary to move the Exchange 2007 CCR’s File Share Witness.  This is easily done with the command prompt:</p>
<p>cluster <em>CLUSTERNAME</em> resource &#8220;Majority Node Set&#8221; /priv MNSFileShare=<em>\\server\share</em>     <br />cluster <em>CLUSTERNAME</em> group &#8220;Cluster Group&#8221; /move     <br />cluster <em>CLUSTERNAME</em> group &#8220;Cluster Group&#8221; /move</p>
<p>When moving the FSW location, don’t forget to set the correct permissions &#8211; for more information on File Share Witness, see Technet:  <a title="http://technet.microsoft.com/en-us/library/bb124922.aspx" href="http://technet.microsoft.com/en-us/library/bb124922.aspx">http://technet.microsoft.com/en-us/library/bb124922.aspx</a></p>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-move-windows-server-2008-cluster-group' rel='bookmark' title='PowerShell: Move Windows Server 2008 Cluster Group'>PowerShell: Move Windows Server 2008 Cluster Group</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-display-exchange-2007-queue-by-site' rel='bookmark' title='Powershell Script: Display Exchange 2007 Queue by Site'>Powershell Script: Display Exchange 2007 Queue by Site</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/microsoft-releases-beta-exchange-2010-codenamed-exchange-14' rel='bookmark' title='Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)'>Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2007-ccr-%e2%80%93-move-file-share-witness/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2010-office-2010-%e2%80%9cvisual-pressroom%e2%80%9d-from-microsoft</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2010-office-2010-%e2%80%9cvisual-pressroom%e2%80%9d-from-microsoft#comments</comments>
		<pubDate>Sun, 03 May 2009 01:07:00 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>

		<guid isPermaLink="false">http://nerd45.wordpress.com/2009/05/02/exchange-2010-office-2010-%e2%80%9cvisual-pressroom%e2%80%9d-from-microsoft</guid>
		<description><![CDATA[Microsoft has posted a &#8220;Visual Pressroom&#8221; for their Upcoming Exchange 2010, Office 2010 and Office Web Applications. Office Web Applications: Editing &#38; Viewing PowerPoint presentations in PowerPoint Web application Editing &#38; Viewing Word documents in Word Web application Editing &#38; &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2010-office-2010-%e2%80%9cvisual-pressroom%e2%80%9d-from-microsoft">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/office/exchange-2010-office-2010-visual-pressroom-from-microsoft' rel='bookmark' title='Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft'>Exchange 2010 &#038; Office 2010 “Visual Pressroom” from Microsoft</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/microsoft-releases-beta-exchange-2010-codenamed-exchange-14' rel='bookmark' title='Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)'>Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)</a></li>
<li><a href='http://everydaynerd.com/general/shared-links-february-22-2010' rel='bookmark' title='Shared Links &#8211; February 22, 2010'>Shared Links &#8211; February 22, 2010</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Microsoft has posted a <strong><em>&#8220;Visual Pressroom&#8221;</em></strong> for their Upcoming Exchange 2010, Office 2010 and Office Web Applications.</p>
<blockquote><p><strong>Office Web Applications:</strong></p>
</blockquote>
<ul>
<li>Editing &amp; Viewing PowerPoint presentations in PowerPoint Web application </li>
<li>Editing &amp; Viewing Word documents in Word Web application </li>
<li>Editing &amp; Viewing Excel spreadsheets in Excel Web application </li>
<li>Editing &amp; Viewing OneNote notes in OneNote Web application </li>
</ul>
<blockquote><p><strong>Exchange 2010 and Office 2010:</strong></p>
</blockquote>
<ul>
<li><strong>Conversation View.</strong> To reduce inbox clutter, Exchange 2010 provides an enhanced Conversation View that streamlines inbox navigation by automatically organizing message threads based on the natural conversation flow between parties. </li>
<li><strong>Ignore Conversation.</strong> This e-mail “mute button” allows people to remove themselves from an irrelevant e-mail string, reducing unwanted e-mail and runaway reply-all threads. </li>
<li><strong>Voice Mail Preview.</strong> Exchange 2010 further enhances voice mail functionality by delivering speech-to-text voice mail, allowing users to receive voice mail previews in their inbox. </li>
<li>Outlook Web Access premium support is available for Mozilla Firefox &amp; Apple Safari. </li>
<li><strong>MailTips</strong> warn people before they commit an e-mail faux pas, such as sending mail to a large distribution group, among other things. MailTips alert people if they do not have permission to send to certain recipients, if a message may be rejected or if a recipient is out of the office, among other things.  </li>
</ul>
<p>[<a href="http://www.microsoft.com/presspass/presskits/2010office/imageGallery.aspx" target="_blank">Microsoft</a>]</p>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/office/exchange-2010-office-2010-visual-pressroom-from-microsoft' rel='bookmark' title='Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft'>Exchange 2010 &#038; Office 2010 “Visual Pressroom” from Microsoft</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/microsoft-releases-beta-exchange-2010-codenamed-exchange-14' rel='bookmark' title='Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)'>Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)</a></li>
<li><a href='http://everydaynerd.com/general/shared-links-february-22-2010' rel='bookmark' title='Shared Links &#8211; February 22, 2010'>Shared Links &#8211; February 22, 2010</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2010-office-2010-%e2%80%9cvisual-pressroom%e2%80%9d-from-microsoft/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Releases Beta Exchange 2010 (Codenamed Exchange 14)</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/exchange/microsoft-releases-beta-exchange-2010-codenamed-exchange-14</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/exchange/microsoft-releases-beta-exchange-2010-codenamed-exchange-14#comments</comments>
		<pubDate>Thu, 16 Apr 2009 01:08:00 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>

		<guid isPermaLink="false">http://nerd45.wordpress.com/2009/04/15/microsoft-releases-beta-exchange-2010-codenamed-exchange-14</guid>
		<description><![CDATA[ Microsoft Exchange Server 2010 helps you achieve new levels of reliability and performance by delivering features that help to simplify your administration, protect your communications, and delight your users by meeting their demands for greater business mobility.Microsoft Exchange® Server 2010 &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/exchange/microsoft-releases-beta-exchange-2010-codenamed-exchange-14">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2010-office-2010-%e2%80%9cvisual-pressroom%e2%80%9d-from-microsoft' rel='bookmark' title='Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft'>Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/office/exchange-2010-office-2010-visual-pressroom-from-microsoft' rel='bookmark' title='Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft'>Exchange 2010 &#038; Office 2010 “Visual Pressroom” from Microsoft</a></li>
<li><a href='http://everydaynerd.com/software/free/microsoft-releases-free-express-edition-of-search-server-2008' rel='bookmark' title='Microsoft Releases Free Express Edition Of Search Server 2008'>Microsoft Releases Free Express Edition Of Search Server 2008</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p> <img alt="image" border="0" height="128" src="http://lh5.ggpht.com/_MPh69jWf-_I/SeaFJHHueZI/AAAAAAAAHq4/WVlUJylavA8/image%5B9%5D.png?imgmax=800" title="image" width="603" /><br />Microsoft Exchange Server 2010 helps you achieve new levels of reliability and performance by delivering features that help to simplify your administration, protect your communications, and delight your users by meeting their demands for greater business mobility.<br /><a href="" name="Description"></a>Microsoft Exchange® Server 2010 Beta helps IT Professionals achieve new levels of reliability with greater flexibility, enhanced user experiences, and increased protection for business communications.
<ul>
<li><b>Flexible and reliable</b> &#8211; Exchange Server 2010 gives you the flexibility to tailor your deployment based on your company&#8217;s unique needs and a simplified way to keep e-mail continuously available for your users.</li>
<li><b>Anywhere access</b> &#8211; Exchange Server 2010 helps your users get more done by giving them the freedom to securely access all their communications &#8211; e-mail, voice mail, instant messaging, and more &#8211; from virtually any platform, Web browser, or device.</li>
<li><b>Protection and compliance</b> &#8211; Exchange Server 2010 delivers integrated information loss prevention, and compliance tools aimed at helping you simplify the process of protecting your company&#8217;s communications and meeting regulatory requirements.</li>
</ul>
<p>This software is intended for evaluation purposes only. You must accept the license terms before you are authorized to use this software. There is no product support for this trial software. You are welcome to leave feedback here and share your trial experiences with others and to ask for advice.<br />
<h6> </h6>
<h6>System Requirements</h6>
<ul>
<li><b>Supported Operating Systems: </b>Windows Server 2008; Windows Vista 64-bit Editions Service Pack 1</li>
</ul>
<ul>
<li><b>Operating System for Installing Management Tools:</b> The 64-bit editions of Microsoft® Windows Vista® SP1 or later, or Windows Server® 2008.</li>
<li><b>PC</b> &#8211; x64 architecture-based computer with Intel processor that supports Intel 64 architecture (formerly known as Intel EM64T) or AMD processor that supports the AMD64 platform</li>
</ul>
<p><b>Additional requirements to run Exchange Server 2010 Beta</b>  
<ul>
<li><b>Memory</b> &#8211; Minimum of 4 gigabytes (GB) of RAM per server plus 5 megabytes (MB) of RAM recommended for each mailbox</li>
<li><b>Disk space</b>      
<ul>
<li>At least 1.2 GB on the drive used for installation</li>
<li>An additional 500 MB of available disk space for each Unified Messaging (UM) language pack that you plan to install</li>
<li>200 MB of available disk space on the system drive</li>
</ul>
</li>
<li><b>Drive</b> &#8211; DVD-ROM drive, local or network accessible</li>
<li><b>File format</b> &#8211; Disk partitions formatted as NTFS file systems</li>
<li><b>Monitor</b> – Screen resolution 800 x 600 pixels or higher</li>
</ul>
<p><b>Exchange Server 2010 Beta Prerequisites</b>  <br />If these required prerequisites are not already installed, the Exchange Server 2010 Beta setup process will prompt and provide links to the installation locations; Internet access will be required if the prerequisites are not already installed or available on a local network.  
<ul>
<li>Microsoft® .NET Framework 3.5</li>
<li>Windows PowerShell v2</li>
<li>Windows Remote Management</li>
</ul>
<p>Actual requirements will vary based on system configuration and specific features installed. For more detailed system requirements, please refer to the Exchange Server 2010 <a href="http://go.microsoft.com/fwlink/?LinkId=135761">Technical Documentation Library</a>.   <br />For a list of Windows Server 2008 requirements, visit <a href="http://go.microsoft.com/fwlink/?LinkId=135963">http://technet.microsoft.com/windowsserver/2008</a>.  <br /><a href="http://go.microsoft.com/fwlink/?LinkId=135761" name="AdditionalInfo"></a>The downloadable software is for evaluation purposes only and is not a released product. If you plan to install the software on your primary computer, it is recommended that you back up your existing data prior to installation. Before you install the Microsoft® Exchange Server 2010 Beta, we recommend that you review the summary of system requirements and technical information located in the Exchange Server 2010 <a href="">Technical Documentation Library</a>.</p>
<p><b>Expiration Notice</b>    <br />This time-limited, free beta version of Microsoft® Exchange Server 2010 will end 360 days after installation.</p>
<p>To learn more about Microsoft® Exchange Server 2010 visit <a href="http://go.microsoft.com/fwlink/?LinkId=135925">http://www.microsoft.com/exchange/2010</a></p>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/exchange/exchange-2010-office-2010-%e2%80%9cvisual-pressroom%e2%80%9d-from-microsoft' rel='bookmark' title='Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft'>Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/office/exchange-2010-office-2010-visual-pressroom-from-microsoft' rel='bookmark' title='Exchange 2010 &amp; Office 2010 “Visual Pressroom” from Microsoft'>Exchange 2010 &#038; Office 2010 “Visual Pressroom” from Microsoft</a></li>
<li><a href='http://everydaynerd.com/software/free/microsoft-releases-free-express-edition-of-search-server-2008' rel='bookmark' title='Microsoft Releases Free Express Edition Of Search Server 2008'>Microsoft Releases Free Express Edition Of Search Server 2008</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/exchange/microsoft-releases-beta-exchange-2010-codenamed-exchange-14/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script: Get time of Exchange last online defrag</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/powershell/script-get-time-of-exchange-last-online-defrag</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/powershell/script-get-time-of-exchange-last-online-defrag#comments</comments>
		<pubDate>Thu, 19 Mar 2009 20:18:00 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nerd45.wordpress.com/2009/03/19/script-get-time-of-exchange-last-online-defrag</guid>
		<description><![CDATA[digging through the Application log can be a real pain sometimes.  Last night, I was asked by a Microsoft Engineer to give me the last online defrag of a server that we had a case opened on.  So, instead of &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/powershell/script-get-time-of-exchange-last-online-defrag">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/script-to-find-whitespace-on-all-exchange-2007-servers' rel='bookmark' title='Script to Find Whitespace on all Exchange 2007 Servers'>Script to Find Whitespace on all Exchange 2007 Servers</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-display-exchange-2007-queue-by-site' rel='bookmark' title='Powershell Script: Display Exchange 2007 Queue by Site'>Powershell Script: Display Exchange 2007 Queue by Site</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database' rel='bookmark' title='Exchange PowerShell Script: Get Mailbox Count by Database'>Exchange PowerShell Script: Get Mailbox Count by Database</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>digging through the Application log can be a real pain sometimes.  Last night, I was asked by a Microsoft Engineer to give me the last online defrag of a server that we had a case opened on.  So, instead of opening up the Event Viewer, I went to Powershell:</p>
<div id="codeSnippetWrapper" style="border-right:silver 1px solid;border-top:silver 1px solid;font-size:8pt;overflow:auto;border-left:silver 1px solid;width:97.5%;cursor:text;direction:ltr;max-height:200px;line-height:12pt;border-bottom:silver 1px solid;font-family:'Courier New', courier, monospace;background-color:#f4f4f4;text-align:left;margin:20px 0 10px;padding:4px;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:'Courier New', courier, monospace;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span style="color:#008000;"># Script to return the date and time of the last online defrag of each Exchange 2007 Database</span><span style="color:#008000;"># Highly recommended to run this locally on the Exchange server, not remotely.</span><span style="color:#008000;"># Written by Dan Burgess</span><span style="color:#008000;"># nerd@EverydayNerd.com</span>

$servername = read-host <span style="color:#006080;">"Enter Exchange Mailbox Server Name"</span>$db = Get-StorageGroup -Server $servername | Get-MailboxDatabase

<span style="color:#0000ff;">foreach</span> ($objItem <span style="color:#0000ff;">in</span> $db)    {        $EventLogs = get-EventLog -Logname Application| Where-Object {$_.EventID <span style="color:#cc6633;">-eq</span> 703 -or $_.EventID <span style="color:#cc6633;">-eq</span> 701 -and $_.source <span style="color:#cc6633;">-eq</span> <span style="color:#006080;">'ESE'</span> } | Where-Object {$_.ReplacementStrings <span style="color:#cc6633;">-like</span> $objItem.EdbFilePath} | select-object -first 1        write-host <span style="color:#006080;">' Mailbox store: '</span> $objItem.Identity        write-host <span style="color:#006080;">' Last Defrag completed: '</span> $EventLogs.TimeGenerated        write-host <span style="color:#006080;">' '</span>    }</pre>
<p></div>
</p>
<p>Works like a charm!  Next time you need to extract info from a computers log files, edit this script to match the EventID that you need, and slap it in Powershell!  Happy scripting!</p>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/script-to-find-whitespace-on-all-exchange-2007-servers' rel='bookmark' title='Script to Find Whitespace on all Exchange 2007 Servers'>Script to Find Whitespace on all Exchange 2007 Servers</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-display-exchange-2007-queue-by-site' rel='bookmark' title='Powershell Script: Display Exchange 2007 Queue by Site'>Powershell Script: Display Exchange 2007 Queue by Site</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database' rel='bookmark' title='Exchange PowerShell Script: Get Mailbox Count by Database'>Exchange PowerShell Script: Get Mailbox Count by Database</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/powershell/script-get-time-of-exchange-last-online-defrag/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powershell Script: Display Exchange 2007 Queue by Site</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-display-exchange-2007-queue-by-site</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-display-exchange-2007-queue-by-site#comments</comments>
		<pubDate>Wed, 18 Mar 2009 17:23:00 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nerd45.wordpress.com/2009/03/18/powershell-script-display-exchange-2007-queue-by-site</guid>
		<description><![CDATA[Working in a multi site Exchange 2007 environment can be cumbersome when trying to view queue information on the Hub servers.  I wrote this script to simplify this process. The script queries the Exchange 2007 organization, finds the servers with &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-display-exchange-2007-queue-by-site">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/script-to-find-whitespace-on-all-exchange-2007-servers' rel='bookmark' title='Script to Find Whitespace on all Exchange 2007 Servers'>Script to Find Whitespace on all Exchange 2007 Servers</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database' rel='bookmark' title='Exchange PowerShell Script: Get Mailbox Count by Database'>Exchange PowerShell Script: Get Mailbox Count by Database</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/script-get-time-of-exchange-last-online-defrag' rel='bookmark' title='Script: Get time of Exchange last online defrag'>Script: Get time of Exchange last online defrag</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Working in a multi site Exchange 2007 environment can be cumbersome when trying to view queue information on the Hub servers.  I wrote this script to simplify this process.  <br />The script queries the Exchange 2007 organization, finds the servers with the Hub Transport Roles, and grouping them into sites (you will have to define the sites yourself, based on your organizational configuration).  You can find the sites for your organization by entering this command:
<div id="codeSnippetWrapper" style="border-right:silver 1px solid;border-top:silver 1px solid;font-size:8pt;overflow:auto;border-left:silver 1px solid;width:97.5%;cursor:text;direction:ltr;max-height:200px;line-height:12pt;border-bottom:silver 1px solid;font-family:'Courier New',courier,monospace;background-color:#f4f4f4;text-align:left;margin:20px 0 10px;padding:4px;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:'Courier New',courier,monospace;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;">Get-ExchangeServer | Where { $_.isHubTransportServer <span style="color:#cc6633;">-eq</span> $true } | sort name</pre>
</div>
<p>This will output a table of all the Hub Transport servers and list the Site for each.  Take these site names, and change the script with your values.  You can also modify the variable names to match each site’s name.</p>
<p>Script:</p>
<div id="codeSnippetWrapper" style="border-right:silver 1px solid;border-top:silver 1px solid;font-size:8pt;overflow:auto;border-left:silver 1px solid;width:97.5%;cursor:text;direction:ltr;max-height:200px;line-height:12pt;border-bottom:silver 1px solid;font-family:'Courier New', courier, monospace;background-color:#f4f4f4;text-align:left;margin:20px 0 10px;padding:4px;"> 
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:'Courier New', courier, monospace;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span style="color:#008000;"># Exchange 2007 Powershell Script</span><span style="color:#008000;"># Script to display queue information of Hub Transport Servers</span><span style="color:#008000;"># Dynamicly selects Exchange Hub Transport Servers from Exchange 2007 Organization</span><span style="color:#008000;"># Selects server's location by Site</span><span style="color:#008000;"># Output queue information</span><span style="color:#008000;"># Writen by Dan Burgess</span><span style="color:#008000;"># nerd@EverydayNerd.com</span>

cls

<span style="color:#008000;"># Set variables</span>$last = <span style="color:#006080;">"begin"</span>$choice = <span style="color:#006080;">'start'</span>

<span style="color:#008000;"># Dynamicly set variables for each site's hub transport servers, and sort by server name</span>$usa = Get-ExchangeServer | where { $_.isHubTransportServer <span style="color:#cc6633;">-eq</span> $true -and $_.Site <span style="color:#cc6633;">-like</span> <span style="color:#006080;">'*USA*'</span> } | sort name $eur = Get-ExchangeServer | Where { $_.isHubTransportServer <span style="color:#cc6633;">-eq</span> $true -and $_.Site <span style="color:#cc6633;">-like</span> <span style="color:#006080;">'*EUR*'</span> } | sort name $chi = Get-ExchangeServer | Where { $_.isHubTransportServer <span style="color:#cc6633;">-eq</span> $true -and $_.Site <span style="color:#cc6633;">-like</span> <span style="color:#006080;">'*CHI*'</span> } | sort name $aus = Get-ExchangeServer | Where { $_.isHubTransportServer <span style="color:#cc6633;">-eq</span> $true -and $_.Site <span style="color:#cc6633;">-like</span> <span style="color:#006080;">'*AUS*'</span> } | sort name $afr = Get-ExchangeServer | Where { $_.isHubTransportServer <span style="color:#cc6633;">-eq</span> $true -and $_.Site <span style="color:#cc6633;">-like</span> <span style="color:#006080;">'*AFR*'</span> } | sort name $allhub = Get-ExchangeServer | Where { $_.isHubTransportServer <span style="color:#cc6633;">-eq</span> $true } | sort name

<span style="color:#008000;"># Start WHILE loop, that allows the user to repeat or select the choice selection instead of exiting the script after completion</span><span style="color:#0000ff;">while</span> ($choice <span style="color:#cc6633;">-ne</span> <span style="color:#006080;">'x'</span>){write-host <span style="color:#006080;">""</span>write-host <span style="color:#006080;">"0 - All Sites"</span> -foregroundcolor Yellowwrite-host <span style="color:#006080;">"1 - America (USA)"</span> -foregroundcolor Yellowwrite-host <span style="color:#006080;">"2 - Europe (EUR)"</span> -foregroundcolor Yellowwrite-host <span style="color:#006080;">"3 - China (CHI)"</span> -foregroundcolor Yellowwrite-host <span style="color:#006080;">"4 - Austrialia (AUS)"</span> -foregroundcolor Yellowwrite-host <span style="color:#006080;">"5 - Africa (AFR)"</span> -foregroundcolor Yellowwrite-host <span style="color:#006080;">"6 - All Queue with messages higher than 10"</span> -foregroundcolor Greenwrite-host <span style="color:#006080;">"X - Exit"</span> -foregroundcolor Redwrite-host <span style="color:#006080;">""</span>

<span style="color:#008000;"># If statement to see check if first selection, or sequencial</span><span style="color:#0000ff;">if</span>($last <span style="color:#cc6633;">-eq</span> <span style="color:#006080;">"begin"</span>)    {        [console]::ForegroundColor = <span style="color:#006080;">"Green"</span>        $choice = read-host <span style="color:#006080;">"Select site to check Hub Queue's"</span>        [console]::ResetColor()    }<span style="color:#0000ff;">else</span>    {        [console]::ForegroundColor = <span style="color:#006080;">"Green"</span>        $choice = read-host <span style="color:#006080;">"Select site to check Hub Queue's (Press Enter to repeat your last selection)"</span>        [console]::ResetColor()        }

    <span style="color:#0000ff;">switch</span> ($choice)        {            0 { $hub = $allhub }            1 { $hub = $usa }            2 { $hub = $eur }            3 { $hub = $chi }            4 { $hub = $aus }            5 { $hub = $afr }            6 { $hub = $allhub }            x {  }            <span style="color:#0000ff;">default</span> { $choice = $last }        }

<span style="color:#008000;"># For each server in the site selected, get the queue information, and list as a table</span>    <span style="color:#0000ff;">if</span>($choice <span style="color:#cc6633;">-eq</span> <span style="color:#006080;">"6"</span>)        {        <span style="color:#006080;">"Begin Hub List"</span> &gt; HubQueueOutput.txt        <span style="color:#006080;">"--------------------------------------"</span> &gt;&gt; HubQueueOutput.txt        <span style="color:#0000ff;">foreach</span> ( $server <span style="color:#0000ff;">in</span> $hub )            {                get-exchangeserver $server -erroraction silentlycontinue | get-queue -erroraction silentlycontinue | where {$_.MessageCount <span style="color:#cc6633;">-gt</span> 10 } &gt;&gt; HubQueueOutput.txt            }        <span style="color:#006080;">"--------------------------------------"</span> &gt;&gt; HubQueueOutput.txt        <span style="color:#006080;">"End Hub List"</span> &gt;&gt; HubQueueOutput.txt        more HubQueueOutput.txt        }        <span style="color:#0000ff;">elseif</span>($choice <span style="color:#cc6633;">-ne</span> <span style="color:#006080;">"x"</span>)        {        <span style="color:#006080;">"Begin Hub List"</span> &gt; HubQueueOutput.txt        <span style="
color:#006080;">"--------------------------------------"</span> &gt;&gt; HubQueueOutput.txt        <span style="color:#0000ff;">foreach</span> ( $server <span style="color:#0000ff;">in</span> $hub )            {                get-exchangeserver $server -erroraction silentlycontinue | get-queue -erroraction silentlycontinue &gt;&gt; HubQueueOutput.txt            }        <span style="color:#006080;">"--------------------------------------"</span> &gt;&gt; HubQueueOutput.txt        <span style="color:#006080;">"End Hub List"</span> &gt;&gt; HubQueueOutput.txt        more HubQueueOutput.txt        }    <span style="color:#0000ff;">else</span>        {            write-host <span style="color:#006080;">""</span>            write-host <span style="color:#006080;">"Script exiting"</span> -foregroundcolor DarkCyan            write-host <span style="color:#006080;">""</span>            write-host <span style="color:#006080;">"Have a nice day..."</span>            write-host <span style="color:#006080;">""</span>            write-host <span style="color:#006080;">""</span>        }$last = $choice    <span style="color:#008000;"># Go back to begining of WHILE loop, and do it again!    </span>}</pre>
<p></div>
<p>Of course this has to be ran on a machine that hat the Exchange 2007 Powershell installed.  Hope this helps, and saves time!</p>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/script-to-find-whitespace-on-all-exchange-2007-servers' rel='bookmark' title='Script to Find Whitespace on all Exchange 2007 Servers'>Script to Find Whitespace on all Exchange 2007 Servers</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database' rel='bookmark' title='Exchange PowerShell Script: Get Mailbox Count by Database'>Exchange PowerShell Script: Get Mailbox Count by Database</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/script-get-time-of-exchange-last-online-defrag' rel='bookmark' title='Script: Get time of Exchange last online defrag'>Script: Get time of Exchange last online defrag</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-display-exchange-2007-queue-by-site/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script to Find Whitespace on all Exchange 2007 Servers</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/powershell/script-to-find-whitespace-on-all-exchange-2007-servers</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/powershell/script-to-find-whitespace-on-all-exchange-2007-servers#comments</comments>
		<pubDate>Fri, 23 Jan 2009 17:53:00 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nerd45.wordpress.com/2009/01/23/script-to-find-whitespace-on-all-exchange-2007-servers</guid>
		<description><![CDATA[As an Exchange Admin, I’m sure you have had the need to find out how much whitespace is in each of your Exchange databases.  This can be a real pain to do, crawling through the Event Log, looking for Event &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/powershell/script-to-find-whitespace-on-all-exchange-2007-servers">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/script-get-time-of-exchange-last-online-defrag' rel='bookmark' title='Script: Get time of Exchange last online defrag'>Script: Get time of Exchange last online defrag</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-display-exchange-2007-queue-by-site' rel='bookmark' title='Powershell Script: Display Exchange 2007 Queue by Site'>Powershell Script: Display Exchange 2007 Queue by Site</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database' rel='bookmark' title='Exchange PowerShell Script: Get Mailbox Count by Database'>Exchange PowerShell Script: Get Mailbox Count by Database</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>As an Exchange Admin, I’m sure you have had the need to find out how much whitespace is in each of your Exchange databases.  This can be a real pain to do, crawling through the Event Log, looking for Event ID 1221.  This script will query all Exchange 2007 Mailbox servers, crawl through the Event logs, and return the Whitespace for every Database you have.  This information can also be exported to a SQL database, if you un-comment the appropriate lines.</p>
<p>Hope this makes your job easier!</p>
<p><strong>*** Special thanks to my co-worker Stephen M for writing this script, and suggesting that I post it to ExchangeStyle.EverydayNerd.com – Thanks!</strong></p>
<div style="border-bottom:gray 1px solid;border-left:gray 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:consolas, 'Courier New', courier, monospace;max-height:200px;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;margin:20px 0 10px;padding:4px;">
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, 'Courier New', courier, monospace;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#008000;"># Script: Get-WhiteSpace.ps1 will return the Whitespace on every Mailbox Server in an Exchange 2007 Environment</span><span style="color:#008000;"># Author: EverydayNerd.com</span><span style="color:#008000;"># Contact: Nerd [at] everydaynerd.com</span>

<span style="color:#008000;"># Uncomment to write to a database                              </span>

<span style="color:#008000;">#$db = “Enter Server Name Here”</span><span style="color:#008000;">#$catalog = “Enter Database Catalog Here”</span><span style="color:#008000;">#$conn = New-Object System.Data.SqlClient.SqlConnection("Data Source=$db; Initial Catalog=$catalog; Integrated Security=SSPI")</span><span style="color:#008000;">#$conn.Open()</span>

$WmidtQueryDT = [System.Management.ManagementDateTimeConverter]::ToDmtfDateTime([DateTime]::UtcNow.AddDays(-1))$servers = Get-ExchangeServer | Where{$_.ServerRole <span style="color:#cc6633;">-eq</span> <span style="color:#006080;">'None'</span> -or $_.ServerRole <span style="color:#cc6633;">-like</span> <span style="color:#006080;">'*Mailbox*'</span>} | sort name<span style="color:#0000ff;">foreach</span> ($server <span style="color:#0000ff;">in</span> $servers){Write-Host $serverGet-WmiObject -computer $server -query (<span style="color:#006080;">"Select * from Win32_NTLogEvent Where Logfile='Application' and Eventcode = '1221' and TimeWritten &gt;='"</span> + $WmidtQueryDT + <span style="color:#006080;">"'"</span>) |ForEach-Object{                $time = [System.Management.ManagementDateTimeConverter]::ToDateTime($_.TimeGenerated).ToString()                $date = $time.split(<span style="color:#006080;">"' '"</span>)                $writedate = $date[0]                $mbnamearray = $_.message.split(<span style="color:#006080;">"' '"</span>)                $store = $mbnamearray[2]                $store = $store -replace <span style="color:#006080;">'"'</span>, <span style="color:#006080;">''</span>                $size = [math]::round(($mbnamearray[4]/1024),4)                $search = $server.ToString() + <span style="color:#006080;">"\" + $store.ToString()

                                $test = Get-ExchangeServer $server                                If ($server.ServerRole -eq 'None'){                                                $root =[ADSI]'LDAP://RootDSE'                                                $cfConfigRootpath = "</span>LDAP://<span style="color:#006080;">" + $root.ConfigurationNamingContext.tostring()                                                $configRoot = [ADSI]$cfConfigRootpath                                                $searcher = New-Object DirectoryServices.DirectorySearcher($configRoot)                                                $searcher.Filter = '(&amp;(objectCategory=msExchExchangeServer)(cn=' + $Server + '))'                                                $searchres = $searcher.FindOne()                                                $snServerEntry = New-Object System.DirectoryServices.directoryentry                                                $snServerEntry = $searchres.GetDirectoryEntry()

                                                $adsiServer = [ADSI]('LDAP://' + $snServerEntry.DistinguishedName)                                                $dfsearcher = new-object System.DirectoryServices.DirectorySearcher($adsiServer)                                                $dfsearcher.Filter = "</span>(objectCategory=msExchPrivateMDB)<span style="color:#006080;">"                                                $srSearchResults = $dfsearcher.FindAll()                                                foreach ($srSearchResult in $srSearchResults){                                                                $msMailStore = $srSearchResult.GetDirectoryEntry()                                                                $srnamearray = $_.message.split("</span><span style="color:#006080;">'\'")                                                                $srstore = $mbnamearray[2]                                                                $srstore = $srstore -replace '</span><span style="color:#006080;">"',''                                                                If ($srstore.ToString() -like $store.ToString()){                                                                $EDBFile = $msMailStore.msExchEDBFile                                                                $EDBFilePath = "</span>\\<span style="color:#006080;">" + $server.ToString() + "</span>\<span style="color:#006080;">" + $EDBFile.ToString()                                                                $EDBFilePath = $EDBFilePath -replace ':', '$'                                                                $EDBFileSize = Get-Item $EDBFilePath.ToString() | select Length                                                                }                                                }                                }                                Else{                                                $EDBFile = Get-MailboxDatabase -Identity $search | select EDBFilePath                                                $EDBFile = $EDBFile -replace '@{EdbFilePath=', ''                                                $EDBFile = $EDBFile -replace '}', ''                                                $EDBFile = $EDBFile -replace ':', '$'                                                $EDBFilePath = "</span>\\<span style="color:#006080;">" + $server.ToString() + "</span>\<span style="color:#006080;">" + $EDBFile.ToString()                                                $EDBFileSize = Get-Item $EDBFilePath.ToString() | select Length                                                }

                                $EDBFileSize = $EDBFileSize -replace '@{Length=', ''                                $EDBFileSize = $EDBFileSize -replace '}', ''                                $EDBFileSize = [math]::round(((($EDBFileSize/1024)/1024)/1024),2)

# Uncomment to write to a database                                              #$cmd = $conn.CreateCommand()                #$cmd.CommandText ="</span>INSERT EventLog1221 VALUES (<span style="color:#006080;">'$writedate'</span>, <span style="color:#006080;">'$server'</span>, <span style="color:#006080;">'$store'</span>, <span style="color:#006080;">'$size'</span>, <span style="color:#006080;">'$EDBFileSize'</span>)"                <s
pan style="color:#008000;">#$cmd.ExecuteNonQuery()</span>

                Write-Host $writedate $server $store $size $EDBFileSize                }}<span style="color:#008000;"># Uncomment to write to a database                              </span><span style="color:#008000;">#$conn.Close()</span></pre>
<p></div>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/script-get-time-of-exchange-last-online-defrag' rel='bookmark' title='Script: Get time of Exchange last online defrag'>Script: Get time of Exchange last online defrag</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-display-exchange-2007-queue-by-site' rel='bookmark' title='Powershell Script: Display Exchange 2007 Queue by Site'>Powershell Script: Display Exchange 2007 Queue by Site</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database' rel='bookmark' title='Exchange PowerShell Script: Get Mailbox Count by Database'>Exchange PowerShell Script: Get Mailbox Count by Database</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/powershell/script-to-find-whitespace-on-all-exchange-2007-servers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powershell Script to list all Cluster Active Nodes</title>
		<link>http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-to-list-all-cluster-active-nodes</link>
		<comments>http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-to-list-all-cluster-active-nodes#comments</comments>
		<pubDate>Fri, 09 Jan 2009 19:54:00 +0000</pubDate>
		<dc:creator>Nerd</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://nerd45.wordpress.com/2009/01/09/powershell-script-to-list-all-cluster-active-nodes</guid>
		<description><![CDATA[If you have a medium to large infrastructure, it is helpful to know what node of your Exchange Clusters is the active node.  This can be done manually, but it is much easier if done with the following script:   &#8230; <a class="more-link" href="http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-to-list-all-cluster-active-nodes">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-move-windows-server-2008-cluster-group' rel='bookmark' title='PowerShell: Move Windows Server 2008 Cluster Group'>PowerShell: Move Windows Server 2008 Cluster Group</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-drive-space-info-from-multiple-systems' rel='bookmark' title='PowerShell: Drive Space Info from multiple systems'>PowerShell: Drive Space Info from multiple systems</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database' rel='bookmark' title='Exchange PowerShell Script: Get Mailbox Count by Database'>Exchange PowerShell Script: Get Mailbox Count by Database</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you have a medium to large infrastructure, it is helpful to know what node of your Exchange Clusters is the active node.  This can be done manually, but it is much easier if done with the following script:</p>
<p> </p>
<div style="border-bottom:gray 1px solid;border-left:gray 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:consolas, 'Courier New', courier, monospace;max-height:200px;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;margin:20px 0 10px;padding:4px;">
<div style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, 'Courier New', courier, monospace;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;">
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, 'Courier New', courier, monospace;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;">$Clusters = Get-MailboxServer | Where-Object { $_.RedundantMachines } | Select Name</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, 'Courier New', courier, monospace;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"> </pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, 'Courier New', courier, monospace;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"> <span style="color:#0000ff;">foreach</span> ($cluster <span style="color:#0000ff;">in</span> $clusters) {</pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, 'Courier New', courier, monospace;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;">    Get-ClusteredMailboxServerStatus -identity $Cluster.name | Select OperationalMachines,State </pre>
<pre style="line-height:12pt;background-color:white;width:100%;font-family:consolas, 'Courier New', courier, monospace;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"> </pre>
<pre style="line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas, 'Courier New', courier, monospace;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;">    }</pre>
<p>  </div>
<p></div>
<p>Related posts:<ol>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-move-windows-server-2008-cluster-group' rel='bookmark' title='PowerShell: Move Windows Server 2008 Cluster Group'>PowerShell: Move Windows Server 2008 Cluster Group</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-drive-space-info-from-multiple-systems' rel='bookmark' title='PowerShell: Drive Space Info from multiple systems'>PowerShell: Drive Space Info from multiple systems</a></li>
<li><a href='http://everydaynerd.com/microsoft/software-microsoft/powershell/exchange-powershell-script-get-mailbox-count-by-database' rel='bookmark' title='Exchange PowerShell Script: Get Mailbox Count by Database'>Exchange PowerShell Script: Get Mailbox Count by Database</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://everydaynerd.com/microsoft/software-microsoft/powershell/powershell-script-to-list-all-cluster-active-nodes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

