<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Mike Pfeiffer</title>
	
	<link>http://www.mikepfeiffer.net</link>
	<description>Exploring Microsoft Exchange, Lync, PowerShell, and more</description>
	<lastBuildDate>Thu, 10 May 2012 14:09:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MikePfeiffer" /><feedburner:info uri="mikepfeiffer" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>MikePfeiffer</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Useful Customizations to AD FS 2.0 when Deploying SSO with Office 365</title>
		<link>http://feedproxy.google.com/~r/MikePfeiffer/~3/fSEkwxELu74/</link>
		<comments>http://www.mikepfeiffer.net/2012/05/useful-cutomizations-to-ad-fs-2-0-when-deploying-sso-with-office-365/#comments</comments>
		<pubDate>Thu, 10 May 2012 04:24:44 +0000</pubDate>
		<dc:creator>Mike Pfeiffer</dc:creator>
				<category><![CDATA[Office 365]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ADFS]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[FBA]]></category>
		<category><![CDATA[Office365]]></category>
		<category><![CDATA[SSO]]></category>

		<guid isPermaLink="false">http://www.mikepfeiffer.net/?p=9500</guid>
		<description><![CDATA[If you're planning on deploying single sign-on with Office 365, you'll probably come to find that the AD FS forms based sign-in experience can be a little irritating for end-users. For example, let's say I've deployed AD FS, and I'm publishing that through an AD FS proxy. When a federated user hits the Microsoft Online [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>If you're planning on deploying single sign-on with Office 365, you'll probably come to find that the AD FS forms based sign-in experience can be a little irritating for end-users. For example, let's say I've deployed AD FS, and I'm publishing that through an AD FS proxy. When a federated user hits the Microsoft Online Portal <strong>from the outside</strong> world, they enter their username, and the password field gets greyed out. Just underneath that, there is a link will send them over to the AD FS server on-premises (via the AD FS proxy) server to enter their AD credentials. So far, this is fine. It's the next step (clicking on the <em>Sign in at Office365lab.us</em> link) that becomes confusing.</p>
<p><img class="aligncenter size-full wp-image-3478;" src="http://www.mikepfeiffer.net/wp-content/uploads/2012/05/adfs_1.png" /></p>
<p>Once redirected, they'll end up at an AD FS sign-in page, like the one below. This is where a couple of minor issues come into play. First, for the sake of consistency, it would probably be better to update the label and description for the user name field. The previous screen that they were on was asking for a "User ID" and now I'm asking them for a "user name". Even more important is the example provided just to the right of the user name field. I'd rather ask them to use their e-mail address, instead of their login in the format of domain\username. In many cases, they have no idea what the netbios name of their domain is.</p>
<p><img class="aligncenter size-full wp-image-3478;" src="http://www.mikepfeiffer.net/wp-content/uploads/2012/05/adfs_21.png" /></p>
<h3>1. Modify the label and description for the user name field</h3>
<p>On the AD FS proxy server, navigate to <strong>C:\inetpub\adfs\ls\App_GlobalResources</strong>. You'll want to find the CommonResources file for each required language. In this example, I only need to modify the english version, so I'll open up the <strong>CommonResources.en.resx</strong> file in notepad.</p>
<p>Look for some xml code like this, which starts on <strong>line 180</strong>. This will be the description just to the right of the user name text box. Change the value to the desired text, such as an example of what an e-mail address should look like.</p>
<pre class="brush: xml; title: ; notranslate">
  &lt;data name=&quot;UsernameExample&quot; xml:space=&quot;preserve&quot;&gt;
    &lt;value&gt;Example: joe@office365lab.us&lt;/value&gt;
  &lt;/data&gt;
</pre>
<p>On <strong>line 183</strong>, you can update the text box label. In this case, I'm going to tell them to use their User ID, which is the same as the portal sign in page:</p>
<pre class="brush: xml; title: ; notranslate">
  &lt;data name=&quot;UsernameLabel&quot; xml:space=&quot;preserve&quot;&gt;
    &lt;value&gt;User ID: &lt;/value&gt;
  &lt;/data&gt;
</pre>
<p>Save the file and try logging in again. You should notice the the label and description are now updated:</p>
<p><img class="aligncenter size-full wp-image-3478;" src="http://www.mikepfeiffer.net/wp-content/uploads/2012/05/adfs_2b.png" /></p>
<h3>2. Even better: auto-populate the User ID</h3>
<p>Instead of asking for their e-mail address again, how about populating it for them? This trick comes from dkershaw_MSFT who posted a gem on the <a href="http://community.office365.com/en-us/f/178/p/506/2237.aspx">Office 365 community</a> forum. This will allow you to modify the ASP.NET code so that the user name field is automatically populated. The ASP.NET code is not compiled, so even if you do not have Visual Studio installed, you can simply open the file in notepad and modify the code.</p>
<p>Open the <strong>FormsSignIn.aspx.cs</strong> file which is also located in <strong>C:\inetpub\adfs\ls</strong> folder. You'll need to add a couple using directives to the beginning of the file:</p>
<pre class="brush: csharp; title: ; notranslate">
using System.Web;
using System.Collections.Specialized;
</pre>
<p>Then, inside the Page_Load() method, add the following C# code:</p>
<pre class="brush: csharp; title: ; notranslate">
        string url = Context.Request.Url.AbsoluteUri;
        NameValueCollection parameters = HttpUtility.ParseQueryString(url);
        string userIdentity = parameters[&quot;username&quot;];
        if (!String.IsNullOrEmpty(userIdentity))
        {
            UsernameTextBox.Text = userIdentity;
        }
</pre>
<p>After saving the file, go back to the portal sign in page. You should get redirected back to AD FS and the e-mail address field will be filled out and ready to go:</p>
<p><img class="aligncenter size-full wp-image-3478;" src="http://www.mikepfeiffer.net/wp-content/uploads/2012/05/adfs_3c.png" /></p>
<p>I made one small change to the code. I set focus on the password field since the e-mail address will already be populated on the form. When a user gets redirected, they simply type in the password and hit enter. </p>
<p>By default, AD FS servers use Windows Integrated Authentication (WIA), and only  the AD FS proxy servers are setup for Forms Based Authentication (FBA). If you are not using an AD FS proxy, you are likely publishing your internal AD FS servers to the internet through something like TMG, and therefore external users are not seeing an FBA page. Instead, they get a basic authentication dialog box. If you are NOT using AD FS proxy, and you DO want FBA, carefully read through <a href="http://social.technet.microsoft.com/wiki/contents/articles/1600.aspx" target="_blank">this article</a> on the TechNet Wiki and decide if that is something you want to change. If so, you should be able to use the techniques outlined in this post to modify the ASP.NET pages on the AD FS server.</p>
<img src="http://feeds.feedburner.com/~r/MikePfeiffer/~4/fSEkwxELu74" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mikepfeiffer.net/2012/05/useful-cutomizations-to-ad-fs-2-0-when-deploying-sso-with-office-365/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.mikepfeiffer.net/2012/05/useful-cutomizations-to-ad-fs-2-0-when-deploying-sso-with-office-365/</feedburner:origLink></item>
		<item>
		<title>Bytes by TechNet : Interview with Harold Wong from Microsoft</title>
		<link>http://feedproxy.google.com/~r/MikePfeiffer/~3/HwIOoucV11Y/</link>
		<comments>http://www.mikepfeiffer.net/2012/05/bytes-by-technet-interview-with-harold-wong-from-microsoft/#comments</comments>
		<pubDate>Thu, 10 May 2012 04:23:56 +0000</pubDate>
		<dc:creator>Mike Pfeiffer</dc:creator>
				<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Edge]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[TechNet]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.mikepfeiffer.net/?p=9598</guid>
		<description><![CDATA[I had a chance to sit down and chat with Harold Wong, Senior IT Pro Evangelist for Microsoft on the Bytes by TechNet series recently. Here's the direct link: http://technet.microsoft.com/en-us/edge/bytes-by-technet-mike-pfeiffer-and-harold-wong.aspx and the video is embedded below: The Bytes by Technet Homepage: http://technet.microsoft.com/en-us/edge/bytesbytechnet.aspx]]></description>
			<content:encoded><![CDATA[<p></p><p>I had a chance to sit down and chat with Harold Wong, Senior IT Pro Evangelist for Microsoft on the Bytes by TechNet series recently. Here's the direct link: <a href="http://technet.microsoft.com/en-us/edge/bytes-by-technet-mike-pfeiffer-and-harold-wong.aspx" target="_blank">http://technet.microsoft.com/en-us/edge/bytes-by-technet-mike-pfeiffer-and-harold-wong.aspx</a> <span id="more-9598"></span>and the video is embedded below:</p>
<p><script src="http://technet.microsoft.com/en-us/videoembed/bytes-by-technet-mike-pfeiffer-and-harold-wong" type="text/javascript"></script></p>
<p>The Bytes by Technet Homepage:<br />
<a href="http://technet.microsoft.com/en-us/edge/bytesbytechnet.aspx" target="_blank">http://technet.microsoft.com/en-us/edge/bytesbytechnet.aspx</a></p>
<img src="http://feeds.feedburner.com/~r/MikePfeiffer/~4/HwIOoucV11Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mikepfeiffer.net/2012/05/bytes-by-technet-interview-with-harold-wong-from-microsoft/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.mikepfeiffer.net/2012/05/bytes-by-technet-interview-with-harold-wong-from-microsoft/</feedburner:origLink></item>
		<item>
		<title>PowerHour Webcast on 5/23/2012: Managing Office 365 with PowerShell</title>
		<link>http://feedproxy.google.com/~r/MikePfeiffer/~3/m9nw-l5IOoU/</link>
		<comments>http://www.mikepfeiffer.net/2012/05/powerhour-webcast-on-5232012-managing-office-365-with-powershell/#comments</comments>
		<pubDate>Tue, 01 May 2012 16:46:21 +0000</pubDate>
		<dc:creator>Mike Pfeiffer</dc:creator>
				<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Office 365]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Office365]]></category>

		<guid isPermaLink="false">http://www.mikepfeiffer.net/?p=9436</guid>
		<description><![CDATA[I'll be delivering another PowerShell.com PowerHour webcast later this month on 5/23. This time I'll be talking about Office 365 and PowerShell. Here is the description for the webcast: This webcast will help you extend your administrative capabilities in Office 365 with Windows PowerShell. Learn how to use the Microsoft Online Services Module for Windows [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.idera.com/" target=_blank><img src="http://www.mikepfeiffer.net/wp-content/uploads/2012/05/idera_powerhour.png" style="float:right;padding-left:15px;padding-bottom:4px;" /></a>I'll be delivering another PowerShell.com PowerHour <a href="http://powershell.com/cs/media/g/powershell-webcasts/default.aspx" target="_blank">webcast</a> later this month on 5/23. This time I'll be talking about Office 365 and PowerShell. Here is the description for the webcast: This webcast will help you extend your administrative capabilities in Office 365 with Windows PowerShell. Learn how to use the Microsoft Online Services Module for Windows PowerShell to provision accounts, manage licensing, and more. Find out how to perform common Exchange Online administrative tasks such as creating shared mailboxes, updating recipients, and assigning permissions. In this session you'll see several live demonstrations, and you'll walk away with code samples that will help you automate routine tasks in the cloud.</p>
<p>You can register for the webcast <a href="https://www.vconferenceonline.com/event/regeventweb.aspx?id=663" target="_blank">here</a>.</p>
<img src="http://feeds.feedburner.com/~r/MikePfeiffer/~4/m9nw-l5IOoU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mikepfeiffer.net/2012/05/powerhour-webcast-on-5232012-managing-office-365-with-powershell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.mikepfeiffer.net/2012/05/powerhour-webcast-on-5232012-managing-office-365-with-powershell/</feedburner:origLink></item>
		<item>
		<title>Slide Decks and Code Samples from Exchange Connections Spring 2012</title>
		<link>http://feedproxy.google.com/~r/MikePfeiffer/~3/G9c10XE9PEI/</link>
		<comments>http://www.mikepfeiffer.net/2012/04/slide-decks-and-code-samples-from-exchange-connections-spring-2012/#comments</comments>
		<pubDate>Sun, 08 Apr 2012 19:40:32 +0000</pubDate>
		<dc:creator>Mike Pfeiffer</dc:creator>
				<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Exchange Management Shell]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[Connections]]></category>
		<category><![CDATA[EMS]]></category>
		<category><![CDATA[Exchange]]></category>

		<guid isPermaLink="false">http://www.mikepfeiffer.net/?p=9292</guid>
		<description><![CDATA[I had a really great time presenting at the Spring 2012 Exchange Connections last month in Las Vegas. If you attended my sessions and want to download the materials, I've provided links to a zip archive for each presentation that contains the slide decks and sample code below. CEM224: EMS Part I - Speed Up [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.devconnections.com/shows/sp2012/default.aspx?s=187" target=_blank><img src="http://www.mikepfeiffer.net/wp-content/uploads/2012/04/connections.png" style="float:right;padding-left:15px;padding-bottom:4px;" /></a>I had a really great time presenting at the Spring 2012 Exchange Connections last month in Las Vegas. If you attended my sessions and want to download the materials, I've provided links to a zip archive for each presentation that contains the slide decks and sample code below.</p>
<p><a href="http://www.mikepfeiffer.net/wp-content/uploads/2012/04/CEM224_EMS_Part_I_Pfeiffer.zip">CEM224: EMS Part I - Speed Up Your Work with the Exchange Management Shell</a><br />
<a href="http://www.mikepfeiffer.net/wp-content/uploads/2012/04/CEM325_EMS_Part_II_Pfeiffer.zip">CEM325: EMS Part II - Exchange Management Shell Tactics from the Field</a> </p>
<p>Feel free to <a href="http://www.mikepfeiffer.net/contact/" target="_blank">contact me</a> with any questions.</p>
<img src="http://feeds.feedburner.com/~r/MikePfeiffer/~4/G9c10XE9PEI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mikepfeiffer.net/2012/04/slide-decks-and-code-samples-from-exchange-connections-spring-2012/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.mikepfeiffer.net/2012/04/slide-decks-and-code-samples-from-exchange-connections-spring-2012/</feedburner:origLink></item>
		<item>
		<title>I’m Speaking at Exchange Connections this Month in Las Vegas</title>
		<link>http://feedproxy.google.com/~r/MikePfeiffer/~3/5-bJ_gylfGE/</link>
		<comments>http://www.mikepfeiffer.net/2012/03/im-speaking-at-exchange-connections-this-month-in-las-vegas/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 00:24:21 +0000</pubDate>
		<dc:creator>Mike Pfeiffer</dc:creator>
				<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[Connections]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Speaking]]></category>

		<guid isPermaLink="false">http://www.mikepfeiffer.net/?p=9130</guid>
		<description><![CDATA[If you will be in or around Las Vegas at the end of March, come see me at the Exchange connections conference. I'll be talking about Exchange and PowerShell, but you'll also find a great mix of sessions for traditional Windows and Exchange Connections audiences, plus a great set of sessions on how to get [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.devconnections.com/shows/sp2012/default.aspx?s=187" target=_blank><img src="http://www.mikepfeiffer.net/wp-content/uploads/2012/03/S12_IllBeThere_Cld_Win_Exch.png" style="float:right;padding-left:5px;padding-bottom:4px;" /></a>If you will be in or around Las Vegas at the end of March, come see me at the Exchange connections conference. I'll be talking about Exchange and PowerShell, but you'll also find a great mix of sessions for traditional Windows and Exchange Connections audiences, plus a great set of sessions on how to get to the cloud, if that is indeed where you need to go. I'll be presenting two sessions; a 200 and 300 level session on the Exchange Management Shell (EMS). The session abstracts are listed below.</p>
<blockquote><p>
<strong>EMS Part I - Speed Up Your Work with the Exchange Management Shell</strong><br />
Don’t let point and click administration in the Exchange Management Console slow you down. PowerShell command syntax can be intimidating at first, but once you understand some of the core concepts, you can vastly maximize your efficiency with the Exchange Management Shell (EMS). In this 200-level session, you will learn several techniques used to automate routine tasks and solve common problems that Exchange administrators are faced with on a regular basis. You’ll walk away with an understanding of how EMS works, and you’ll see live demonstrations showing you how to make bulk changes, generate reports and more. Administrators just getting started with the Exchange Management Shell will benefit from this session.
</p></blockquote>
<blockquote><p>
<strong>EMS Part II - Exchange Management Shell Tactics from the Field</strong><br />
Are you ready to take your Exchange Management Shell (EMS) skills to a new level? If you’ve been running Exchange cmdlets, or even doing some basic pipeline commands, you’ve probably already noticed an increase in efficiency. Now it’s time to turn up the heat. In this 300-level session, you will learn how to deal with common pitfalls and stumbling blocks that can arise when working with EMS in the field. You’ll also see how you can use PowerShell functions, scripts and one-liners to provide solutions to typical scenarios in real-world deployments. Exchange administrators that have some familiarity with PowerShell will get the most out of this session.
</p></blockquote>
<p>Check out the <a href="http://www.devconnections.com/shows/sp2012/default.aspx?s=187" target=_blank>conference website</a> for complete details and registration information. I'm really looking forward to it and hope to see you there.</p>
<img src="http://feeds.feedburner.com/~r/MikePfeiffer/~4/5-bJ_gylfGE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mikepfeiffer.net/2012/03/im-speaking-at-exchange-connections-this-month-in-las-vegas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.mikepfeiffer.net/2012/03/im-speaking-at-exchange-connections-this-month-in-las-vegas/</feedburner:origLink></item>
		<item>
		<title>How to Remove E-Mail Addresses for a Specific Domain from Exchange</title>
		<link>http://feedproxy.google.com/~r/MikePfeiffer/~3/CCEpGjyVQlU/</link>
		<comments>http://www.mikepfeiffer.net/2012/02/how-to-remove-e-mail-addresses-for-a-specific-domain-from-exchange/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 23:00:56 +0000</pubDate>
		<dc:creator>Mike Pfeiffer</dc:creator>
				<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Exchange Management Shell]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[E-Mail]]></category>
		<category><![CDATA[EMS]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[ProxyAddress]]></category>
		<category><![CDATA[Remove]]></category>
		<category><![CDATA[SMTP]]></category>

		<guid isPermaLink="false">http://www.mikepfeiffer.net/?p=9039</guid>
		<description><![CDATA[It's easy to add one or more e-mail addresses to a recipient. This is usually done with an an e-mail address policy, or individually through EMC or EMS. The real challenge comes when you need to remove a specific address from a large number of recipients. For example, let's say that you use an e-mail [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>It's easy to add one or more e-mail addresses to a recipient. This is usually done with an an e-mail address policy, or individually through EMC or EMS. The real challenge comes when you need to remove a specific address from a large number of recipients. For example, let's say that you use an e-mail address policy to add an addition e-mail address at contoso.com to every mailbox in the organization. If you later remove that domain from the policy, that won't go out and remove those addresses from your mailboxes. You have to do that manually. Below is code snippet you can use in EMS to remove addresses at a particular domain from every mailbox in the organization.</p>
<p>With Exchange 2010 SP1 or higher, you can take advantage of <a href="http://blogs.technet.com/b/dstrome/archive/2011/05/29/multivalued-properties-in-exchange-2010.aspx" target="_blank">this</a> special hash table syntax which is now supported with EMS cmdlets. It's keeps the code consise.</p>
<pre class=PowerGuiCommand><span style="color: #0000FF;">foreach</span><span style="color: #000000;">(</span><span style="color: #800080;">$i</span><span style="color: #000000;"> </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> Get-Mailbox -ResultSize Unlimited) {
　 </span><span style="color: #800080;">$i</span><span style="color: #000000;">.EmailAddresses |
　　　 ?{</span><span style="color: #800080;">$_</span><span style="color: #000000;">.AddressString </span><span style="color: #FF0000;">-like</span><span style="color: #000000;"> </span><span style="color: #800000;">'</span><span style="color: #800000;">*@contoso.com</span><span style="color: #800000;">'</span><span style="color: #000000;">} | </span><span style="color: #5F9EA0; font-weight: bold;">%</span><span style="color: #000000;">{
　　　　　 Set-Mailbox </span><span style="color: #800080;">$i</span><span style="color: #000000;"> -EmailAddresses @{remove</span><span style="color: #FF0000;">=</span><span style="color: #800080;">$_</span><span style="color: #000000;">}
　　　 }
}</span></pre>
<p>This will simply iterate over each mailbox, and look for any address using @contoso.com. Any matches are removed. To use this code, just replace contoso.com with whatever e-mail domain you want to target. In this example, we're using Get-Mailbox to first retrieve all of the mailboxes. If you need to remove these address from groups, replace "Get-Mailbox" and "Set-Mailbox" with "Get-DistributionGroup" and "Set-DistributionGroup". This goes for other recipient types as well, such as dynamic distribution groups and mail users, etc.</p>
<img src="http://feeds.feedburner.com/~r/MikePfeiffer/~4/CCEpGjyVQlU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mikepfeiffer.net/2012/02/how-to-remove-e-mail-addresses-for-a-specific-domain-from-exchange/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://www.mikepfeiffer.net/2012/02/how-to-remove-e-mail-addresses-for-a-specific-domain-from-exchange/</feedburner:origLink></item>
		<item>
		<title>Error: “An attempt to route to an Exchange UM server failed” when Calling Voicemail from Lync</title>
		<link>http://feedproxy.google.com/~r/MikePfeiffer/~3/d1Qz_UlY7BM/</link>
		<comments>http://www.mikepfeiffer.net/2012/02/error-an-attempt-to-route-to-an-exchange-um-server-failed-when-calling-voicemail-from-lync/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 23:00:51 +0000</pubDate>
		<dc:creator>Mike Pfeiffer</dc:creator>
				<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Lync 2010]]></category>
		<category><![CDATA[Certificates]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Lync]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[UM]]></category>

		<guid isPermaLink="false">http://www.mikepfeiffer.net/?p=8988</guid>
		<description><![CDATA[So, you've just deployed Exchange UM and integrated it with Lync 2010, but you can't reach your voicemail. You've noticed that in the Lync Server event logs an event 44022 is logged and says something similar to the following: The attempt failed with response code 504: EX2010.uss.local. Request Target: [UMDP@EX2010.uss.local], Call Id: [026e7750cea5472296affeae0240ac4b]. Failure occurrences: [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>So, you've just deployed Exchange UM and integrated it with Lync 2010, but you can't reach your voicemail. You've noticed that in the Lync Server event logs an event 44022 is logged and says something similar to the following:</p>
<blockquote><p>
The attempt failed with response code 504: EX2010.uss.local.<br />
Request Target: [UMDP@EX2010.uss.local], Call Id: [026e7750cea5472296affeae0240ac4b].<br />
Failure occurrences: 2, since 1/10/2012 12:28:50 PM.<br />
Cause: An attempt to route to an Exchange UM server failed because the UM server was unable to process the request or did not respond within the allotted time.</p>
<p>Resolution:<br />
Check this server is correctly configured to point to the appropriate Exchange UM server. Also check whether the Exchange UM server is up and whether it in turn is also properly configured.
</p></blockquote>
<p><img class="aligncenter size-full wp-image-3478;" style="margin-top:20px;" src="http://www.mikepfeiffer.net/wp-content/uploads/2012/01/lync-exchange-um-error.png" /></p>
<p>Don't worry, it's an easy fix. Most likely, it's caused by an incorrect subject name on the Exchange UM server certificate. Check the certificate in EMC, or fire up EMS and run the Get-ExchangeCertificate, targeting the UM server:</p>
<pre>Get-ExchangeCertificate -Server ex2010 | fl subject,services</pre>
<p><img class="aligncenter size-full wp-image-3478;" style="margin-top:20px;" src="http://www.mikepfeiffer.net/wp-content/uploads/2012/01/lync-exchange-um-error2.png" /></p>
<p>You want to make sure the certificate on the UM server is setup like this one. For example, my UM server name is ex2010.uss.local. This needs to be subject name on the certificate—in other words, it needs to be set as the common name when you generate the certificate request. Also, the UM service needs to be assigned to the certificate.</p>
<p>If either of these are off, you'll need to fix them. To assign the UM service to a certificate in EMC, just right click the certificate and select 'Assign Services'. This will take you through a wizard where you can assign the UM service to the certificate. If the subject name is wrong, that will require a little more work, and you will need to generate a new certificate. After making these changes, restart the MSExchangeUM service and you should be all set.</p>
<img src="http://feeds.feedburner.com/~r/MikePfeiffer/~4/d1Qz_UlY7BM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mikepfeiffer.net/2012/02/error-an-attempt-to-route-to-an-exchange-um-server-failed-when-calling-voicemail-from-lync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.mikepfeiffer.net/2012/02/error-an-attempt-to-route-to-an-exchange-um-server-failed-when-calling-voicemail-from-lync/</feedburner:origLink></item>
		<item>
		<title>Generating Delivery Reports and Tracking Messages from PowerShell</title>
		<link>http://feedproxy.google.com/~r/MikePfeiffer/~3/IJzAdvb7Jyc/</link>
		<comments>http://www.mikepfeiffer.net/2012/01/generating-delivery-reports-and-tracking-messages-from-powershell/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 17:48:54 +0000</pubDate>
		<dc:creator>Mike Pfeiffer</dc:creator>
				<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Exchange Management Shell]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Delivery]]></category>
		<category><![CDATA[EMS]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Read]]></category>
		<category><![CDATA[Reports]]></category>
		<category><![CDATA[Tracking]]></category>

		<guid isPermaLink="false">http://www.mikepfeiffer.net/?p=8844</guid>
		<description><![CDATA[Delivery Reports were introduced in Exchange 2010 and provide a method for users to verify that the messages they’ve sent have been successfully delivered. Users are able to generate these reports from the Delivery Reports screen in the Exchange Control Panel (ECP), which is also where Outlook 2010 will send them when they track a [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Delivery Reports were <a href="http://blogs.technet.com/b/exchange/archive/2010/01/13/exchange-2010-delivery-reports.aspx" target="_blank">introduced in Exchange 2010</a> and provide a method for users to verify that the messages they’ve sent have been successfully delivered. Users are able to generate these reports from the Delivery Reports screen in the Exchange Control Panel (ECP), which is also where Outlook 2010 will send them when they track a message. Since the ECP is driven by Exchange Management Shell cmdlets, we can create and view these reports using PowerShell. This gives you another tool to verify message delivery—in addition to the existing <a href="http://technet.microsoft.com/en-us/library/bb124926.aspx" target="_blank">message tracking</a> search functionality—but it can also provide the "read status" of a message. Let's start off with a basic example.</p>
<p>To create a delivery report from the shell, you first need to use the <a href="http://technet.microsoft.com/en-us/library/dd351138.aspx" target="_blank">Search-MessageTrackingReport</a> cmdlet. This will give you a list of one or more reports, and you'll need to pass the report id returned by this command to another cmdlet to get more details. Because of that, the bast way to handle this is to save the output in a variable:</p>
<pre>$msg = Search-MessageTrackingReport -Identity allen -Recipients rob@uss.local -BypassDelegateChecking</pre>
<p>If you want to search delivery reports for a mailbox other than your own, you need to use the -BypassDelegateChecking switch parameter as well. The search criteria can be based on the recipients of the message, as shown in the previous example, or on the subject of the message using the -Subject parameter.</p>
<p>After the search has completely successfully, use the <a href="http://technet.microsoft.com/en-us/library/dd351082.aspx" target="_blank">Get-MessageTrackingReport</a> cmdlet to review the results. To do this, we can simply iterate over each report id stored in the variable created in the previous step:</p>
<pre>
$msg | %{ Get-MessageTrackingReport -Identity $_.MessageTrackingReportId -BypassDelegateChecking }
</pre>
<p>For each message returned, the results should look similar to the following:</p>
<p><img class="aligncenter size-full wp-image-3478;" style="margin-top:20px;" src="http://www.mikepfeiffer.net/wp-content/uploads/2012/01/delivery_report_1_b.png" /></p>
<p>You can see that several details about the message are returned, including the delivery status, which was successful.</p>
<p>When tracking the status of a message sent to an external recipient, the we can only track the message as it leaves the last transport server on its way out of the organization. As long as this is successful, the TransferredCount will be incremented and the RecipientTrackingEvents will indicate that the message was transferred to a foreign organization.</p>
<h3>Determining "Read Status" without Read Receipts</h3>
<p>In addition to tracking the successful delivery of messages within the organization, you can also enable read tracking to determine the read status of a message. To do this, you first need to enable read tracking:</p>
<pre>Set-OrganizationConfig -ReadTrackingEnabled $true</pre>
<p>After this command has been run, read tracking will be enabled on all hub transport servers organization wide. By default, read status tracking for mailboxes is enabled. If read tracking needs to be disabled for specific users, you can disable on a per user basis using the Set-Mailbox cmdlet. For example:</p>
<pre>
Set-Mailbox -Identity steve -MessageTrackingReadStatusEnabled $false
</pre>
<p>At this point, read tracking has been enabled at the organization level, and we can determine the read status of a message by checking the delivery report. To do this, we’ll create another search. This time we’ll specify the subject of the e-mail for the search criteria:</p>
<pre>$msg = Search-MessageTrackingReport -Identity allen -Subject 'Testing 1,2,3' -BypassDelegateChecking</pre>
<p>According to the cmdlet help for the Get-MessageTrackingReport cmdlet, we should be able to determine the read status of a message by setting the -Status parameter to <em>Read</em>. So far, I haven't been able to get that to work (I'm looking into this). However, we can still track the read status for messages using the RecipientPath report template when running the Get-MessageTrackingReport cmdlet:</p>
<pre>$msg | %{ Get-MessageTrackingReport -Identity $_.MessageTrackingReportId -BypassDelegateChecking -RecipientPathFilter rob@uss.local -ReportTemplate RecipientPath }</pre>
<p>When using the RecipientPath report template, you also need to set the -RecipientPathFilter parameter to the recipient address for the message. The above command produces the following output:</p>
<p><img class="aligncenter size-full wp-image-3478;" style="margin-top:20px;" src="http://www.mikepfeiffer.net/wp-content/uploads/2012/01/delivery_report_2_b.png" /></p>
<p>Notice that the RecipentTrackingEvents property shows that the message was submitted, delivered, and is also set to <strong>Read</strong>.</p>
<p>If you don't have organization read tracking enabled, you can still check the read status of a message from PowerShell with the EWS Managed API. There is a great code sample for this posted <a href="http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/99a2b26d-a672-4c8b-ba51-60ed40feb60b" target="_blank">here</a> by a user in the Exchange 2010 forums on TechNet.</p>
<img src="http://feeds.feedburner.com/~r/MikePfeiffer/~4/IJzAdvb7Jyc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mikepfeiffer.net/2012/01/generating-delivery-reports-and-tracking-messages-from-powershell/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.mikepfeiffer.net/2012/01/generating-delivery-reports-and-tracking-messages-from-powershell/</feedburner:origLink></item>
		<item>
		<title>How to Enable Lync 2010 Client Presence Status: Appear Offline</title>
		<link>http://feedproxy.google.com/~r/MikePfeiffer/~3/KmOwihQ6qLY/</link>
		<comments>http://www.mikepfeiffer.net/2012/01/how-to-enable-lync-2010-client-presence-status-appear-offline/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 17:48:44 +0000</pubDate>
		<dc:creator>Mike Pfeiffer</dc:creator>
				<category><![CDATA[Lync 2010]]></category>
		<category><![CDATA[Office 365]]></category>
		<category><![CDATA[Appear Offline]]></category>
		<category><![CDATA[Client]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Group Policy]]></category>
		<category><![CDATA[LMS]]></category>
		<category><![CDATA[Lync]]></category>
		<category><![CDATA[Lync Online]]></category>
		<category><![CDATA[Office365]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Registry]]></category>

		<guid isPermaLink="false">http://www.mikepfeiffer.net/?p=8806</guid>
		<description><![CDATA[One of the more common Lync 2010 client questions is: How do I enable "Appear Offline" status? For on-premises deployments, this can easily be controlled using the Lync Management Shell. There is an EnableAppearOffline setting that is controlled by in-band provisioning, which means configuration data is defined via a server-side policy, and downloaded by clients [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>One of the more common Lync 2010 client questions is: How do I enable "Appear Offline" status? For on-premises deployments, this can easily be controlled using the Lync Management Shell. There is an EnableAppearOffline setting that is controlled by in-band provisioning, which means configuration data is defined via a server-side policy, and downloaded by clients after sign-in. You can enable <em>appear offline</em> status for all of your clients by modifying each of your client policies with a simple Lync Management Shell one-liner:</p>
<pre>Get-CSClientPolicy | Set-CSClientPolicy -EnableAppearOffline $true</pre>
<p>Simple enough. Just restart the Lync client and you're all set.</p>
<h3>What about Lync Online Clients?</h3>
<p>If you're using Lync Online, this is a little more involved. Since there is no remote PowerShell interface for Lync Online, you can't change the client policies. You're only option is to fall back to modifying the registry on your client computers. Here is the reg add command you could use to script this:</p>
<pre>Reg Add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Communicator" /V "EnableAppearOffline" /D 1 /T REG_DWORD /F</pre>
<p>As you can see, this will create the HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Communicator key, and then add a 32bit DWORD value under this key called EnableAppearOffline with a value of 1. You could always add this to a custom ADM template and apply the setting via group policy, if that makes things easier.</p>
<p><img class="aligncenter size-full wp-image-3478;" style="margin-top:20px;" src="http://www.mikepfeiffer.net/wp-content/uploads/2012/01/appear_offline1_b.png" /></p>
<p>In either case, once the EnableAppearOffline setting has been enabled—after signing out and back into the Lync client—users will have the ability to select this option when setting their status, as shown above.</p>
<img src="http://feeds.feedburner.com/~r/MikePfeiffer/~4/KmOwihQ6qLY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mikepfeiffer.net/2012/01/how-to-enable-lync-2010-client-presence-status-appear-offline/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.mikepfeiffer.net/2012/01/how-to-enable-lync-2010-client-presence-status-appear-offline/</feedburner:origLink></item>
		<item>
		<title>Managing Exchange 2010 and Lync 2010 from a Single PowerShell Session</title>
		<link>http://feedproxy.google.com/~r/MikePfeiffer/~3/dLGBTZUxnag/</link>
		<comments>http://www.mikepfeiffer.net/2012/01/managing-exchange-2010-and-lync-2010-from-a-single-powershell-session/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 17:48:31 +0000</pubDate>
		<dc:creator>Mike Pfeiffer</dc:creator>
				<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Exchange Management Shell]]></category>
		<category><![CDATA[Lync 2010]]></category>
		<category><![CDATA[EMS]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[LMS]]></category>
		<category><![CDATA[Lync]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Remoting]]></category>

		<guid isPermaLink="false">http://www.mikepfeiffer.net/?p=6318</guid>
		<description><![CDATA[This is question I've been asked several times lately: How do I get the Exchange and Lync cmdlets loaded into the same shell? Well, with PowerShell v3 coming soon, this might not be an issue in the next wave of products thanks to the new auto loading modules feature. We'll see what happens. For now, [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>This is question I've been asked several times lately: How do I get the Exchange and Lync cmdlets loaded into the same shell? Well, with PowerShell v3 coming soon, this might not be an issue in the next wave of products thanks to the new auto loading modules feature. We'll see what happens. For now, there are a couple of options, but in both cases you'll probably want to setup a profile so it happens automatically when you start the shell. In this post I'll show you how to go about loading the cmdlets from a profile when the management tools are installed, and also how to use PowerShell remoting to load the cmdlets on workstations or servers that do not have the tools installed locally.</p>
<h3>Management tools installed locally</h3>
<p>If you have both the Exchange 2010 Management tools, as well as the Lync Server 2010 Management Tools installed on your workstation, add the following code to your PowerShell profile. If you don't have a profile setup, run <a href="http://technet.microsoft.com/en-us/library/dd315342.aspx">Get-Help about_Profiles</a> to learn how to create one. It's basically like a logon script for your PowerShell session. Here's the code you'd add to the profile:</p>
<pre class=PowerGuiCommand><span style="color: #008000;">#</span><span style="color: #008000;">Load the Exchange cmdlets</span><span style="color: #008000;">
</span><span style="color: #000000;">. </span><span style="color: #800000;">'</span><span style="color: #800000;">C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1</span><span style="color: #800000;">'</span><span style="color: #000000;">
Connect-ExchangeServer -auto

</span><span style="color: #008000;">#</span><span style="color: #008000;">Import the Lync module</span><span style="color: #008000;">
</span><span style="color: #5F9EA0; font-weight: bold;">Import-Module</span><span style="color: #000000;"> </span><span style="color: #800000;">Lync</span></pre>
<p>As you can see here, were importing (also known as dotting or dot-sourcing) the RemoteExchange.ps1 script that is installed along with the Exchange tools. This will import the Exchange 2010 cmdlets and load some Exchange specific functions into the shell—one of which is the Connect-ExchangeServer function that will automatically connect to an Exchange server in the local AD site. After that, the Lync module is imported with a simple one-liner.</p>
<h3>Remoting (management tools not installed)</h3>
<p>If you don't have the Exchange 2010 Manangement tools, or the Lync 2010 Management Tools installed on your workstation, you can still manage both products from the command line using PowerShell remoting. Use the following syntax when setting up your PowerShell profile, but remember to update the server names to match your own environment:</p>
<pre class=PowerGuiCommand><span style="color: #008000;">#</span><span style="color: #008000;">Load the Exchange cmdlets</span><span style="color: #008000;">
</span><span style="color: #800080;">$exch</span><span style="color: #000000;"> </span><span style="color: #FF0000;">=</span><span style="color: #000000;"> </span><span style="color: #5F9EA0; font-weight: bold;">New-PSSession</span><span style="color: #000000;"> </span><span style="color: #5F9EA0; font-style: italic;">-ConfigurationName</span><span style="color: #000000;"> </span><span style="color: #800000;">Microsoft.Exchange</span><span style="color: #000000;"> </span><span style="color: #5F9EA0; font-style: italic;">-ConnectionUri</span><span style="color: #000000;"> http://exchange1/powershell
</span><span style="color: #5F9EA0; font-weight: bold;">Import-PSSession</span><span style="color: #000000;"> </span><span style="color: #800080;">$exch</span><span style="color: #000000;">

</span><span style="color: #008000;">#</span><span style="color: #008000;">Import the Lync module</span><span style="color: #008000;">
</span><span style="color: #800080;">$lyncOptions</span><span style="color: #000000;"> </span><span style="color: #FF0000;">=</span><span style="color: #000000;"> </span><span style="color: #5F9EA0; font-weight: bold;">New-PSSessionOption</span><span style="color: #000000;"> </span><span style="color: #5F9EA0; font-style: italic;">-SkipRevocationCheck</span><span style="color: #000000;"> </span><span style="color: #5F9EA0; font-style: italic;">-SkipCACheck</span><span style="color: #000000;"> </span><span style="color: #5F9EA0; font-style: italic;">-SkipCNCheck</span><span style="color: #000000;">
</span><span style="color: #800080;">$lync</span><span style="color: #000000;"> </span><span style="color: #FF0000;">=</span><span style="color: #000000;"> </span><span style="color: #5F9EA0; font-weight: bold;">New-PSSession</span><span style="color: #000000;"> </span><span style="color: #5F9EA0; font-style: italic;">-ConnectionUri</span><span style="color: #000000;"> https://lync1/ocspowershell </span><span style="color: #5F9EA0; font-weight: bold;">`</span><span style="color: #000000;">
</span><span style="color: #5F9EA0; font-style: italic;">-SessionOption</span><span style="color: #000000;"> </span><span style="color: #800080;">$lyncOptions</span><span style="color: #000000;"> </span><span style="color: #5F9EA0; font-weight: bold;">`</span><span style="color: #000000;">
</span><span style="color: #5F9EA0; font-style: italic;">-Authentication</span><span style="color: #000000;"> </span><span style="color: #800000;">NegotiateWithImplicitCredential</span><span style="color: #000000;">

</span><span style="color: #5F9EA0; font-weight: bold;">Import-PSSession</span><span style="color: #000000;"> </span><span style="color: #800080;">$lync</span></pre>
<p>This code will import both the Exchange 2010 and Lync Server 2010 cmdlets into your shell session using implicit remoting. This code assumes you're using a domain account that has been assigned permissions in both Exchange and Lync, and your logged on Windows credentials will be used for authentication.</p>
<p>Also, notice that when importing the cmdlets from a Lync server, you need to specify an https end-point for the connection uri. This is because the OCSPowerShell virtual directory in IIS requires SSL. By default, this is secured with a self-signed certificate, so we've used a custom session options object to ignore SSL certificate validation.</p>
<h3>Making use of the Pipeline</h3>
<p> Now that you've got the cmdlets for both products loaded into a single session, you can work more efficiently. For example, you can kill two birds with one stone when it comes to mailbox-enabling and lync-enabling a user:</p>
<pre>Enable-Mailbox -Identity Bob |
  Select-Object -Expand Identity |
    Enable-CsUser -SipAddressType EmailAddress -RegistrarPool pool.uclabs.ms
</pre>
<p>The Enable-Mailbox cmdlet creates a mailbox for an existing Active Directory user, but also outputs the Identity of the user upon completion. This object can be sent down the pipeline to Enable-CsUser, which happens to accept input via the pipeline for the Identity parameter. So with a quick one-liner, you can setup a user with a mailbox and lync-enabled account. Piping New-Mailbox to Enable-Csuser would also work using the above syntax.</p>
<img src="http://feeds.feedburner.com/~r/MikePfeiffer/~4/dLGBTZUxnag" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mikepfeiffer.net/2012/01/managing-exchange-2010-and-lync-2010-from-a-single-powershell-session/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.mikepfeiffer.net/2012/01/managing-exchange-2010-and-lync-2010-from-a-single-powershell-session/</feedburner:origLink></item>
	</channel>
</rss>

