<?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>microsoftNOW &#187; PowerShell</title>
	<atom:link href="http://www.microsoftnow.com/tag/powershell/feed" rel="self" type="application/rss+xml" />
	<link>http://www.microsoftnow.com</link>
	<description></description>
	<lastBuildDate>Wed, 18 Jan 2012 05:17:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title>Games for Windows PowerShell!</title>
		<link>http://www.microsoftnow.com/2009/04/games-for-windows-powershell.html</link>
		<comments>http://www.microsoftnow.com/2009/04/games-for-windows-powershell.html#comments</comments>
		<pubDate>Sat, 04 Apr 2009 07:04:00 +0000</pubDate>
		<dc:creator>Shijaz Abdulla</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[humour]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://microsoftnow.com/2009/04/games-for-windows-powershell.html</guid>
		<description><![CDATA[April 4, 2009 You can now download your all-time favorite “Space Invaders”&#160; &#8212; for Windows PowerShell!! Even though a completely inappropriate, yet creative use of PowerShell, Space Invader brings back the old memories. Complete with sounds and MS-DOS style graphics. Download Space Invaders from SoapyFrog.]]></description>
			<content:encoded><![CDATA[<div class='wb_fb_top'><div style="float:right;"></div></div>
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.microsoftnow.com%252F2009%252F04%252Fgames-for-windows-powershell.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Games%20for%20Windows%20PowerShell%21%22%20%7D);"></div>
<p><font color="#808080">April 4, 2009</font></p>
<p>You can now download your all-time favorite “Space Invaders”&#160; &#8212; for Windows PowerShell!!</p>
<p>Even though a completely inappropriate, yet creative use of PowerShell, Space Invader brings back the old memories. Complete with sounds and MS-DOS style graphics. <img src='http://www.microsoftnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Download Space Invaders from <a title="http://ps1.soapyfrog.com/2007/01/02/space-invaders/" href="http://ps1.soapyfrog.com/2007/01/02/space-invaders/">SoapyFrog.</a></p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://ps1.soapyfrog.com/assets/play-screen.gif" /></p>

]]></content:encoded>
			<wfw:commentRss>http://www.microsoftnow.com/2009/04/games-for-windows-powershell.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Removing leading/trailing white spaces from displayName using PowerShell</title>
		<link>http://www.microsoftnow.com/2008/11/removing-leadingtrailing-white-spaces.html</link>
		<comments>http://www.microsoftnow.com/2008/11/removing-leadingtrailing-white-spaces.html#comments</comments>
		<pubDate>Fri, 14 Nov 2008 03:09:00 +0000</pubDate>
		<dc:creator>Shijaz Abdulla</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Exchange 2003]]></category>
		<category><![CDATA[Exchange Server 2007]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://microsoftnow.com/2008/11/removing-leadingtrailing-white-spaces-from-displayname-using-powershell.html</guid>
		<description><![CDATA[I am moving thousands of Exchange 2003 mailboxes to Exchange Server 2007 over this weekend. Most of these are student mailboxes which have been provisioned using another third party system. Due to a minor bug, the third party system added a trailing space to every student&#8217;s display name. A trailing space is a whitespace at [...]]]></description>
			<content:encoded><![CDATA[<div class='wb_fb_top'><div style="float:right;"></div></div>
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.microsoftnow.com%252F2008%252F11%252Fremoving-leadingtrailing-white-spaces.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Removing%20leading%2Ftrailing%20white%20spaces%20from%20displayName%20using%20PowerShell%22%20%7D);"></div>
<p>I am moving thousands of Exchange 2003 mailboxes to Exchange Server 2007 over this weekend. Most of these are student mailboxes which have been provisioned using another third party system. Due to a minor bug, the third party system added a trailing space to every student&#8217;s display name. </p>
<p>A trailing space is a whitespace at the end of the <strong>displayName</strong> string. This may look like a very small issue, but unfortunately Exchange Server 2007 is very fussy about such things:</p>
<p align="center"><a href="http://lh6.ggpht.com/_lSGuEfogrPw/SRzr7d38ECI/AAAAAAAAA5M/z5Sc87AlabU/s1600-h/image%5B12%5D.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="119" alt="image" src="http://lh4.ggpht.com/_lSGuEfogrPw/SRzr8jNNSuI/AAAAAAAAA5Q/uQh23Xv0WwI/image_thumb%5B6%5D.png?imgmax=800" width="504" border="0" /></a>&#160; <br /><em><font size="1">The DisplayName property contains leading or trailing whitespace, which must be removed.</font></em></p>
<p><a href="http://lh3.ggpht.com/_lSGuEfogrPw/SRzstCQu9dI/AAAAAAAAA5U/Wnut_7GRJbQ/s1600-h/image%5B17%5D.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="441" alt="image" src="http://lh4.ggpht.com/_lSGuEfogrPw/SRzs5H27Y_I/AAAAAAAAA5Y/j6gVHRJAO88/image_thumb%5B9%5D.png?imgmax=800" width="504" border="0" /></a>     <br /><font size="1"><em>More of that&#8230; (ouch!) </em></font></p>
<p>Exchange 2007 would not let me move these mailboxes across from Exchange 2003 unless I correct the DisplayName property for all the mailboxes.</p>
<p>I have several thousands of mailboxes having an &#8216;inconsistent&#8217; display name. Correcting each of these manually would have been a frustrating exercise &#8211; so I decided to coin my own PowerShell command to remove leading/trailing spaces from all mailboxes in a given mailbox database. <img alt="Nerd" src="http://messenger.msn.com/MMM2006-04-19_17.00/Resource/emoticons/49_49.gif" /></p>
<p><strong>get-mailbox -Database &#8216;SERVER\MailStore&#8217; -ResultSize 4850 | Foreach { Set-Mailbox -Identity $_.Identity -DisplayName $_.DisplayName.Trim() }</strong></p>
<p>where <strong>SERVER</strong> is the Exchange 2003 server hosting the mailboxes you want to modify, <strong>MailStore</strong> is the Mailbox store on that server containing those mailboxes. I set the <strong>ResultSize </strong>to 4850 because I have more than 4000 mailboxes and by default the get-mailbox command fetches only 1000.</p>

]]></content:encoded>
			<wfw:commentRss>http://www.microsoftnow.com/2008/11/removing-leadingtrailing-white-spaces.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Source PowerShell</title>
		<link>http://www.microsoftnow.com/2008/04/open-source-powershell.html</link>
		<comments>http://www.microsoftnow.com/2008/04/open-source-powershell.html#comments</comments>
		<pubDate>Fri, 11 Apr 2008 12:36:00 +0000</pubDate>
		<dc:creator>Shijaz Abdulla</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://microsoftnow.com/2008/04/open-source-powershell.html</guid>
		<description><![CDATA[PowerShell goes beyond Windows. PASH is the open source re-implementation of PowerShell for non-Windows operating systems like Solaris, Linux, Mac, etc and even Windows Mobile. According to the site: The main goal is to provide a rich shell environment for other operating systems as well as to provide a hostable scripting engine for rich applications. [...]]]></description>
			<content:encoded><![CDATA[<div class='wb_fb_top'><div style="float:right;"></div></div>
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.microsoftnow.com%252F2008%252F04%252Fopen-source-powershell.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Open%20Source%20PowerShell%22%20%7D);"></div>
<p>PowerShell goes beyond Windows.</p>
<p>PASH is the open source re-implementation of PowerShell for non-Windows operating systems like Solaris, Linux, Mac, etc and even Windows Mobile.</p>
<p>According to the site:<br />
<blockquote>
<p>The main goal is to provide a rich shell environment for other operating systems as well as to provide a hostable scripting engine for rich applications. The user experience should be seamless for people who are used to Windows version of PowerShell. The scrips, cmdlets and providers should runs AS-IS (if they are not using Windows-specific functionality). The rich applications that host PowerShell should run on any other operating system AS-IS. Secondary goal: the scripts should run across the machines and different OS&#8217;s seamlessly.</p>
</blockquote>
<p>Check out <a href="http://pash.sourceforge.net/">PASH at Sourceforge</a>.</p>
<p>Pash running on Linux:<br /><a href="http://pash.sourceforge.net/images/linux_suse.png"><img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://pash.sourceforge.net/images/linux_suse.png" border="0" /></a></p>

]]></content:encoded>
			<wfw:commentRss>http://www.microsoftnow.com/2008/04/open-source-powershell.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading address lists created in Exchange Server 2003</title>
		<link>http://www.microsoftnow.com/2008/01/upgrading-address-lists-created-in.html</link>
		<comments>http://www.microsoftnow.com/2008/01/upgrading-address-lists-created-in.html#comments</comments>
		<pubDate>Tue, 29 Jan 2008 13:22:00 +0000</pubDate>
		<dc:creator>Shijaz Abdulla</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Address Lists]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[Exchange 2003]]></category>
		<category><![CDATA[Exchange Server 2007]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://microsoftnow.com/2008/01/upgrading-address-lists-created-in-exchange-server-2003.html</guid>
		<description><![CDATA[EHLO again. Hope you enjoyed my previous post that explains how to upgrade Exchange 2003 recipient policies for use with Exchange Server 2007. This post deals with the &#8220;art and science&#8221; of upgrading Exchange 2003 Address Lists to its Exchange Server 2007 form. I say &#8220;art and science&#8221; because it can be a little tricky [...]]]></description>
			<content:encoded><![CDATA[<div class='wb_fb_top'><div style="float:right;"></div></div>
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.microsoftnow.com%252F2008%252F01%252Fupgrading-address-lists-created-in.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Upgrading%20address%20lists%20created%20in%20Exchange%20Server%202003%22%20%7D);"></div>
<p>EHLO again.</p>
<p>Hope you enjoyed my <a href="http://blog.shijaz.com/2008/01/upgrading-recipient-policies-created-in.html">previous post </a>that explains how to upgrade Exchange 2003 recipient policies for use with Exchange Server 2007.</p>
<p>This post deals with the &#8220;art and science&#8221; of upgrading Exchange 2003 Address Lists to its Exchange Server 2007 form. I say &#8220;art and science&#8221; because it can be a little tricky to understand for those who havent worked much on Powershell or any scripting/coding environment.</p>
<p>If you click on an address list created by Exchange 2003 in the Exchange Management Console, you will receive the following error:</p>
<p><span style="font-family:courier new;font-size:85%;"><strong>Unable to edit the specified E-mail address policy. E-mail address policies created with legacy versions of exchange must be upgraded using the &#8216;Set-EmailAddressPolicy&#8217; task, with the Exchange 2007 Recipient Filter specified. specified.</strong></span></p>
<p>Exchange 2003 Address Lists have a recipient filter that is made up of an LDAP filter. Exchange Server 2007, on the other hand, understands only OPATH filters. The trick is to convert the LDAP filter to an OPATH filter, and this needs to be done manually.</p>
<p>I&#8217;m going to explain this with the help of an example. Lets open an Address List in Exchange 2003 System Manager and examine the LDAP filter:</p>
<p><span style="font-family:courier new;font-size:85%;">(&amp; (&amp; (&amp; (mailnickname=*) ( (&amp; (objectCategory=person) (objectClass=user) (homeMDB=CN=Mega MailStore (EXCH01),CN=SG01,CN=InformationStore,CN=EXCH01,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=<orgname>,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=mydomain,DC=com) ) ) ) ))</span></p>
<p>To refresh our brains, this LDAP filter basically creates an Address list out of all users that have a mailbox in the &#8216;Mega MailStore&#8217; mailbox store on EXCH01 server.</p>
<p>Before we convert this LDAP to OPATH, lets write this in a better way:</p>
<p><span style="font-family:courier new;font-size:85%;"><strong>(&amp;<br />(&amp;<br />(&amp;<br />(mailnickname=*)<br />( (&amp;<br />(objectCategory=person)<br />(objectClass=user)<br />(homeMDB=CN=Mega MailStore (EXCH01),CN=SG01,CN=InformationStore,CN=EXCH01,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=<orgname>,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=mydomain,DC=com)<br />) )<br />)<br />)<br />)<br /></strong></span><br />Now, carefully change all ampersands (<strong>&amp;</strong>) to an <strong>-and</strong>. The ampersands are placed in a prefix fashion in LDAP filter, but in OPATH, its much simpler &#8211; you place <strong>-and</strong> <em>between</em> the two parameters. Similarly, change all equal signs (<strong>=</strong>) to <strong>-eq</strong>.</p>
<p><span style="font-family:courier new;font-size:85%;"><strong>(RecipientType -eq &#8216;UserMailbox&#8217;) </strong></span><br /><span style="font-family:courier new;font-size:85%;"><strong>-and </strong></span><br /><span style="font-family:courier new;font-size:85%;"><strong>(Database -eq &#8216;CN=Mega MailStore (EXCH01),CN=SG01,CN=InformationStore,CN=EXCH01,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=mydomain,DC=com&#8217;)</strong></span></p>
<p>Notice that I have also replaced the property &#8216;homeMDB&#8217; with &#8216;Database&#8217;. This kind of change is required to convert LDAP property names to OPATH. You can get a <a href="http://technet.microsoft.com/en-us/library/bb430771(EXCHG.80).aspx">complete list of properties</a> here.</p>
<p>So, I arrive at my full command:</p>
<p><span style="font-family:courier new;font-size:85%;"><strong>Set-AddressList &#8220;Mega users&#8221; -RecipientFilter { (RecipientType -eq &#8216;UserMailbox&#8217;) -and (Database -eq &#8216;CN=Mega MailStore (EXCH01),CN=SG01,CN=InformationStore,CN=EXCH01,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=mydomain,DC=com&#8217;) }</strong></span><br /><strong><span style="font-family:Courier New;font-size:85%;"></span></strong><br /><span style="font-size:0;">The guys at Microsoft Exchange Team have more to say about <a href="http://msexchangeteam.com/archive/2007/01/10/432143.aspx">conversion from LDAP to OPATH</a>, and is worth a peek.</span></p>

]]></content:encoded>
			<wfw:commentRss>http://www.microsoftnow.com/2008/01/upgrading-address-lists-created-in.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

