<?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>Isaac&#039;s Blog &#187; Free Help</title>
	<atom:link href="http://blog.isaacblum.com/category/free-help/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.isaacblum.com</link>
	<description>So Many Rambles So Little Time....</description>
	<lastBuildDate>Fri, 14 May 2010 20:26:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>MOSS MA not found</title>
		<link>http://blog.isaacblum.com/2010/05/14/moss-ma-not-found/</link>
		<comments>http://blog.isaacblum.com/2010/05/14/moss-ma-not-found/#comments</comments>
		<pubDate>Fri, 14 May 2010 20:26:09 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Forefront Identity Management Service]]></category>
		<category><![CDATA[MOSS MA not found]]></category>
		<category><![CDATA[Synchronization Connections]]></category>
		<category><![CDATA[User Profile Synchronization]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=394</guid>
		<description><![CDATA[When adding a new &#8220;Synchronization Connections&#8221; I received MOSS MA not found error. Workaround : Forefront Identity Management Service was not running. Start service. If you get another error then is is not your fix.]]></description>
			<content:encoded><![CDATA[<p>When adding a new &#8220;Synchronization Connections&#8221; I received MOSS MA not found error.</p>
<p>Workaround : Forefront Identity Management Service was not running. Start service. If you get another error then is is not your fix.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.isaacblum.com%2F2010%2F05%2F14%2Fmoss-ma-not-found%2F&amp;linkname=MOSS%20MA%20not%20found"><img src="http://blog.isaacblum.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/05/14/moss-ma-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Social Sites / SharePoint 2010</title>
		<link>http://blog.isaacblum.com/2010/05/12/social-sites-sharepoint-2010/</link>
		<comments>http://blog.isaacblum.com/2010/05/12/social-sites-sharepoint-2010/#comments</comments>
		<pubDate>Wed, 12 May 2010 17:25:19 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[NewsGator]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint 2010 Foundation]]></category>
		<category><![CDATA[Social Sites]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=392</guid>
		<description><![CDATA[NewsGator already implementing customers on 2010. We’re next! http://bit.ly/coiRvI Proud to be a SharePoint 2010/NewsGator Social Sites 2010 early adopter! #NewsGator #sharepoint http://bit.ly/coiRvI We&#8217;ve already been blazing the social computing trail with #SharePoint 2010 and early help from #NewsGatorhttp://bit.ly/coiRvI We got an early jump on SharePoint 2010 with a little help from our friends at #NewsGator [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>NewsGator already implementing customers on 2010. We’re next! <a href="http://bit.ly/coiRvI">http://bit.ly/coiRvI</a></li>
<li>Proud to be a SharePoint 2010/NewsGator Social Sites 2010 early adopter! #NewsGator #sharepoint <a href="http://bit.ly/coiRvI">http://bit.ly/coiRvI</a></li>
<li>We&#8217;ve already been blazing the social computing trail with #SharePoint 2010 and early help from #NewsGator<a href="http://bit.ly/coiRvI">http://bit.ly/coiRvI</a></li>
<li>We got an early jump on SharePoint 2010 with a little help from our friends at #NewsGator &#8211; social success! <a href="http://bit.ly/coiRvI">http://bit.ly/coiRvI</a></li>
<li>Happy #SharePoint 2010 launch, thanks #NewsGator for early help with our implementation <a href="http://bit.ly/coiRvI">http://bit.ly/coiRvI</a></li>
<li>Staying ahead of our competitors with social ROI thanks to #NewsGator innovations on #SharePoint 2010 <a href="http://bit.ly/coiRvI">http://bit.ly/coiRvI</a></li>
<li>Our #SharePoint 2010 collaboration with #NewsGator is a great example of social at work <a href="http://bit.ly/coiRvI">http://bit.ly/coiRvI</a></li>
<li>We got a jump on social #SharePoint by working with our good friends at #NewsGator – congrats on launch #Microsoft! <a href="http://bit.ly/coiRvI">http://bit.ly/coiRvI</a></li>
</ul>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.isaacblum.com%2F2010%2F05%2F12%2Fsocial-sites-sharepoint-2010%2F&amp;linkname=Social%20Sites%20%2F%20SharePoint%202010"><img src="http://blog.isaacblum.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/05/12/social-sites-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable Wireless, Server 2008 R2, rtl8191se</title>
		<link>http://blog.isaacblum.com/2010/04/12/enable-wireless-server-2008-r2-rtl8191se/</link>
		<comments>http://blog.isaacblum.com/2010/04/12/enable-wireless-server-2008-r2-rtl8191se/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 22:56:49 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Windows Server 2008]]></category>
		<category><![CDATA[Windows Server 2008 R2]]></category>
		<category><![CDATA[A505-S6999]]></category>
		<category><![CDATA[R2]]></category>
		<category><![CDATA[rtl8191se]]></category>
		<category><![CDATA[Server 2008]]></category>
		<category><![CDATA[Server 2008 R2]]></category>
		<category><![CDATA[The service section in the inf invalid]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=386</guid>
		<description><![CDATA[So this all started when I wanted to enable my wireless adapter. I found the Latest driver(rtl8191se).  But everytime I tried to  install the driver i got this error: &#8220;The service section in the inf invalid&#8221; . Of course this was driving me crazy&#8230;. I spent at least an hour looking through an INF file to see [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>So this all started when I wanted to enable my wireless adapter. I found the <a title="Latest Driver" href="http://www.realtek.com.tw/DOWNLOADS/downloadsView.aspx?Langid=1&amp;PNid=21&amp;PFid=48&amp;Level=5&amp;Conn=4&amp;DownTypeID=3&amp;GetDown=false&amp;Downloads=true" target="_blank">Latest driver</a>(rtl8191se).  But everytime I tried to  install the driver i got this error: &#8220;The service section in the inf invalid&#8221; . Of course this was driving me crazy&#8230;. I spent at least an hour looking through an INF file to see if i could figure out what the problem was.  Anyway long story short see below.</p>
<p>The walkthrough below is not from me. <a title="Link" href="http://www.mydigitallife.info/2009/08/24/enable-wireless-wi-fi-in-windows-server-2008-r2-to-fix-no-connections-available-error/" target="_blank">Link</a></p>
<p>After installing <a href="http://www.tipandtrick.net/2008/windows-server-2008-official-direct-download-links/">Windows Server 2008</a> or <a href="http://www.mydigitallife.info/2009/08/18/free-windows-server-2008-r2-evaluation-180-days-installation-iso-and-vhd-for-hyper-v-official-direct-download-links/">Windows Server 2008 R2</a>, the wireless adapter or <a id="KonaLink0" onclick="adlinkMouseClick(event,this,0);" onmouseover="adlinkMouseOver(event,this,0);" onmouseout="adlinkMouseOut(event,this,0);" href="#" target="_top"><span style="color: blue;">WiFi</span></a> adapter is not working or functioning. <a id="KonaLink1" onclick="adlinkMouseClick(event,this,1);" onmouseover="adlinkMouseOver(event,this,1);" onmouseout="adlinkMouseOut(event,this,1);" href="#" target="_top"><span style="color: blue;">System</span></a> cannot detect or see any wireless networks with no wireless networks available error message, and system cannot <a id="KonaLink2" onclick="adlinkMouseClick(event,this,2);" onmouseover="adlinkMouseOver(event,this,2);" onmouseout="adlinkMouseOut(event,this,2);" href="#" target="_top"><span style="color: blue;">connect</span></a> to Internet or wireless LAN.</p>
<p>To make matter worse, users have installed the proper signed driver for the wireless adapter, either through <a id="KonaLink3" onclick="adlinkMouseClick(event,this,3);" onmouseover="adlinkMouseOver(event,this,3);" onmouseout="adlinkMouseOut(event,this,3);" href="#" target="_top"><span style="color: blue;">Windows Update</span></a>, drivers CD from vendor or download latest and correct driver from OEM or manufacturer’s website. In Device Manager, the wireless or WiFi <a id="KonaLink4" onclick="adlinkMouseClick(event,this,4);" onmouseover="adlinkMouseOver(event,this,4);" onmouseout="adlinkMouseOut(event,this,4);" href="#" target="_top"><span style="color: blue;">network adapter</span></a> is working properly. And, when using <a id="KonaLink5" onclick="adlinkMouseClick(event,this,5);" onmouseover="adlinkMouseOver(event,this,5);" onmouseout="adlinkMouseOut(event,this,5);" href="#" target="_top"><span style="color: blue;">Windows Server</span></a> built-in diagnostics feature to troubleshoot the no wireless connection problem, it indicates that the wireless adapter is either having driver or <a id="KonaLink6" onclick="adlinkMouseClick(event,this,6);" onmouseover="adlinkMouseOver(event,this,6);" onmouseout="adlinkMouseOut(event,this,6);" href="#" target="_top"><span style="color: blue;">hardware</span></a> issue.</p>
<p>The cause of the no wireless connection is that <a id="KonaLink7" onclick="adlinkMouseClick(event,this,7);" onmouseover="adlinkMouseOver(event,this,7);" onmouseout="adlinkMouseOut(event,this,7);" href="#" target="_top"><span style="color: blue;">Windows Server 2008</span></a> and Windows Server 2008 R2 disables and turns off Wireless LAN service by default, which supports the wireless WLAN Auto Configuration service, and configures WLAN AutoConfig for automatic startup.</p>
<p>In order to turn on Wireless LAN and WLAN AutoConfig service in Windows Server 2008 and Windows Server 2008 R2, go to <strong>Server Manager</strong> (in <strong>Administrator Tools</strong>). Go to <strong>Features</strong> branch and click on <strong>Add Features</strong>. Click and tick the check box for <strong>Wireless LAN Service</strong>. Complete the installation wizard to install wireless support.</p>
<p>The Wireless LAN Service configures the WLAN AutoConfig service to start automatically, regardless of whether the <a id="KonaLink8" onclick="adlinkMouseClick(event,this,8);" onmouseover="adlinkMouseOver(event,this,8);" onmouseout="adlinkMouseOut(event,this,8);" href="#" target="_top"><span style="color: blue;">computer</span></a> has any IEEE 802.11 wireless adapters installed. When enabled, WLAN AutoConfig enumerates every <a id="KonaLink9" onclick="adlinkMouseClick(event,this,9);" onmouseover="adlinkMouseOver(event,this,9);" onmouseout="adlinkMouseOut(event,this,9);" href="#" target="_top"><span style="color: blue;">wireless network adapter</span></a> installed on the computer, manages IEEE 802.11 wireless connections, and manages the wireless connection profiles that contain the settings required to configure a wireless client to connect to a <a id="KonaLink10" onclick="adlinkMouseClick(event,this,10);" onmouseover="adlinkMouseOver(event,this,10);" onmouseout="adlinkMouseOut(event,this,10);" href="#" target="_top"><span style="color: blue;">wireless network</span></a>. WLAN AutoConfig allows user to connect to an existing wireless network (data encryption key or network key may be required), change wireless network connection settings, configure a connection to a new wireless network, and specify preferred wireless networks. WLAN AutoCofig also notifies user when new wireless networks are available. When switching wireless networks, WLAN AutoConfig dynamically updates your wireless network adapter settings to match the settings of that new network and a network connection attempt will be made.</p>
</div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.isaacblum.com%2F2010%2F04%2F12%2Fenable-wireless-server-2008-r2-rtl8191se%2F&amp;linkname=Enable%20Wireless%2C%20Server%202008%20R2%2C%20rtl8191se"><img src="http://blog.isaacblum.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/04/12/enable-wireless-server-2008-r2-rtl8191se/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run HyperV on Windows 7</title>
		<link>http://blog.isaacblum.com/2010/02/19/run-hyperv-on-windows-7/</link>
		<comments>http://blog.isaacblum.com/2010/02/19/run-hyperv-on-windows-7/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 20:55:12 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Conference's]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[HyperV]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=317</guid>
		<description><![CDATA[http://www.microsoft.com/downloads/details.aspx?FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d&#38;displaylang=en To install the Administration Tools pack by using the Windows interface Download the Administration Tools package from the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkID=137379). Open the folder into which the package downloaded, double-click the package to unpack the files, and then start the Remote Server Administration Tools Setup Wizard. Note   You must accept the License [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d&amp;displaylang=en</a></p>
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td><strong>To install the Administration Tools pack by using the Windows interface</strong></td>
</tr>
</tbody>
</table>
<ol>
<li>Download the Administration Tools package from the <a href="http://go.microsoft.com/fwlink/?LinkID=137379" target="_blank">Microsoft Web site</a> (http://go.microsoft.com/fwlink/?LinkID=137379).</li>
<li>Open the folder into which the package downloaded, double-click the package to unpack the files, and then start the Remote Server Administration Tools Setup Wizard.<br />
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td><img src="mk:@MSITStore:C:\Windows\help\mui\0409\rsat_client.chm::/local/Note.gif" alt="" /></td>
<td>Note</td>
</tr>
<tr>
<td> </td>
<td>You must accept the License Terms and Limited Warranty to install Administration Tools.</td>
</tr>
</tbody>
</table>
</li>
<li>Complete all the steps that are required by the wizard, and then click <strong>Finish</strong> to exit the wizard when installation is completed.</li>
<li>Click <strong>Start</strong>, click <strong>Control Panel</strong>, and then click <strong>Programs</strong>.</li>
<li>In the <strong>Programs and Features</strong> area, click <strong>Turn Windows features on or off</strong>.
<p>If you are prompted by User Account Control to allow the Windows Features dialog box to open, click <strong>Continue</strong>.</li>
<li>In the <strong>Windows Features</strong> dialog box, expand <strong>Remote Server Administration Tools</strong>.</li>
<li>Select the remote management tools that you want to install, and then click <strong>OK</strong>.</li>
<li>Configure the <strong>Start</strong> menu to display the <strong>Administration Tools</strong> shortcut, if it is not already there.
<ol>
<li>Right-click <strong>Start</strong>, and then click <strong>Properties</strong>.</li>
<li>On the <strong>Start Menu</strong> tab, click <strong>Customize</strong>.</li>
<li>In the <strong>Customize Start Menu</strong> dialog box, scroll down to <strong>System Administrative Tools</strong>, and then select <strong>Display on the All Programs menu and the Start menu</strong>. Click <strong>OK</strong>.
<p>Shortcuts for snap-ins installed by Remote Server Administration Tools for Windows 7 are added to the <strong>Administrative Tools</strong> list on the <strong>Start</strong> menu.</li>
</ol>
</li>
</ol>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.isaacblum.com%2F2010%2F02%2F19%2Frun-hyperv-on-windows-7%2F&amp;linkname=Run%20HyperV%20on%20Windows%207"><img src="http://blog.isaacblum.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/02/19/run-hyperv-on-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To get and store the credential for the current user</title>
		<link>http://blog.isaacblum.com/2010/02/18/to-get-and-store-the-credential-for-the-current-user/</link>
		<comments>http://blog.isaacblum.com/2010/02/18/to-get-and-store-the-credential-for-the-current-user/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 19:11:09 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[-AsSecureString]]></category>
		<category><![CDATA[ConvertTo-SecureString]]></category>
		<category><![CDATA[get-content]]></category>
		<category><![CDATA[new-object]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=300</guid>
		<description><![CDATA[Thank sean. 1 2 $notespw = Read-Host &#34;Enter the password for the Notes ID file&#34; -AsSecureString $notespw &#124; ConvertFrom-SecureString &#124; Set-Content $pwfile -force To retrieve the password and create the PSCredential object: 1 2 $notespw = get-content $pwfile &#124; ConvertTo-SecureString $notesid = new-object -typename system.management.automation.pscredential -argumentlist &#34;-default-&#34;,$notespw Example of use: 1 Get-DominoMailbox mary@contoso.com -SourceCredential $notesid]]></description>
			<content:encoded><![CDATA[<p><a href="http://diginomicon.net/">Thank sean.</a></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$notespw</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Read-Host</span> <span style="color: #800000;">&quot;Enter the password for the Notes ID file&quot;</span> <span style="color: #008080; font-style: italic;">-AsSecureString</span>
<span style="color: #800080;">$notespw</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">ConvertFrom-SecureString</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Set-Content</span> <span style="color: #800080;">$pwfile</span> <span style="color: #008080; font-style: italic;">-force</span></pre></td></tr></table></div>

<p>To retrieve the password and create the PSCredential object:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$notespw</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">get-content</span> <span style="color: #800080;">$pwfile</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">ConvertTo-SecureString</span>
<span style="color: #800080;">$notesid</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">new-object</span> <span style="color: #008080; font-style: italic;">-typename</span> system.management.automation.pscredential <span style="color: #008080; font-style: italic;">-argumentlist</span> <span style="color: #800000;">&quot;-default-&quot;</span><span style="color: pink;">,</span>$notespw</pre></td></tr></table></div>

<p>Example of use:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;">Get<span style="color: pink;">-</span>DominoMailbox mary<span style="color: pink;">@</span>contoso.com <span style="color: pink;">-</span>SourceCredential $notesid</pre></td></tr></table></div>

<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.isaacblum.com%2F2010%2F02%2F18%2Fto-get-and-store-the-credential-for-the-current-user%2F&amp;linkname=To%20get%20and%20store%20the%20credential%20for%20the%20current%20user"><img src="http://blog.isaacblum.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/02/18/to-get-and-store-the-credential-for-the-current-user/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ec2 Links</title>
		<link>http://blog.isaacblum.com/2010/02/18/ec2-links/</link>
		<comments>http://blog.isaacblum.com/2010/02/18/ec2-links/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 19:05:54 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Ec2]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[AMI]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=297</guid>
		<description><![CDATA[You will used this for help in setting up and using the api tools for windows. P.S. in no particular order. http://docs.amazonwebservices.com/AWSEC2/2007-08-29/GettingStartedGuide/setting-up-your-tools.html http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1767 http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351 http://serktools.com/2009/05/19/setting-up-ec2-command-line-tools-on-windows/]]></description>
			<content:encoded><![CDATA[<p>You will used this for help in setting up and using the api tools for windows. P.S. in no particular order.</p>
<p><a href="http://docs.amazonwebservices.com/AWSEC2/2007-08-29/GettingStartedGuide/setting-up-your-tools.html">http://docs.amazonwebservices.com/AWSEC2/2007-08-29/GettingStartedGuide/setting-up-your-tools.html</a></p>
<p><a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1767">http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1767</a></p>
<p><a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351">http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351</a></p>
<p><a href="http://serktools.com/2009/05/19/setting-up-ec2-command-line-tools-on-windows/">http://serktools.com/2009/05/19/setting-up-ec2-command-line-tools-on-windows/</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.isaacblum.com%2F2010%2F02%2F18%2Fec2-links%2F&amp;linkname=Ec2%20Links"><img src="http://blog.isaacblum.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/02/18/ec2-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powershell Version of CMD SET</title>
		<link>http://blog.isaacblum.com/2010/02/18/powershell-version-of-cmd-set/</link>
		<comments>http://blog.isaacblum.com/2010/02/18/powershell-version-of-cmd-set/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 18:58:14 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=291</guid>
		<description><![CDATA[Thank you wes If you are like me and are just so used to typing set to list and set environment variables then you might find this script useful. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 if &#40;test-path alias:set&#41; &#123; remove-item alias:set [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://weblogs.asp.net/whaggard/archive/2007/02/08/powershell-version-of-cmd-set.aspx"> Thank you wes </a></p>
<p>If you are like me and are just so used to typing set to list and set environment variables then you might find this script useful.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">test-path</span> alias:<span style="color: #008080; font-weight: bold;">set</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #008080; font-weight: bold;">remove-item</span> alias:<span style="color: #008080; font-weight: bold;">set</span> <span style="color: pink;">&gt;</span> <span style="color: #800080;">$null</span> <span style="color: #000000;">&#125;</span>
<span style="color: #0000FF;">function</span> <span style="color: #008080; font-weight: bold;">set</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span><span style="color: #800080;">$var</span> <span style="color: pink;">=</span> <span style="color: #000080;">$args</span>
	<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$var</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800000;">&quot;&quot;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #008080; font-weight: bold;">get-childitem</span> env: <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">sort-object</span> name
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0000FF;">else</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$var</span> <span style="color: #FF0000;">-match</span> <span style="color: #800000;">&quot;^(\S*?)\s*=\s*(.*)$&quot;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #008080; font-weight: bold;">set-item</span> <span style="color: #008080; font-style: italic;">-force</span> <span style="color: #008080; font-style: italic;">-path</span> <span style="color: #800000;">&quot;env:$($matches[1])&quot;</span> <span style="color: #008080; font-style: italic;">-value</span> <span style="color: #800080;">$matches</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>;		
		<span style="color: #000000;">&#125;</span>
		<span style="color: #0000FF;">else</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #008080; font-weight: bold;">write-error</span> <span style="color: #800000;">&quot;ERROR Usage: VAR=VALUE&quot;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>	
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.isaacblum.com%2F2010%2F02%2F18%2Fpowershell-version-of-cmd-set%2F&amp;linkname=Powershell%20Version%20of%20CMD%20SET"><img src="http://blog.isaacblum.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/02/18/powershell-version-of-cmd-set/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nice Machine key Generator</title>
		<link>http://blog.isaacblum.com/2010/02/18/nice-machine-key-generator/</link>
		<comments>http://blog.isaacblum.com/2010/02/18/nice-machine-key-generator/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 18:56:11 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[Generator]]></category>
		<category><![CDATA[Machine key]]></category>
		<category><![CDATA[machinekey]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=289</guid>
		<description><![CDATA[http://www.orcsweb.com/articles/aspnetmachinekey.aspx]]></description>
			<content:encoded><![CDATA[<p>http://www.orcsweb.com/articles/aspnetmachinekey.aspx</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.isaacblum.com%2F2010%2F02%2F18%2Fnice-machine-key-generator%2F&amp;linkname=Nice%20Machine%20key%20Generator"><img src="http://blog.isaacblum.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/02/18/nice-machine-key-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell Multithreading &#8211; OMG!!</title>
		<link>http://blog.isaacblum.com/2010/01/22/powershell-multithreading-omg/</link>
		<comments>http://blog.isaacblum.com/2010/01/22/powershell-multithreading-omg/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 18:43:23 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[get-job]]></category>
		<category><![CDATA[get-job | stop-job]]></category>
		<category><![CDATA[get-job | wait-job]]></category>
		<category><![CDATA[Multithreading]]></category>
		<category><![CDATA[OMG]]></category>
		<category><![CDATA[start-job]]></category>
		<category><![CDATA[start-job -filepath]]></category>
		<category><![CDATA[stop-job]]></category>
		<category><![CDATA[threading]]></category>
		<category><![CDATA[wait-job]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=268</guid>
		<description><![CDATA[This is an example of a very simple multi thread script. All it does is output 2 user names per function. But you can only imagine the power. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 [...]]]></description>
			<content:encoded><![CDATA[<p>This is an example of a very simple multi thread script. All it does is output 2 user names per function.<br />
But you can only imagine the power.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;">#Create a function, or in this example create/split up a large job into multiple functions.</span>
&nbsp;
<span style="color: #008000;">#Step 1 : Create threading.ps1</span>
<span style="color: #008000;">#Step 2 : Create function and add it to threading.ps1</span>
&nbsp;
<span style="color: #008000;">#(Sample Function)</span>
&nbsp;
<span style="color: #0000FF;">function</span> one<span style="color: #000000;">&#123;</span>
	<span style="color: #800080;">$users1</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;CORP1\Bollasr1&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;CORP2\aardeje1&quot;</span>
		<span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$u</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$users1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
			<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">&quot;$u&quot;</span>
		<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
one <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-File</span> C:\lnl\oneresults.txt
&nbsp;
&nbsp;
<span style="color: #008000;">#Step 3 : Wrap the function inside a function with (Write-Output ' ')  around each line. </span>
<span style="color: #008000;">#(Sample Wrapped Function)</span>
&nbsp;
<span style="color: #0000FF;">function</span> createone<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'function one{'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'	$users1 = &quot;CORP1\Bollasr1&quot;, &quot;CORP2\aardeje1&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		foreach ($u in $users1){'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'			Write-Output &quot;$u&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'one | out-File C:\lnl\oneresults.txt'</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #008000;">#Now I will show an example of 5 threads. This file is called threading.ps1</span>
&nbsp;
<span style="color: #008000;">##Create Multi Thread Script</span>
<span style="color: #0000FF;">function</span> createone<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'function one{'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'	$users1 = &quot;CORP1\Bollasr1&quot;, &quot;CORP2\aardeje1&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		foreach ($u in $users1){'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'			Write-Output &quot;$u&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'one | out-File C:\lnl\oneresults.txt'</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #0000FF;">function</span> createtwo<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'function two{'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'	$users2 = &quot;CORP1\dudlesu1&quot;, &quot;CORP2\duerrma1&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		foreach ($u in $users2){'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'			Write-Output &quot;$u&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'two | out-File C:\lnl\tworesults.txt'</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #0000FF;">function</span> createthree<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'function three{'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'	$users3 = &quot;CORP1\khattpa2&quot;, &quot;CORP1\khattsa1&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		foreach ($u in $users3){'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'			Write-Output &quot;$u&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'three | out-File C:\lnl\threeresults.txt'</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #0000FF;">function</span> createfour<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'function four{'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'	$users4 = &quot;CORP1\pellath1&quot;, &quot;CORP2\pellian5&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		foreach ($u in $users4){'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'			Write-Output &quot;$u&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'four | out-File C:\lnl\fourresults.txt'</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #0000FF;">function</span> createfive<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'function five{'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'	$users5 = &quot;CORP1\trancu1&quot;, &quot;CORP2\tranth8&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		foreach ($u in $users5){'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'			Write-Output &quot;$u&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'five | out-File C:\lnl\fiveresults.txt'</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #008000;">#Step 4 : Create .ps1 scripts out of the functions.</span>
<span style="color: #008000;">#Take note that ..\..\ alows for a releative path.</span>
&nbsp;
createone <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-File</span> ..\..\Threadone.ps1
createtwo <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-File</span> ..\..\Threadtwo.ps1
createthree <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-File</span> ..\..\Threadthree.ps1
createfour <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-File</span> ..\..\Threadfour.ps1
createfive <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-File</span> ..\..\Threadfive.ps1
&nbsp;
&nbsp;
<span style="color: #008000;">#Step 5 : Launch threading script.</span>
&nbsp;
start<span style="color: pink;">-</span>job <span style="color: #008080; font-style: italic;">-filepath</span> ..\..\Threadone.ps1
start<span style="color: pink;">-</span>job <span style="color: #008080; font-style: italic;">-filepath</span> ..\..\Threadtwo.ps1
start<span style="color: pink;">-</span>job <span style="color: #008080; font-style: italic;">-filepath</span> ..\..\Threadthree.ps1
start<span style="color: pink;">-</span>job <span style="color: #008080; font-style: italic;">-filepath</span> ..\..\Threadfour.ps1
start<span style="color: pink;">-</span>job <span style="color: #008080; font-style: italic;">-filepath</span> ..\..\Threadfive.ps1
&nbsp;
<span style="color: #008000;">#Step 6 : Check Status of Jobs</span>
<span style="color: #008000;">#The Wait-Job cmdlet waits for Windows PowerShell background jobs to complete before it displays the command prompt.</span>
&nbsp;
get<span style="color: pink;">-</span>job <span style="color: pink;">|</span> wait<span style="color: pink;">-</span>job
&nbsp;
<span style="color: #008000;">#Step 7 : Stop any Job that may be hung.</span>
<span style="color: #008000;">#The Stop-Job cmdlet stops Windows PowerShell background jobs that are in progress.</span>
&nbsp;
get<span style="color: pink;">-</span>job <span style="color: pink;">|</span> stop<span style="color: pink;">-</span>job
&nbsp;
<span style="color: #008000;">#full Script called threading.ps1</span>
<span style="color: #008000;">##Create Multi Thread Script</span>
&nbsp;
<span style="color: #0000FF;">function</span> createone<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'function one{'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'	$users1 = &quot;CORP1\Bollasr1&quot;, &quot;CORP2\aardeje1&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		foreach ($u in $users1){'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'			Write-Output &quot;$u&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'one | out-File C:\lnl\oneresults.txt'</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #0000FF;">function</span> createtwo<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'function two{'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'	$users2 = &quot;CORP1\dudlesu1&quot;, &quot;CORP2\duerrma1&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		foreach ($u in $users2){'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'			Write-Output &quot;$u&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'two | out-File C:\lnl\tworesults.txt'</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #0000FF;">function</span> createthree<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'function three{'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'	$users3 = &quot;CORP1\khattpa2&quot;, &quot;CORP1\khattsa1&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		foreach ($u in $users3){'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'			Write-Output &quot;$u&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'three | out-File C:\lnl\threeresults.txt'</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #0000FF;">function</span> createfour<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'function four{'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'	$users4 = &quot;CORP1\pellath1&quot;, &quot;CORP2\pellian5&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		foreach ($u in $users4){'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'			Write-Output &quot;$u&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'four | out-File C:\lnl\fourresults.txt'</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #0000FF;">function</span> createfive<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'function five{'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'	$users5 = &quot;CORP1\trancu1&quot;, &quot;CORP2\tranth8&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		foreach ($u in $users5){'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'			Write-Output &quot;$u&quot;'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'		}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'}'</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">'five | out-File C:\lnl\fiveresults.txt'</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
createone <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-File</span> ..\..\Threadone.ps1
createtwo <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-File</span> ..\..\Threadtwo.ps1
createthree <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-File</span> ..\..\Threadthree.ps1
createfour <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-File</span> ..\..\Threadfour.ps1
createfive <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-File</span> ..\..\Threadfive.ps1
&nbsp;
start<span style="color: pink;">-</span>job <span style="color: #008080; font-style: italic;">-filepath</span> ..\..\Threadone.ps1
start<span style="color: pink;">-</span>job <span style="color: #008080; font-style: italic;">-filepath</span> ..\..\Threadtwo.ps1
start<span style="color: pink;">-</span>job <span style="color: #008080; font-style: italic;">-filepath</span> ..\..\Threadthree.ps1
start<span style="color: pink;">-</span>job <span style="color: #008080; font-style: italic;">-filepath</span> ..\..\Threadfour.ps1
start<span style="color: pink;">-</span>job <span style="color: #008080; font-style: italic;">-filepath</span> ..\..\Threadfive.ps1
&nbsp;
get<span style="color: pink;">-</span>job <span style="color: pink;">|</span> wait<span style="color: pink;">-</span>job
&nbsp;
get<span style="color: pink;">-</span>job <span style="color: pink;">|</span> stop<span style="color: pink;">-</span>job</pre></td></tr></table></div>

<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.isaacblum.com%2F2010%2F01%2F22%2Fpowershell-multithreading-omg%2F&amp;linkname=PowerShell%20Multithreading%20%26%238211%3B%20OMG%21%21"><img src="http://blog.isaacblum.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/01/22/powershell-multithreading-omg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell &#8211; Bulk Update MOSS Profile</title>
		<link>http://blog.isaacblum.com/2010/01/21/powershell-bulk-update-moss-profile/</link>
		<comments>http://blog.isaacblum.com/2010/01/21/powershell-bulk-update-moss-profile/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 15:33:47 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[MOSS 2007]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Bulk]]></category>
		<category><![CDATA[MOSS]]></category>
		<category><![CDATA[Profile]]></category>
		<category><![CDATA[SSP]]></category>
		<category><![CDATA[Update]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=257</guid>
		<description><![CDATA[The below links were used to create this script. Thanks http://blogs.msdn.com/powershell/archive/2009/01/10/capture-console-screen.aspx http://www.sharepointdevwiki.com/display/public/Updating+User+Profiles+in+SharePoint+SSP+using+PowerShell http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,a332015d-c5dc-4433-a0f3-247fd37b0b04.aspx Download the file here 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 [...]]]></description>
			<content:encoded><![CDATA[<p>The below links were used to create this script. Thanks</p>
<p>http://blogs.msdn.com/powershell/archive/2009/01/10/capture-console-screen.aspx</p>
<p>http://www.sharepointdevwiki.com/display/public/Updating+User+Profiles+in+SharePoint+SSP+using+PowerShell</p>
<p>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,a332015d-c5dc-4433-a0f3-247fd37b0b04.aspx</p>
<p>Download the file <a href="http://isaacblum.com/wp-content/uploads/2010/01/Bulk-Update-MOSS-profiles.ps1">here</a></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #000000;">&#91;</span>void<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>reflection.assembly<span style="color: #000000;">&#93;</span>::<span style="color: #800000;">Load</span>withpartialname<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;Microsoft.SharePoint&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-null</span>
<span style="color: #000000;">&#91;</span>void<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>reflection.assembly<span style="color: #000000;">&#93;</span>::<span style="color: #800000;">Load</span>withpartialname<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;Microsoft.Office.Server.Search&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-null</span>
<span style="color: #000000;">&#91;</span>void<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>reflection.assembly<span style="color: #000000;">&#93;</span>::<span style="color: #800000;">Load</span>withpartialname<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;Microsoft.Office.Server&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-null</span>
&nbsp;
<span style="color: #008000;">#################################################################################################################</span>
<span style="color: #008000;"># Get-ConsoleAsText.ps1</span>
<span style="color: #008000;"># Thanks to http://blogs.msdn.com/powershell/archive/2009/01/10/capture-console-screen.aspx for Get-ConsoleAsText.ps1</span>
<span style="color: #008000;"># The script captures console screen buffer up to the current cursor position and returns it in plain text format.</span>
<span style="color: #008000;">#</span>
<span style="color: #008000;"># Returns: ASCII-encoded string.</span>
<span style="color: #008000;">#</span>
<span style="color: #008000;"># Example:</span>
<span style="color: #008000;">#</span>
<span style="color: #008000;"># $textFileName = &quot;$env:temp\ConsoleBuffer.txt&quot;</span>
<span style="color: #008000;"># .\Get-ConsoleAsText | out-file $textFileName -encoding ascii</span>
<span style="color: #008000;"># $null = [System.Diagnostics.Process]::Start(&quot;$textFileName&quot;)</span>
<span style="color: #008000;">#################################################################################################################</span>
<span style="color: #0000FF;">function</span> Get<span style="color: pink;">-</span>ConsoleAsText<span style="color: #000000;">&#123;</span>
<span style="color: #008000;"># Check the host name and exit if the host is not the Windows PowerShell console host.</span>
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$host</span>.Name <span style="color: #FF0000;">-ne</span> <span style="color: #800000;">'ConsoleHost'</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
  <span style="color: #008080; font-weight: bold;">write-host</span> <span style="color: #008080; font-style: italic;">-ForegroundColor</span> Red <span style="color: #800000;">&quot;This script runs only in the console host. You cannot run this script in $($host.Name).&quot;</span>
  exit <span style="color: pink;">-</span><span style="color: #000000;">1</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;"># Initialize string builder.</span>
<span style="color: #800080;">$textBuilder</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">new-object</span> system.text.stringbuilder
&nbsp;
<span style="color: #008000;"># Grab the console screen buffer contents using the Host console API.</span>
<span style="color: #800080;">$bufferWidth</span> <span style="color: pink;">=</span> <span style="color: #800080;">$host</span>.ui.rawui.BufferSize.Width
<span style="color: #800080;">$bufferHeight</span> <span style="color: pink;">=</span> <span style="color: #800080;">$host</span>.ui.rawui.CursorPosition.Y
<span style="color: #800080;">$rec</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">new-object</span> System.Management.Automation.Host.Rectangle <span style="color: #000000;">0</span><span style="color: pink;">,</span><span style="color: #000000;">0</span><span style="color: pink;">,</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$bufferWidth</span> <span style="color: pink;">-</span> <span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: pink;">,</span><span style="color: #800080;">$bufferHeight</span>
<span style="color: #800080;">$buffer</span> <span style="color: pink;">=</span> <span style="color: #800080;">$host</span>.ui.rawui.GetBufferContents<span style="color: #000000;">&#40;</span><span style="color: #800080;">$rec</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;"># Iterate through the lines in the console buffer.</span>
<span style="color: #0000FF;">for</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$i</span> <span style="color: pink;">=</span> <span style="color: #000000;">0</span>; <span style="color: #800080;">$i</span> <span style="color: #FF0000;">-lt</span> <span style="color: #800080;">$bufferHeight</span>; <span style="color: #800080;">$i</span><span style="color: pink;">++</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
  <span style="color: #0000FF;">for</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$j</span> <span style="color: pink;">=</span> <span style="color: #000000;">0</span>; <span style="color: #800080;">$j</span> <span style="color: #FF0000;">-lt</span> <span style="color: #800080;">$bufferWidth</span>; <span style="color: #800080;">$j</span><span style="color: pink;">++</span><span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
    <span style="color: #800080;">$cell</span> <span style="color: pink;">=</span> <span style="color: #800080;">$buffer</span><span style="color: #000000;">&#91;</span><span style="color: #800080;">$i</span><span style="color: pink;">,</span><span style="color: #800080;">$j</span><span style="color: #000000;">&#93;</span>
    <span style="color: #800080;">$null</span> <span style="color: pink;">=</span> <span style="color: #800080;">$textBuilder</span>.Append<span style="color: #000000;">&#40;</span><span style="color: #800080;">$cell</span>.Character<span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#125;</span>
  <span style="color: #800080;">$null</span> <span style="color: pink;">=</span> <span style="color: #800080;">$textBuilder</span>.Append<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;<span style="color: #008080; font-weight: bold;">`r</span><span style="color: #008080; font-weight: bold;">`n</span>&quot;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0000FF;">return</span> <span style="color: #800080;">$textBuilder</span>.ToString<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;">################################################################</span>
&nbsp;
<span style="color: #008000;"># Pause Script</span>
<span style="color: #0000FF;">function</span> Pause <span style="color: #000000;">&#40;</span><span style="color: #800080;">$Message</span><span style="color: pink;">=</span><span style="color: #800000;">&quot;Script Complete. Press any key to continue...&quot;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #008080; font-style: italic;">-NoNewLine</span> <span style="color: #800080;">$Message</span>
<span style="color: #800080;">$null</span> <span style="color: pink;">=</span> <span style="color: #000080;">$Host</span>.UI.RawUI.ReadKey<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;NoEcho,IncludeKeyDown&quot;</span><span style="color: #000000;">&#41;</span>
<span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800000;">&quot;&quot;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;">################################################################</span>
&nbsp;
<span style="color: #0000FF;">function</span> Get<span style="color: pink;">-</span>UserProfileConfigManager<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span><span style="color: #800080;">$siteUrl</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #008000;"># Need to get a PortalContext object</span>
<span style="color: #008000;"># as we do not have a HttpContext we need to source one the hard way</span>
<span style="color: #800080;">$site</span><span style="color: pink;">=</span><span style="color: #008080; font-weight: bold;">new-object</span> Microsoft.SharePoint.SPSite<span style="color: #000000;">&#40;</span><span style="color: #800080;">$siteUrl</span><span style="color: #000000;">&#41;</span>
<span style="color: #800080;">$servercontext</span><span style="color: pink;">=</span><span style="color: #000000;">&#91;</span>Microsoft.Office.Server.ServerContext<span style="color: #000000;">&#93;</span>::GetContext<span style="color: #000000;">&#40;</span><span style="color: #800080;">$site</span><span style="color: #000000;">&#41;</span>
<span style="color: #800080;">$site</span>.Dispose<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;"># clean up</span>
&nbsp;
<span style="color: #008000;">################################################################</span>
&nbsp;
<span style="color: #008000;"># Return the UserProfileConfigManager</span>
<span style="color: #008080; font-weight: bold;">new-object</span> Microsoft.Office.Server.UserProfiles.UserProfileConfigmanager<span style="color: #000000;">&#40;</span><span style="color: #800080;">$servercontext</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0000FF;">function</span> Get<span style="color: pink;">-</span>SPProfileManager<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span><span style="color: #800080;">$siteUrl</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #008000;"># Need to get a PortalContext object</span>
<span style="color: #008000;"># as we do not have a HttpContext we need to source one the hard way</span>
<span style="color: #800080;">$site</span><span style="color: pink;">=</span><span style="color: #008080; font-weight: bold;">new-object</span> Microsoft.SharePoint.SPSite<span style="color: #000000;">&#40;</span><span style="color: #800080;">$siteUrl</span><span style="color: #000000;">&#41;</span>
<span style="color: #800080;">$servercontext</span><span style="color: pink;">=</span><span style="color: #000000;">&#91;</span>Microsoft.Office.Server.ServerContext<span style="color: #000000;">&#93;</span>::GetContext<span style="color: #000000;">&#40;</span><span style="color: #800080;">$site</span><span style="color: #000000;">&#41;</span>
<span style="color: #800080;">$site</span>.Dispose<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;"># clean up</span>
&nbsp;
<span style="color: #008000;">################################################################</span>
&nbsp;
<span style="color: #008000;"># Return the UserProfileManager</span>
<span style="color: #008080; font-weight: bold;">new-object</span> Microsoft.Office.Server.UserProfiles.UserProfileManager<span style="color: #000000;">&#40;</span><span style="color: #800080;">$servercontext</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0000FF;">function</span> Get<span style="color: pink;">-</span>SPUserProfile<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span><span style="color: #800080;">$siteUrl</span><span style="color: pink;">,</span> <span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span> <span style="color: #800080;">$u</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #800080;">$upm</span><span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPProfileManager<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span><span style="color: #800080;">$siteUrl</span><span style="color: #000000;">&#41;</span>
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$upm</span>.UserExists<span style="color: #000000;">&#40;</span><span style="color: #800080;">$u</span><span style="color: #000000;">&#41;</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800080;">$false</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #800080;">$upm</span>.CreateUserProfile<span style="color: #000000;">&#40;</span><span style="color: #800080;">$u</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #800080;">$upm</span>.GetUserProfile<span style="color: #000000;">&#40;</span><span style="color: #800080;">$u</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;">################################################################</span>
&nbsp;
<span style="color: #008000;"># Create function</span>
<span style="color: #0000FF;">function</span> Update<span style="color: pink;">-</span>UserProfileProperty<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0000FF;">PARAM</span>
	<span style="color: #000000;">&#40;</span>
		<span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span> <span style="color: #800080;">$siteUrl</span> <span style="color: pink;">=</span> $<span style="color: #000000;">&#40;</span> <span style="color: #0000FF;">throw</span> <span style="color: #800000;">&quot;You must provide a Site Collection Url e.g. 'http://moss/'&quot;</span><span style="color: #000000;">&#41;</span><span style="color: pink;">,</span>
		<span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span> <span style="color: #800080;">$userName</span> <span style="color: pink;">=</span> $<span style="color: #000000;">&#40;</span> <span style="color: #0000FF;">throw</span> <span style="color: #800000;">&quot;You must provide a User Name e.g. 'DOMAIN\USERNAME'&quot;</span><span style="color: #000000;">&#41;</span><span style="color: pink;">,</span>
		<span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span> <span style="color: #800080;">$propName</span> <span style="color: pink;">=</span> $<span style="color: #000000;">&#40;</span> <span style="color: #0000FF;">throw</span> <span style="color: #800000;">&quot;You must provide a User Profile Property Name e.g. 'WorkPhone'&quot;</span><span style="color: #000000;">&#41;</span><span style="color: pink;">,</span>
		<span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span> <span style="color: #800080;">$propValue</span> <span style="color: pink;">=</span> $<span style="color: #000000;">&#40;</span> <span style="color: #0000FF;">throw</span> <span style="color: #800000;">&quot;You must provide a User Profile Property Value e.g. '0400 767 022'&quot;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#41;</span>
	END
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$propValue</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800000;">&quot;NULL&quot;</span> <span style="color: #FF0000;">-or</span> <span style="color: #800080;">$propValue</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800000;">&quot;&quot;</span> <span style="color: #FF0000;">-or</span> <span style="color: #800080;">$propValue</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800000;">&quot;None&quot;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800000;">&quot;Property '$propName' is not set ('$propValue')&quot;</span>
		<span style="color: #000000;">&#125;</span>
		<span style="color: #0000FF;">else</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #800080;">$cm</span> <span style="color: pink;">=</span> get<span style="color: pink;">-</span>userprofileconfigmanager <span style="color: #800080;">$siteUrl</span>
			<span style="color: #800080;">$spm</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPProfileManager <span style="color: #800080;">$siteUrl</span>
			<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$spm</span>.UserExists<span style="color: #000000;">&#40;</span><span style="color: #800080;">$userName</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #800080;">$userProfile</span> <span style="color: pink;">=</span> <span style="color: #800080;">$spm</span>.GetUserProfile<span style="color: #000000;">&#40;</span><span style="color: #800080;">$userName</span><span style="color: #000000;">&#41;</span>;
				<span style="color: #800080;">$tempProp</span> <span style="color: pink;">=</span> <span style="color: #800080;">$spm</span>.Properties.GetPropertyByName<span style="color: #000000;">&#40;</span><span style="color: #800080;">$propName</span><span style="color: #000000;">&#41;</span>;
				<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$tempProp</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800080;">$null</span><span style="color: #000000;">&#41;</span>
				<span style="color: #000000;">&#123;</span>
					<span style="color: #0000FF;">throw</span> <span style="color: #800000;">&quot;User Profile Property '$propName' does not exist!&quot;</span>;
				<span style="color: #000000;">&#125;</span>
				<span style="color: #0000FF;">else</span>
				<span style="color: #000000;">&#123;</span>
					<span style="color: #800080;">$userProfile</span><span style="color: #000000;">&#91;</span><span style="color: #800080;">$propName</span><span style="color: #000000;">&#93;</span>.Value <span style="color: pink;">=</span> <span style="color: #800080;">$propValue</span>;
					<span style="color: #800080;">$userProfile</span>.Commit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
				<span style="color: #000000;">&#125;</span>
				<span style="color: #008080; font-weight: bold;">write-host</span> <span style="color: #008080; font-style: italic;">-foregroundcolor</span> green <span style="color: #800000;">&quot;'$propName' User Profile Property updated to '$propValue' for '$userName'&quot;</span>
				<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">&quot;'$propName' User Profile Property updated to '$propValue' for '$userName'&quot;</span>
			<span style="color: #000000;">&#125;</span>
			<span style="color: #0000FF;">else</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #008080; font-style: italic;">-ForegroundColor</span> red  <span style="color: #800000;">&quot;User '$userName' does not exist in User Profiles!&quot;</span>
				<span style="color: #008080; font-weight: bold;">Write-output</span> <span style="color: #800000;">&quot;User '$userName' does not exist in User Profiles!&quot;</span>;
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;">################################################################</span>
&nbsp;
<span style="color: #0000FF;">function</span> MySiteProUpdate<span style="color: #000000;">&#123;</span>
<span style="color: #800080;">$username</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;IB\Admin&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;IB\Guest&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;IB\PowerShell&quot;</span>
&nbsp;
<span style="color: #008000;"># Set MySite URL</span>
<span style="color: #800080;">$siteUrl</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;http://mysites:3000&quot;</span>
&nbsp;
<span style="color: #008000;"># Notifies</span>
<span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800000;">&quot;Working... Please Wait&quot;</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">&quot; &quot;</span>
&nbsp;
<span style="color: #0000FF;">foreach</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$u</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$username</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
<span style="color: #008000;"># Executes command for all users in this script</span>
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800000;">&quot;Executing this command :  Update-UserProfileProperty $siteUrl $u ActiveEmployee true&quot;</span>
Update<span style="color: pink;">-</span>UserProfileProperty <span style="color: #800080;">$siteUrl</span> <span style="color: #800000;">&quot;$u&quot;</span> <span style="color: #800000;">&quot;ActiveEmployee&quot;</span> <span style="color: #800000;">&quot;true&quot;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #008000;"># Dump Console</span>
<span style="color: #800080;">$textFileName</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;C:\IBLogs\ConsoleDump.txt&quot;</span>
Get<span style="color: pink;">-</span>ConsoleAsText <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-file</span> <span style="color: #800080;">$textFileName</span> <span style="color: #008080; font-style: italic;">-encoding</span> ascii
<span style="color: #008000;">#$null = [System.Diagnostics.Process]::Start(&quot;$textFileName&quot;)</span>
pause
<span style="color: #000000;">&#125;</span>
<span style="color: #008000;">################################################################</span>
&nbsp;
MySiteProUpdate <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">out-File</span> C:\IBLogs\Progress.txt</pre></td></tr></table></div>

<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.isaacblum.com%2F2010%2F01%2F21%2Fpowershell-bulk-update-moss-profile%2F&amp;linkname=PowerShell%20%26%238211%3B%20Bulk%20Update%20MOSS%20Profile"><img src="http://blog.isaacblum.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/01/21/powershell-bulk-update-moss-profile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
