<?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>Exchange Server Pro &#187; PowerShell</title>
	<atom:link href="http://exchangeserverpro.com/tag/powershell/feed" rel="self" type="application/rss+xml" />
	<link>http://exchangeserverpro.com</link>
	<description>Microsoft Exchange Server news, tips, tricks and tutorials</description>
	<lastBuildDate>Tue, 31 Aug 2010 12:02:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to Remove Mail Users from the Global Address List</title>
		<link>http://exchangeserverpro.com/how-to-remove-mail-users-from-the-global-address-list</link>
		<comments>http://exchangeserverpro.com/how-to-remove-mail-users-from-the-global-address-list#comments</comments>
		<pubDate>Tue, 27 Jul 2010 09:00:47 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Exchange Management Shell]]></category>
		<category><![CDATA[GAL]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=1772</guid>
		<description><![CDATA[In this tutorial I show you how to use recipient filters to exclude Mail User objects from a Global Address List.]]></description>
			<content:encoded><![CDATA[<p>The default Global Address List in an Exchange 2007 or Exchange 2010 organization includes all mail-enabled objects.  It does this using the following recipient filter:</p>
<pre>((Alias -ne $null -and RecipientType -ne 'MailUser') -and ((((ObjectClass -eq 'user' -or ObjectClass
-eq 'Contact' -or ObjectClass -eq 'msExchSystemMailbox') -or ObjectClass -eq 'msExchDynamicDistributi
onList') -or ObjectClass -eq 'group') -or ObjectClass -eq 'publicFolder'))
</pre>
<p>You can see that the following object classes are included:</p>
<ul>
<li>User</li>
<li>Contact</li>
<li>System Mailbox</li>
<li>Dynamic Distribution Group</li>
<li>Group</li>
<li>Public Folder</li>
</ul>
<p>In some environments it may be desirable to exclude Mail Users.  Mail Users are similar to Contacts in that they do not have a mailbox in the local Exchange organization, however unlike Contacts they do have a user account in Active Directory.</p>
<p>In other words, Mail Users are mail-enabled user objects that use an external email service.</p>
<p>Mail Users are displayed in the same area of the Exchange Management Console as regular Contacts, which may lead you to think that excluding them from the Global Address List is as simple as removing this part of the recipient filter:</p>
<blockquote><p>-or ObjectClass -eq &#8216;Contact&#8217;</p></blockquote>
<p>However that is not correct, and will not remove Mail Users from the Global Address List.  To understand how to actually do this take a closer look at the attributes of a Mailbox User and a Mail User.</p>
<pre>[PS] C:\&gt;get-mailbox "John Smith" | fl objectclass, recipienttype

ObjectClass   : {top, person, organizationalPerson, user}
RecipientType : UserMailbox

[PS] C:\&gt;get-mailuser "Peter Banes" | fl objectclass, recipienttype

ObjectClass   : {top, person, organizationalPerson, user}
RecipientType : MailUser</pre>
<p>Notice that both are the same ObjectClass of &#8216;user&#8217;, which would still be included in the recipient filter if you were to simply remove the &#8216;Contact&#8217; object class.</p>
<p>Instead, to remove Mail Users from the Global Address List you should exclude them by Recipient Type.  You can do this by including the following condition in your recipient filter:</p>
<blockquote><p>RecipientType -ne &#8216;MailUser&#8217;</p></blockquote>
<p>For example:</p>
<pre>Set-GlobalAddressList "Default Global Address List" -RecipientFilter {(Alias -ne $null -and RecipientType -ne 'MailUser' -and (ObjectClass -eq 'user' -or ObjectClass -eq 'Contact' -or ObjectClass -eq 'msExchSystemMailbox' -or ObjectClass -eq 'msExchDynamicDistributionList' -or ObjectClass -eq 'group' -or ObjectClass -eq 'publicFolder'))}
</pre>
<p>If you&#8217;re making this change to the default Global Address List see my previous post with the <a href="http://exchangeserverpro.com/unable-to-modify-default-global-address-list">solution to the error that occurs when modifying the default Global Address List</a>.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/unable-to-modify-default-global-address-list" title="Unable to Modify Default Global Address List">Unable to Modify Default Global Address List</a></li><li><a href="http://exchangeserverpro.com/how-to-enter-the-exchange-server-2010-product-key-for-multiple-servers" title="How to Enter the Exchange Server 2010 Product Key for Multiple Servers">How to Enter the Exchange Server 2010 Product Key for Multiple Servers</a></li><li><a href="http://exchangeserverpro.com/how-to-use-a-specific-domain-controller-in-exchange-2010-management-shell" title="How to Use a Specific Domain Controller in Exchange 2010 Management Shell">How to Use a Specific Domain Controller in Exchange 2010 Management Shell</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-certificate-revocation-checks-and-proxy-settings" title="Exchange 2010 Certificate Revocation Checks and Proxy Settings">Exchange 2010 Certificate Revocation Checks and Proxy Settings</a></li><li><a href="http://exchangeserverpro.com/object-is-read-only-removing-exchange-server-2007-public-folder-database" title="Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal">Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/how-to-remove-mail-users-from-the-global-address-list">How to Remove Mail Users from the Global Address List</a> is © 2010 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/how-to-remove-mail-users-from-the-global-address-list/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Unable to Modify Default Global Address List</title>
		<link>http://exchangeserverpro.com/unable-to-modify-default-global-address-list</link>
		<comments>http://exchangeserverpro.com/unable-to-modify-default-global-address-list#comments</comments>
		<pubDate>Mon, 26 Jul 2010 09:00:21 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[ADSIEdit.msc]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Exchange Management Shell]]></category>
		<category><![CDATA[GAL]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=1767</guid>
		<description><![CDATA[How to modify the recipient filter of the default Global Address List in an Exchange Server 2010 organization.]]></description>
			<content:encoded><![CDATA[<p>If you try to modify the recipient filter of the default Global Address List in Exchange Server 2010 you will receive an error message:</p>
<blockquote><p>You can&#8217;t peform this operation on default global address list &#8220;Default Global Address List&#8221;.</p></blockquote>
<p>The recipient filter of the default Global Address List can be modified once during conversion from Exchange 2003 but not after that.  If you want to change the default Global Address List recipient filter after that you must either:</p>
<ul>
<li>Create a new Global Address List with the desired recipient filter</li>
<li>Temporarily modify the Global Address List so that it isn&#8217;t the default</li>
</ul>
<p>For the second option you can refer back to <a href="http://exchangeserverpro.com/exchange-best-practices-analyzer-reports-default-global-address-list-missing">my earlier post</a> on fixing  the issue where there is no default Global Address List in the organization.  This is determined by the <strong>msExchRecipientFilterFlags</strong> attribute of the object.</p>
<p>Simply use ADSIEdit.msc to modify the attribute from 3 to 0, apply the change to the Global Address List recipient filter, then return to ADSIEdit.msc and set the flag back to 3.  For more detailed instructions <a href="http://exchangeserverpro.com/exchange-best-practices-analyzer-reports-default-global-address-list-missing">check out my previous post</a>.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/how-to-remove-mail-users-from-the-global-address-list" title="How to Remove Mail Users from the Global Address List">How to Remove Mail Users from the Global Address List</a></li><li><a href="http://exchangeserverpro.com/how-to-enter-the-exchange-server-2010-product-key-for-multiple-servers" title="How to Enter the Exchange Server 2010 Product Key for Multiple Servers">How to Enter the Exchange Server 2010 Product Key for Multiple Servers</a></li><li><a href="http://exchangeserverpro.com/how-to-use-a-specific-domain-controller-in-exchange-2010-management-shell" title="How to Use a Specific Domain Controller in Exchange 2010 Management Shell">How to Use a Specific Domain Controller in Exchange 2010 Management Shell</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-certificate-revocation-checks-and-proxy-settings" title="Exchange 2010 Certificate Revocation Checks and Proxy Settings">Exchange 2010 Certificate Revocation Checks and Proxy Settings</a></li><li><a href="http://exchangeserverpro.com/object-is-read-only-removing-exchange-server-2007-public-folder-database" title="Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal">Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/unable-to-modify-default-global-address-list">Unable to Modify Default Global Address List</a> is © 2010 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/unable-to-modify-default-global-address-list/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal</title>
		<link>http://exchangeserverpro.com/object-is-read-only-removing-exchange-server-2007-public-folder-database</link>
		<comments>http://exchangeserverpro.com/object-is-read-only-removing-exchange-server-2007-public-folder-database#comments</comments>
		<pubDate>Tue, 01 Jun 2010 09:00:55 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[EMS]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Public Folders]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=1419</guid>
		<description><![CDATA[During a transition from Exchange Server 2007 to Exchange Server 2010 you may encounter an error removing a Public Folder Database from the Exchange 2007 server.]]></description>
			<content:encoded><![CDATA[<p>During a transition from Exchange Server 2007 to Exchange Server 2010 you may encounter an error removing a Public Folder Database from the Exchange 2007 server.</p>
<p>The error message tells you that the &#8220;Object is read only because it was created by a future version of Exchange&#8221;.</p>
<p><img class="alignnone size-medium wp-image-1421" title="pfremoval" src="http://exchangeserverpro.com/wp-content/uploads/2010/05/pfremoval-450x329.png" alt="" width="450" height="329" /></p>
<pre>[PS] C:\&gt;Remove-PublicFolderDatabase "EXCH07\Public Folder Database"

Confirm
Are you sure you want to perform this action?
Removing Public Folder Database "EXCH07\Public Folder Database".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "Y"):y
Remove-PublicFolderDatabase : Object is read only because it was created by a f
uture version of Exchange: 0.10 (14.0.100.0). Current supported version is 0.1
(8.0.535.0).
At line:1 char:28
+ Remove-PublicFolderDatabase  &lt;&lt;&lt;&lt; "EXCH07\Public Folder Database"
</pre>
<p>The solution is to use the Exchange Server 2010 Management Shell to remove the Public Folder Database.  From an Exchange Server 2010 server run the following command to retrieve the identity of the Public Folder Database you wish to remove.</p>
<pre>[PS] C:\&gt;Get-PublicFolderDatabase -Server EXCH07 | fl name, identity

Name     : Public Folder Database
Identity : EXCH07\Second Storage Group\Public Folder Database
</pre>
<p>Then run this command to remove the Public Folder Database, using the Identity that was retrieved in the previous command.</p>
<pre>[PS] C:\&gt;Remove-PublicFolderDatabase "EXCH07\Second Storage Group\Public Folder Database"

Confirm
Are you sure you want to perform this action?
Removing public folder database "EXCH07\Second Storage Group\Public Folder Database".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): y
WARNING: The specified database has been removed. You must remove the database file located in E:\Data\SG2\Public
Folder Database.edb from your computer manually if it exists. Specified database: Public Folder Database
</pre>
<p>The Public Folder Database is now removed from the Exchange 2007 server.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/public-folders-not-replicating-between-exchange-2007-and-2010" title="Public Folders Not Replicating Between Exchange 2007 and 2010">Public Folders Not Replicating Between Exchange 2007 and 2010</a></li><li><a href="http://exchangeserverpro.com/causes-of-mapiexceptionnotauthorized-error-sending-to-public-folders" title="Causes of MapiExceptionNotAuthorized Error Sending to Public Folders">Causes of MapiExceptionNotAuthorized Error Sending to Public Folders</a></li><li><a href="http://exchangeserverpro.com/which-version-of-exchange-am-i-running" title="Which Version of Exchange Am I Running?">Which Version of Exchange Am I Running?</a></li><li><a href="http://exchangeserverpro.com/browsing-mailbox-databases-in-exchange-2007-and-2010" title="Browsing Mailbox Databases in Exchange 2007 and 2010">Browsing Mailbox Databases in Exchange 2007 and 2010</a></li><li><a href="http://exchangeserverpro.com/managing-diagnostic-logging-with-exchange-server-2007" title="Managing Diagnostic Logging with Exchange Server 2007">Managing Diagnostic Logging with Exchange Server 2007</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/object-is-read-only-removing-exchange-server-2007-public-folder-database">Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal</a> is © 2010 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/object-is-read-only-removing-exchange-server-2007-public-folder-database/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Enter the Exchange Server 2010 Product Key for Multiple Servers</title>
		<link>http://exchangeserverpro.com/how-to-enter-the-exchange-server-2010-product-key-for-multiple-servers</link>
		<comments>http://exchangeserverpro.com/how-to-enter-the-exchange-server-2010-product-key-for-multiple-servers#comments</comments>
		<pubDate>Wed, 02 Dec 2009 10:30:38 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[EMC]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Exchange Management Shell]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=1050</guid>
		<description><![CDATA[How to use the Exchange Management Shell to enter the product key for new Exchange Servers.]]></description>
			<content:encoded><![CDATA[<p>When Exchange Server 2010 is first installed it runs as a 120 day time-limited trial.  Within that first 120 days, or preferably before you put the server into production, you must enter a product key to remove the server from trial status.</p>
<p>For multiple servers in the organization this can be achieved using the Exchange Management Shell.  First identify which servers are currently in trial mode.</p>
<pre>[PS] C:\&gt;Get-ExchangeServer | where {$_.IsExchange2007TrialEdition -eq "True"}

Name                Site                 ServerRole  Edition     AdminDisplayVersion
----                ----                 ----------  -------     -------------------
EX1                 exchangeserverpro... Mailbox,... Standard... Version 14.0 (Bu...</pre>
<p>To enter the product key use the Set-ExchangeServer cmdlet with the -ProductKey switch.</p>
<pre>[PS] C:\&gt;$trialservers = Get-ExchangeServer | where {$_.IsExchange2007TrialEdition -eq "True"}

[PS] C:\&gt;$trialservers | Set-ExchangeServer -ProductKey 12345-12345-12345-12345-12345
WARNING: The product key has been validated and the product ID has been successfully created. This change won't take effect until the Information Store service has been restarted.</pre>
<p>Restart the Information Store on the servers and they are no longer in trial mode.</p>
<pre>[PS] C:\&gt;Get-ExchangeServer | fl name,*trial*

Name                              : EX1
IsExchange2007TrialEdition        : False
IsExpiredExchange2007TrialEdition : False
RemainingTrialPeriod              : 00:00:00</pre>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/how-to-use-a-specific-domain-controller-in-exchange-2010-management-shell" title="How to Use a Specific Domain Controller in Exchange 2010 Management Shell">How to Use a Specific Domain Controller in Exchange 2010 Management Shell</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-certificate-revocation-checks-and-proxy-settings" title="Exchange 2010 Certificate Revocation Checks and Proxy Settings">Exchange 2010 Certificate Revocation Checks and Proxy Settings</a></li><li><a href="http://exchangeserverpro.com/how-to-remove-mail-users-from-the-global-address-list" title="How to Remove Mail Users from the Global Address List">How to Remove Mail Users from the Global Address List</a></li><li><a href="http://exchangeserverpro.com/unable-to-modify-default-global-address-list" title="Unable to Modify Default Global Address List">Unable to Modify Default Global Address List</a></li><li><a href="http://exchangeserverpro.com/browsing-mailbox-databases-in-exchange-2007-and-2010" title="Browsing Mailbox Databases in Exchange 2007 and 2010">Browsing Mailbox Databases in Exchange 2007 and 2010</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/how-to-enter-the-exchange-server-2010-product-key-for-multiple-servers">How to Enter the Exchange Server 2010 Product Key for Multiple Servers</a> is © 2009 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/how-to-enter-the-exchange-server-2010-product-key-for-multiple-servers/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Use a Specific Domain Controller in Exchange 2010 Management Shell</title>
		<link>http://exchangeserverpro.com/how-to-use-a-specific-domain-controller-in-exchange-2010-management-shell</link>
		<comments>http://exchangeserverpro.com/how-to-use-a-specific-domain-controller-in-exchange-2010-management-shell#comments</comments>
		<pubDate>Mon, 30 Nov 2009 10:20:17 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[EMC]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Exchange Management Shell]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=1039</guid>
		<description><![CDATA[How to configure the domain controller for shell cmdlets to use during Exchange Management Shell sessions on Exchange Server 2010.]]></description>
			<content:encoded><![CDATA[<p>In a recent post I looked at <a href="http://exchangeserverpro.com/how-to-use-a-specific-domain-controller-in-the-exchange-2007-management-shell">how to specify a domain controller for use in the Exchange Management Shell</a> for Exchange Server 2007.  In this post I will demonstrate the same technique for Exchange Server 2010.</p>
<p>Any Exchange Management Shell cmdlet will permit you to specify a domain controller using the <strong>-DomainController</strong> switch.  But you can also set a preferred domain controller for your entire session.</p>
<p>Note the cmdlet to use here &#8211; <strong>Set-AdServerSettings</strong>.  This cmdlet configures the session settings such as the preferred Domain Controller and other settings such as the recipient scope.  Check out the <a href="http://technet.microsoft.com/en-us/library/dd298063%28EXCHG.140%29.aspx">full list of Set-AdServerSettings parameters here</a>.</p>
<p>First take a look at the current session settings.  In this example dc1.exchangeserverpro.local has been automatically selected.</p>
<pre>[PS] C:\&gt;Get-ADServerSettings | fl

RunspaceId                                 : 15e4d968-032b-4cd8-bc66-bf0b665c4161
DefaultGlobalCatalog                       : DC1.exchangeserverpro.local
PreferredDomainControllerForDomain         : {}
DefaultConfigurationDomainController       : DC1.exchangeserverpro.local
DefaultPreferredDomainControllers          : {DC1.exchangeserverpro.local}
UserPreferredGlobalCatalog                 :
UserPreferredConfigurationDomainController :
UserPreferredDomainControllers             : {}
RecipientViewRoot                          : exchangeserverpro.local
ViewEntireForest                           : False
Identity                                   :
IsValid                                    : True</pre>
<p>Using Set-ADServerSettings we can specify the preferred server for the current session with the -PreferredServer switch.</p>
<pre>[PS] C:\&gt;Set-ADServerSettings -PreferredServer dc2.exchangeserverpro.local</pre>
<p>Now Get-ADServerSettings shows this change has occurred.</p>
<pre>[PS] C:\&gt;Get-ADServerSettings | fl

RunspaceId                                 : b15cbfd9-5144-442e-bc74-c00a3216b864
DefaultGlobalCatalog                       : dc2.exchangeserverpro.local
PreferredDomainControllerForDomain         : {}
DefaultConfigurationDomainController       : dc2.exchangeserverpro.local
DefaultPreferredDomainControllers          : {DC1.exchangeserverpro.local}
UserPreferredGlobalCatalog                 : dc2.exchangeserverpro.local
UserPreferredConfigurationDomainController : dc2.exchangeserverpro.local
UserPreferredDomainControllers             : {dc2.exchangeserverpro.local}
RecipientViewRoot                          : exchangeserverpro.local
ViewEntireForest                           : False
Identity                                   :
IsValid                                    : True</pre>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/how-to-enter-the-exchange-server-2010-product-key-for-multiple-servers" title="How to Enter the Exchange Server 2010 Product Key for Multiple Servers">How to Enter the Exchange Server 2010 Product Key for Multiple Servers</a></li><li><a href="http://exchangeserverpro.com/exchange-2010-certificate-revocation-checks-and-proxy-settings" title="Exchange 2010 Certificate Revocation Checks and Proxy Settings">Exchange 2010 Certificate Revocation Checks and Proxy Settings</a></li><li><a href="http://exchangeserverpro.com/how-to-remove-mail-users-from-the-global-address-list" title="How to Remove Mail Users from the Global Address List">How to Remove Mail Users from the Global Address List</a></li><li><a href="http://exchangeserverpro.com/unable-to-modify-default-global-address-list" title="Unable to Modify Default Global Address List">Unable to Modify Default Global Address List</a></li><li><a href="http://exchangeserverpro.com/browsing-mailbox-databases-in-exchange-2007-and-2010" title="Browsing Mailbox Databases in Exchange 2007 and 2010">Browsing Mailbox Databases in Exchange 2007 and 2010</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/how-to-use-a-specific-domain-controller-in-exchange-2010-management-shell">How to Use a Specific Domain Controller in Exchange 2010 Management Shell</a> is © 2009 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/how-to-use-a-specific-domain-controller-in-exchange-2010-management-shell/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Use a Specific Domain Controller in the Exchange 2007 Management Shell</title>
		<link>http://exchangeserverpro.com/how-to-use-a-specific-domain-controller-in-the-exchange-2007-management-shell</link>
		<comments>http://exchangeserverpro.com/how-to-use-a-specific-domain-controller-in-the-exchange-2007-management-shell#comments</comments>
		<pubDate>Thu, 19 Nov 2009 13:26:08 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[EMS]]></category>
		<category><![CDATA[Exchange Management Shell]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://exchangeserverpro.com/?p=1041</guid>
		<description><![CDATA[How to configure the domain controller for shell cmdlets to use during Exchange Management Shell sessions.]]></description>
			<content:encoded><![CDATA[<p>I read this recent post at <a href="http://mostlyexchange.blogspot.com/2009/11/using-specific-domain-controller-with.html">Jim McBee&#8217;s Mostly Exchange blog</a> about how to specify a domain controller when issuing Exchange Management Shell commands.  After battling the Blogger comments system for a few minutes I gave up and decided to write this blog post instead.</p>
<p>Jim notes that the shell will generally choose the closest domain controller, which is not always the most appropriate one depending on the administrative tasks you are planning to execute.</p>
<p>Jim points out that you can add the <strong>-DomainController</strong> argument to any EMS cmdlet, which will resolve the issue for that specific command.  However there are two other ways to address this issue.</p>
<p>One way is to modify the <strong>$AdminSessionADSettings</strong> settings, which can be seen from the shell.</p>
<pre>[PS] C:\>$AdminSessionADSettings

ViewEntireForest              : False
DefaultScope                  : contoso.com
PreferredGlobalCatalog        :
ConfigurationDomainController : exch2007.contoso.com
PreferredDomainControllers    : {}
</pre>
<p>Note these two settings:</p>
<ul>
<li><strong>ConfigurationDomainController</strong> &#8211; lets you hard code a DC to use for shell cmdlets</li>
<li><strong>PreferredDomainControllers</strong> &#8211; lets you specify one or more preferred DC&#8217;s for shell cmdlets to use.  If a domain is specified that is not served by one of these preferred DC&#8217;s one will be chosen automatically.</li>
</ul>
<p>Modifying the settings is simple.</p>
<pre>
[PS] C:\>$AdminSessionADSettings.ConfigurationDomainController = 'dc1.contoso.com'
[PS] C:\>$AdminSessionADSettings.PreferredDomainControllers = 'dc1.contoso.com','dc2.contoso.com'
</pre>
<p>Any DC that you specify here must be valid or an error will appear and the change rejected.</p>
<p>Modifying $AdminSessionADSettings applies to the current session only.  To make these changes apply to all EMC sessions that the administrator launches you must edit the <strong>Bin\Exchange.ps1</strong> file in the Exchange Server installation folder.  Look for this line in the file:</p>
<pre>
$global:AdminSessionADSettings.ViewEntireForest = $false
</pre>
<p>Then simply append any additional settings after it.</p>
<pre>
$global:AdminSessionADSettings.ViewEntireForest = $false
$global:AdminSessionADSettings.ConfigurationDomainController = 'dc1.contoso.com'
</pre>
<p>This change will then take affect for all future Exchange Management Shell sessions on that server.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/exchange-2010-certificate-revocation-checks-and-proxy-settings" title="Exchange 2010 Certificate Revocation Checks and Proxy Settings">Exchange 2010 Certificate Revocation Checks and Proxy Settings</a></li><li><a href="http://exchangeserverpro.com/how-to-remove-mail-users-from-the-global-address-list" title="How to Remove Mail Users from the Global Address List">How to Remove Mail Users from the Global Address List</a></li><li><a href="http://exchangeserverpro.com/unable-to-modify-default-global-address-list" title="Unable to Modify Default Global Address List">Unable to Modify Default Global Address List</a></li><li><a href="http://exchangeserverpro.com/object-is-read-only-removing-exchange-server-2007-public-folder-database" title="Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal">Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal</a></li><li><a href="http://exchangeserverpro.com/browsing-mailbox-databases-in-exchange-2007-and-2010" title="Browsing Mailbox Databases in Exchange 2007 and 2010">Browsing Mailbox Databases in Exchange 2007 and 2010</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/how-to-use-a-specific-domain-controller-in-the-exchange-2007-management-shell">How to Use a Specific Domain Controller in the Exchange 2007 Management Shell</a> is © 2009 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/how-to-use-a-specific-domain-controller-in-the-exchange-2007-management-shell/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Managing Diagnostic Logging with Exchange Server 2007</title>
		<link>http://exchangeserverpro.com/managing-diagnostic-logging-with-exchange-server-2007</link>
		<comments>http://exchangeserverpro.com/managing-diagnostic-logging-with-exchange-server-2007#comments</comments>
		<pubDate>Mon, 23 Feb 2009 00:21:21 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Diagnostic Logging]]></category>
		<category><![CDATA[EMS]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://www.capslockassassin.com/?p=595</guid>
		<description><![CDATA[For those familiar with the GUI interface for Exchange Server 2003 diagnostic logging the new Exchange Server 2007 diagnostic logging cmdlets might seem a little daunting at first.  But with a little PowerShell understanding they become much easier to manage.  Lets take a look at a few examples. First of all the two shell cmdlets [...]]]></description>
			<content:encoded><![CDATA[<p>For those familiar with the GUI interface for Exchange Server 2003 diagnostic logging the new Exchange Server 2007 diagnostic logging cmdlets might seem a little daunting at first.  But with a little PowerShell understanding they become much easier to manage.  Lets take a look at a few examples.</p>
<p>First of all the two shell cmdlets we are going to use are <a href="http://technet.microsoft.com/en-us/library/bb125129.aspx">Get-EventLogLevel</a> and <a href="http://technet.microsoft.com/en-us/library/aa998905.aspx">Set-EventLogLevel</a>.  Each does what the name suggests, and can be combined to manage multiple diagnostic logging items quickly and easily.  The -Level parameter of each cmdlet determines what level of diagnostic logging is displayed.  The levels you can choose are 0 (Lowest), 1 (Low), 3 (Medium), 5 (High), and 7 (Expert).  Usually level 5 (High) is adequate but sometimes you will want level 7 (Expert).  The default level is 0 (Lowest) and should always be reset once your troubleshooting is complete.</p>
<p>Running Get-EventLogLevel on its own will output a long list of diagnostic logging items.</p>
<pre>[PS] C:\&gt;Get-EventLogLevel

Identity                                                             EventLevel
--------                                                             ----------
MSExchange ActiveSync\Requests                                       Lowest
MSExchange ActiveSync\Configuration                                  Lowest
MSExchange Antispam\General                                          Lowest
MSExchange Autodiscover\Core                                         Lowest
MSExchange Autodiscover\Web                                          Lowest
...</pre>
<p>To change the diagnostic logging level for one of these items we use Set-EventLogLevel.</p>
<pre>[PS] C:\&gt;Set-EventLogLevel "MSExchange ActiveSync\Requests" -Level 5</pre>
<p>You can see the outcome of this by running Get-EventLogLevel again.</p>
<pre>[PS] C:\&gt;Get-EventLogLevel

Identity                                                             EventLevel
--------                                                             ----------
MSExchange ActiveSync\Requests                                       High
MSExchange ActiveSync\Configuration                                  Lowest
MSExchange Antispam\General                                          Lowest
MSExchange Autodiscover\Core                                         Lowest
...</pre>
<p>Changing the level back is the same command with a different -Level value used.</p>
<pre>[PS] C:\&gt;Set-EventLogLevel "MSExchange ActiveSync\Requests" -Level 0</pre>
<p>Now lets say you are troubleshooting a Public Folder issue and want to turn up all of the diagnostic logging items for Public Folders.  You could run the Set-EventLogLevel cmdlet for each of the Public Folder logging items but that would be quite tedious as there are quite a few.</p>
<pre>MSExchangeIS\9001 Public\Transport General                           Lowest
MSExchangeIS\9001 Public\General                                     Lowest
MSExchangeIS\9001 Public\Replication DS Updates                      Lowest
MSExchangeIS\9001 Public\Replication Incoming Messages               Lowest
MSExchangeIS\9001 Public\Replication Outgoing Messages               Lowest
MSExchangeIS\9001 Public\Replication NDRs                            Lowest
MSExchangeIS\9001 Public\Transport Sending                           Lowest
MSExchangeIS\9001 Public\Transport Delivering                        Lowest
MSExchangeIS\9001 Public\MTA Connections                             Lowest
MSExchangeIS\9001 Public\Logons                                      Lowest
MSExchangeIS\9001 Public\Access Control                              Lowest
MSExchangeIS\9001 Public\Send On Behalf Of                           Lowest
MSExchangeIS\9001 Public\Send As                                     Lowest
MSExchangeIS\9001 Public\Rules                                       Lowest
MSExchangeIS\9001 Public\Storage Limits                              Lowest
MSExchangeIS\9001 Public\Replication Site Folders                    Lowest
MSExchangeIS\9001 Public\Replication Expiry                          Lowest
MSExchangeIS\9001 Public\Replication Conflicts                       Lowest
MSExchangeIS\9001 Public\Replication Backfill                        Lowest
MSExchangeIS\9001 Public\Background Cleanup                          Lowest
MSExchangeIS\9001 Public\Replication Errors                          Lowest
MSExchangeIS\9001 Public\DS Synchronization                          Lowest
MSExchangeIS\9001 Public\Views                                       Lowest
MSExchangeIS\9001 Public\Replication General                         Lowest
MSExchangeIS\9001 Public\Download                                    Lowest
MSExchangeIS\9001 Public\Local Replication                           Lowest</pre>
<p>With a little PowerShell syntax we can set the logging level of all of these items in a single command.</p>
<pre>[PS] C:\&gt;Get-EventLogLevel | where {$_.identity -like "MSExchangeIS\9001 Public\*"} | Set-EventLogLevel -Level 5</pre>
<p>Get-EventLogLevel will show us the outcome of this.</p>
<pre>[PS] C:\&gt;Get-EventLogLevel | where {$_.identity -like "MSExchangeIS\9001 Public\*"}

Identity                                                             EventLevel
--------                                                             ----------
MSExchangeIS\9001 Public\Transport General                           High
MSExchangeIS\9001 Public\General                                     High
MSExchangeIS\9001 Public\Replication DS Updates                      High
MSExchangeIS\9001 Public\Replication Incoming Messages               High
MSExchangeIS\9001 Public\Replication Outgoing Messages               High
MSExchangeIS\9001 Public\Replication NDRs                            High
MSExchangeIS\9001 Public\Transport Sending                           High
MSExchangeIS\9001 Public\Transport Delivering                        High
MSExchangeIS\9001 Public\MTA Connections                             High
MSExchangeIS\9001 Public\Logons                                      High
MSExchangeIS\9001 Public\Access Control                              High
MSExchangeIS\9001 Public\Send On Behalf Of                           High
MSExchangeIS\9001 Public\Send As                                     High
MSExchangeIS\9001 Public\Rules                                       High
MSExchangeIS\9001 Public\Storage Limits                              High
MSExchangeIS\9001 Public\Replication Site Folders                    High
MSExchangeIS\9001 Public\Replication Expiry                          High
MSExchangeIS\9001 Public\Replication Conflicts                       High
MSExchangeIS\9001 Public\Replication Backfill                        High
MSExchangeIS\9001 Public\Background Cleanup                          High
MSExchangeIS\9001 Public\Replication Errors                          High
MSExchangeIS\9001 Public\DS Synchronization                          High
MSExchangeIS\9001 Public\Views                                       High
MSExchangeIS\9001 Public\Replication General                         High
MSExchangeIS\9001 Public\Download                                    High
MSExchangeIS\9001 Public\Local Replication                           High</pre>
<p>To reset the logging levels when we are finished troubleshooting just use the same command string with the value for Lowest.</p>
<pre>[PS] C:\&gt;Get-EventLogLevel | where {$_.identity -like "MSExchangeIS\9001 Public\*"} | Set-EventLogLevel -Level 0</pre>
<p>Now lets say you have a server with several different diagnostic logging items set to High, filling up your Application event log with entries.  Some are Public Folder related, some are Transport related, and resetting them all would mean several individual commands.  You also don&#8217;t want to touch any of the items set to other levels such as Low.</p>
<pre>[PS] C:\&gt;Get-EventLogLevel | where {$_.EventLevel -ne "Lowest" -and $_.EventLevel -ne "Low"}</pre>
<p>By piping that command to the Set-EventLogLevel cmdlet you can reset any logging item that is now already set to Lowest or Low.</p>
<pre>[PS] C:\&gt;Get-EventLogLevel | where {$_.EventLevel -ne "Lowest" -and $_.EventLevel -ne "Low"} | Set-EventLogLevel -Level 0</pre>
<p>Now all of the various items that were set to Medium, High, or Expert levels have been reset to Lowest.</p>
<p>I hope that helps demystify Exchange Server 2007 diagnostic logging commands and helps you make use of this feature when troubleshooting any servers issues you are having.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/object-is-read-only-removing-exchange-server-2007-public-folder-database" title="Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal">Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal</a></li><li><a href="http://exchangeserverpro.com/ems-creating-email-address-policies-for-branch-offices" title="EMS &#8211; Creating Email Address Policies for branch offices">EMS &#8211; Creating Email Address Policies for branch offices</a></li><li><a href="http://exchangeserverpro.com/which-version-of-exchange-am-i-running" title="Which Version of Exchange Am I Running?">Which Version of Exchange Am I Running?</a></li><li><a href="http://exchangeserverpro.com/browsing-mailbox-databases-in-exchange-2007-and-2010" title="Browsing Mailbox Databases in Exchange 2007 and 2010">Browsing Mailbox Databases in Exchange 2007 and 2010</a></li><li><a href="http://exchangeserverpro.com/how-to-enable-autoaccept-on-multiple-room-mailboxes" title="How to Enable AutoAccept on Multiple Exchange 2007 Room Mailboxes">How to Enable AutoAccept on Multiple Exchange 2007 Room Mailboxes</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/managing-diagnostic-logging-with-exchange-server-2007">Managing Diagnostic Logging with Exchange Server 2007</a> is © 2009 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/managing-diagnostic-logging-with-exchange-server-2007/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>EMS &#8211; Creating Email Address Policies for branch offices</title>
		<link>http://exchangeserverpro.com/ems-creating-email-address-policies-for-branch-offices</link>
		<comments>http://exchangeserverpro.com/ems-creating-email-address-policies-for-branch-offices#comments</comments>
		<pubDate>Thu, 24 Apr 2008 04:40:17 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[EMS]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://www.capslockassassin.com/2008/04/24/ems-creating-email-address-policies-for-branch-offices/</guid>
		<description><![CDATA[In some companies different departments or branch offices require different primary SMTP addresses.&#160; You can configure these for users with Email Address Policies.&#160; In this example the company wants all users to have an @company.com address, but each branch office&#8217;s users have a primary email address representing that branch. First we must make sure each [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.exchangeserverpro.com/wp-content/uploads/2008/04/exchange-2007-shell-logo.jpg"><img height="40" alt="exchange-2007-shell-logo" src="http://www.exchangeserverpro.com/wp-content/uploads/2008/04/exchange-2007-shell-logo-thumb.jpg" width="40" align="left"></a> In some companies different departments or branch offices require different primary SMTP addresses.&nbsp; You can configure these for users with Email Address Policies.&nbsp; In this example the company wants all users to have an @company.com address, but each branch office&#8217;s users have a primary email address representing that branch.</p>
<p>First we must make sure each of the domains is included as an Accepted Domain, using the <a href="http://technet.microsoft.com/en-us/library/aa995975(EXCHG.80).aspx" target="_blank">New-AcceptedDomain</a> cmdlet.</p>
<pre>[PS] C:\&gt;New-AcceptedDomain -Name 'Sydney' -DomainName 'sydney.company.com'

Name                           DomainName                     DomainTy Default
                                                              pe
----                           ----------                     -------- -------
Sydney                         sydney.company.com             Autho... False

[PS] C:\&gt;New-AcceptedDomain -Name 'Brisbane' -DomainName 'brisbane.company.com'
-DomainType Authoritative

Name                           DomainName                     DomainTy Default
                                                              pe
----                           ----------                     -------- -------
Brisbane                       brisbane.company.com           Autho... False

[PS] C:\&gt;New-AcceptedDomain -Name 'Melbourne' -DomainName 'melbourne.company.com
' -DomainType Authoritative

Name                           DomainName                     DomainTy Default
                                                              pe
----                           ----------                     -------- -------
Melbourne                      melbourne.company.com          Autho... False

[PS] C:\&gt;New-AcceptedDomain 'Company.com' -DomainName 'company.com' -DomainType
Authoritative

Name                           DomainName                     DomainTy Default
                                                              pe
----                           ----------                     -------- -------
Company.com                    company.com                    Autho... False</pre>
<p>Then we can configure the Email Address Policies using the <a href="http://technet.microsoft.com/en-us/library/bb232194(EXCHG.80).aspx" target="_blank">New-EmailAddressPolicy</a> cmdlet.&nbsp; In this example I am using the &#8220;Office&#8221; user attribute to filter recipients.</p>
<pre>[PS] C:\&gt;New-EmailAddressPolicy -Name 'Sydney' -RecipientFilter {(Office -eq 'Sy
dney')} -EnabledEmailAddressTemplates 'SMTP:%g.%s@sydney.company.com','smtp:%g.%
s@company.com'

Name                       Priority                   RecipientFilter
----                       --------                   ---------------
Sydney                     1                          Office -eq 'Sydney'

[PS] C:\&gt;New-EmailAddressPolicy -Name 'Brisbane' -RecipientFilter {(Office -eq '
Brisbane')} -EnabledEmailAddressTemplates 'SMTP:%g.%s@brisbane.company.com','smt
p:%g.%s@company.com'

Name                       Priority                   RecipientFilter
----                       --------                   ---------------
Brisbane                   2                          Office -eq 'Brisbane'

[PS] C:\&gt;New-EmailAddressPolicy -Name 'Melbourne' -RecipientFilter {(Office -eq
'Melbourne')} -EnabledEmailAddressTemplates 'SMTP:%g.%s@melbourne.company.com','
smtp:%g.%s@company.com'

Name                       Priority                   RecipientFilter
----                       --------                   ---------------
Melbourne                  3                          Office -eq 'Melbourne'</pre>
<p>Here is the result for a recipient who matches the filter for the Sydney policy.</p>
<pre>[PS] C:\&gt;Get-Recipient 'Peter Grover' | fl Office,Emailaddresses

Office         : Sydney
EmailAddresses : {smtp:Peter.Grover@company.com, SMTP:Peter.Grover@sydney.company.com}</pre>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/object-is-read-only-removing-exchange-server-2007-public-folder-database" title="Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal">Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal</a></li><li><a href="http://exchangeserverpro.com/managing-diagnostic-logging-with-exchange-server-2007" title="Managing Diagnostic Logging with Exchange Server 2007">Managing Diagnostic Logging with Exchange Server 2007</a></li><li><a href="http://exchangeserverpro.com/which-version-of-exchange-am-i-running" title="Which Version of Exchange Am I Running?">Which Version of Exchange Am I Running?</a></li><li><a href="http://exchangeserverpro.com/browsing-mailbox-databases-in-exchange-2007-and-2010" title="Browsing Mailbox Databases in Exchange 2007 and 2010">Browsing Mailbox Databases in Exchange 2007 and 2010</a></li><li><a href="http://exchangeserverpro.com/how-to-enable-autoaccept-on-multiple-room-mailboxes" title="How to Enable AutoAccept on Multiple Exchange 2007 Room Mailboxes">How to Enable AutoAccept on Multiple Exchange 2007 Room Mailboxes</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/ems-creating-email-address-policies-for-branch-offices">EMS &#8211; Creating Email Address Policies for branch offices</a> is © 2008 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/ems-creating-email-address-policies-for-branch-offices/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exchange Server 2007 SP1 Public Folders and Outlook Web Access</title>
		<link>http://exchangeserverpro.com/exchange-server-2007-sp1-public-folders-and-outlook-web-access</link>
		<comments>http://exchangeserverpro.com/exchange-server-2007-sp1-public-folders-and-outlook-web-access#comments</comments>
		<pubDate>Fri, 07 Mar 2008 23:49:34 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Public Folders]]></category>

		<guid isPermaLink="false">http://www.capslockassassin.com/2008/03/08/exchange-server-2007-sp1-public-folders-and-outlook-web-access/</guid>
		<description><![CDATA[One of the enhancements to Exchange Server 2007 with Service Pack 1 is the ability to view public folders when logged in to Outlook Web Access. When an Exchange Server 2007 mailbox user attempts to open a public folder they may see the following information in the OWA window. This will appear if the public [...]]]></description>
			<content:encoded><![CDATA[<p align="left"><img src="http://www.exchangeserverpro.com/wp-content/uploads/2008/03/exchange-2007-logo.jpg" alt="exchange-2007-logo.jpg" align="left" />One of the enhancements to Exchange Server 2007 with Service Pack 1 is the ability to view public folders when logged in to Outlook Web Access.</p>
<p><img src="http://www.exchangeserverpro.com/wp-content/uploads/2008/03/publicfolder000.png" alt="publicfolder000.png" /></p>
<p>When an Exchange Server 2007 mailbox user attempts to open a public folder they may see the following information in the OWA window.</p>
<p><img src="http://www.exchangeserverpro.com/wp-content/uploads/2008/03/publicfolder001.png" alt="publicfolder001.png" /></p>
<p>This will appear if the public folder database configured for use by mailboxes on the Exchange Server 2007 mailbox database does not contain any content.  If the user clicks the &#8220;click here&#8221; link they are taken to the Exchange Server 2003 web-view of the public folder.</p>
<blockquote><p>When Outlook Web Access accesses public folders from an Exchange 2007 SP1 mailbox, Outlook Web Access first tries to connect to an Exchange 2007 SP1 public folder store. If no Exchange 2007 SP1 public folder database is available, the Outlook Web Access server next tries to connect to an Exchange 2003 public folder store. When it connects, the user will see the public folder by using the Outlook Web Access 2003 UI.</p>
<p><a href="http://technet.microsoft.com/en-us/library/bb430795(EXCHG.80).aspx" target="_blank">Source (Microsoft Technet)</a></p></blockquote>
<p>This behaviour will occur if the public folder store on the Exchange Server 2007 server has not been configured as a replica for that public folder.  Although a public folder store on an Exchange Server 2007 server will hold the public folder hierarchy information, it will only perform <a href="http://technet.microsoft.com/en-us/library/bb691235(EXCHG.80).aspx" target="_blank" title="Understanding Public Folder Referrals - Microsoft Technet">public folder referrals </a>to another server if it does not hold a local replica of the data.  If that public folder referral results in the user being directed to an Exchange Server 2003 server, they will receive the prompt shown above.</p>
<p>To resolve this issue configure your Exchange Server 2007 public folder store to be a replica for the public folder content.  You can view the current list of replicas for a public folder with the <a href="http://technet.microsoft.com/en-us/library/aa997615(EXCHG.80).aspx" target="_blank" title="Get-Publicfolder cmdlet">Get-PublicFolder </a>cmdlet.</p>
<pre>[PS] C:\&gt;Get-Publicfolder "\NameOfFolder" | fl name,replicas

Name     : NameOfFolder
Replicas : {Public Folders}</pre>
<p>To see all public folders you can do a recursive search.</p>
<pre>[PS] C:\&gt;Get-Publicfolder \ -Recurse | fl name,replicas

Name     : IPM_SUBTREE
Replicas : {}

Name     : NameOfFolder
Replicas : {Public Folders}

Name     : NameOfNextFolder
Replicas : {Public Folders}</pre>
<p>Public folder replicas can be managed with the <a href="http://technet.microsoft.com/en-us/library/aa998596(EXCHG.80).aspx" target="_blank" title="Set-Publicfolder cmdlet">Set-Publicfolder </a>cmdlet.  The &#8220;replicas&#8221; attribute is multi-valued, and the Set-Publicfolder cmdlet will set it <strong>but not append to it</strong>, so you must include any existing replicas that you want to retain in the list.</p>
<pre>[PS] C:\&gt;Get-PublicFolder -recurse | Set-PublicFolder -Replicas "SERVER1\Public
 Folders","SERVER2\Public Folders","SERVER3\Public Folders"</pre>
<p>The public folder content will replicate to the new replicas using the configured public folder replication interval.  If you wish to do an update manually to speed things up you can use the <a href="http://technet.microsoft.com/en-us/library/aa997451(EXCHG.80).aspx" target="_blank" title="Update-Publicfolder cmdlet">Update-Publicfolder </a>cmdlet.</p>
<p>Once the public folder store is listed as a replica and the content has replicated the Exchange Server 2007 SP1 mailbox users will be able to access the content in Outlook Web Access.</p>
<p>See also <a href="http://technet.microsoft.com/en-us/library/bb691120(EXCHG.80).aspx" target="_blank" title="How to configure public folder replication">How to configure public folder replication</a>.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/object-is-read-only-removing-exchange-server-2007-public-folder-database" title="Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal">Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal</a></li><li><a href="http://exchangeserverpro.com/public-folders-not-replicating-between-exchange-2007-and-2010" title="Public Folders Not Replicating Between Exchange 2007 and 2010">Public Folders Not Replicating Between Exchange 2007 and 2010</a></li><li><a href="http://exchangeserverpro.com/causes-of-mapiexceptionnotauthorized-error-sending-to-public-folders" title="Causes of MapiExceptionNotAuthorized Error Sending to Public Folders">Causes of MapiExceptionNotAuthorized Error Sending to Public Folders</a></li><li><a href="http://exchangeserverpro.com/how-to-migrate-public-folders-from-exchange-2003-to-exchange-2007" title="How to Migrate Public Folders from Exchange 2003 to Exchange 2007">How to Migrate Public Folders from Exchange 2003 to Exchange 2007</a></li><li><a href="http://exchangeserverpro.com/moving-the-public-folder-hierarchy-during-an-exchange-2007-migration" title="Moving the Public Folder Hierarchy During an Exchange 2007 Migration">Moving the Public Folder Hierarchy During an Exchange 2007 Migration</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/exchange-server-2007-sp1-public-folders-and-outlook-web-access">Exchange Server 2007 SP1 Public Folders and Outlook Web Access</a> is © 2008 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/exchange-server-2007-sp1-public-folders-and-outlook-web-access/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EMS – Script your Exchange Server 2007 Storage Groups and Mailbox Databases</title>
		<link>http://exchangeserverpro.com/ems-script-your-exchange-server-2007-storage-groups-and-mailbox-databases</link>
		<comments>http://exchangeserverpro.com/ems-script-your-exchange-server-2007-storage-groups-and-mailbox-databases#comments</comments>
		<pubDate>Mon, 03 Mar 2008 20:06:22 +0000</pubDate>
		<dc:creator>Paul Cunningham</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://www.capslockassassin.com/2008/03/04/ems-script-your-exchange-server-2007-storage-groups-and-mailbox-databases/</guid>
		<description><![CDATA[When deploying customer systems I almost never use the default &#8220;First Storage Group&#8221; and the associated mailbox database, or at the very least will move and rename them to suit the situation. In a lot of cases more than one storage group and mailbox database is required for the customer. Creating these through the Exchange [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.exchangeserverpro.com/wp-content/uploads/2008/03/exchange-2007-shell-logo.jpg" alt="exchange-2007-shell-logo.jpg" align="left" />When deploying customer systems I almost never use the default &#8220;First Storage Group&#8221; and the associated mailbox database, or at the very least will move and rename them to suit the situation.  In a lot of cases more than one storage group and mailbox database is required for the customer.  Creating these through the Exchange Management Console is a bit of a drag, and so is doing them one by one in the Exchange Management Shell.</p>
<p>Since you&#8217;ve pre-planned your Exchange system before installing it (right?) you can also take the time to whip up a script that will create your storage groups and mailbox databases for you while you do something more enjoyable.  The script will make use of the <a href="http://technet.microsoft.com/en-us/library/bb124941(EXCHG.80).aspx" target="_blank" title="New-StorageGroup cmdlet - Microsoft Technet">New-StorageGroup</a>, <a href="http://technet.microsoft.com/en-us/library/aa997976(EXCHG.80).aspx" target="_blank" title="New-MailboxDatabase cmdlet - Microsoft Technet">New-MailboxDatabase</a>, and optionally the <a href="http://technet.microsoft.com/en-us/library/aa998871(EXCHG.80).aspx" target="_blank" title="Mount-Database cmdlet - Microsoft Technet">Mount-Database</a> cmdlets.</p>
<p>I&#8217;ve uploaded a sample script here:<br />
<a href="http://www.exchangeserverpro.com/wp-content/uploads/2008/02/createmailstoresps1.txt" title="PowerShell Script">PowerShell Script</a></p>
<p>How to run the script:</p>
<ol>
<li>Download the script file from the link above and save it to your computer</li>
<li>Rename the file extension to .ps1</li>
<li>Launch the Exchange Management Shell</li>
<li>Execute the script by entering the name of the file (eg C:\Script\createmailstores.ps1)</li>
</ol>
<p>The script will output the name of each Storage Group as it is created, and then the name and all of the details of each of the Mailbox Databases as they are created.  A 300 second (5 minute) sleep is inserted at the end to try to avoid errors that can appear if you try to mount a database too soon after it has been created.</p>
<p>If any of the databases fail to mount you can wait a few more minutes before trying again.  One way of mounting several dismounted databases all together is to pipe the Get-MailboxDatabase cmdlet into the Mount-Database cmdlet like so:</p>
<pre>Get-MailboxDatabase | Mount-Database</pre>
<p>Because all of the databases are created with the MountAtStartup attribute set to True you can also mount all of the databases by restarting the Microsoft Exchange Information Store service like so:</p>
<pre>[PS] C:\&gt;Restart-Service MSExchangeIS
WARNING: Waiting for service 'Microsoft Exchange Information Store
(MSExchangeIS)' to finish stopping...
WARNING: Waiting for service 'Microsoft Exchange Information Store
(MSExchangeIS)' to finish starting...</pre>
<p>You should not use the Restart-Service method if you already have production databases running on the server.</p>
<h3  class="related_post_title">Related posts:</h3><ul class="related_post"><li><a href="http://exchangeserverpro.com/object-is-read-only-removing-exchange-server-2007-public-folder-database" title="Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal">Error “Object is Read Only” During Exchange Server 2007 Public Folder Database Removal</a></li><li><a href="http://exchangeserverpro.com/managing-diagnostic-logging-with-exchange-server-2007" title="Managing Diagnostic Logging with Exchange Server 2007">Managing Diagnostic Logging with Exchange Server 2007</a></li><li><a href="http://exchangeserverpro.com/ems-creating-email-address-policies-for-branch-offices" title="EMS &#8211; Creating Email Address Policies for branch offices">EMS &#8211; Creating Email Address Policies for branch offices</a></li><li><a href="http://exchangeserverpro.com/exchange-server-2007-sp1-public-folders-and-outlook-web-access" title="Exchange Server 2007 SP1 Public Folders and Outlook Web Access">Exchange Server 2007 SP1 Public Folders and Outlook Web Access</a></li><li><a href="http://exchangeserverpro.com/ems-check-your-exchange-server-2007-services" title="EMS – Check your Exchange Server 2007 services">EMS – Check your Exchange Server 2007 services</a></li></ul><hr />
<p>This article <a href="http://exchangeserverpro.com/ems-script-your-exchange-server-2007-storage-groups-and-mailbox-databases">EMS – Script your Exchange Server 2007 Storage Groups and Mailbox Databases</a> is © 2008 ExchangeServerPro.com</p>
<p>Get more <a href="http://exchangeserverpro.com">Exchange Server tips</a> at <a href="http://exchangeserverpro.com">ExchangeServerPro.com</a></p>]]></content:encoded>
			<wfw:commentRss>http://exchangeserverpro.com/ems-script-your-exchange-server-2007-storage-groups-and-mailbox-databases/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
