<?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</title>
	<atom:link href="http://blog.isaacblum.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.isaacblum.com</link>
	<description>So Many Rambles So Little Time....</description>
	<lastBuildDate>Fri, 19 Feb 2010 22:06:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Civilization V</title>
		<link>http://blog.isaacblum.com/2010/02/19/civilization-v/</link>
		<comments>http://blog.isaacblum.com/2010/02/19/civilization-v/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 22:06:42 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Civilization V]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=319</guid>
		<description><![CDATA[http://www.gamespot.com/pc/strategy/civilizationv/index.html
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gamespot.com/pc/strategy/civilizationv/index.html">http://www.gamespot.com/pc/strategy/civilizationv/index.html</a></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%2Fcivilization-v%2F&amp;linkname=Civilization%20V"><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>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/02/19/civilization-v/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 Terms and Limited Warranty to install [...]]]></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>
<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>]]></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>

<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>]]></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>
<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>]]></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 &#62; $null &#125;
function set
&#123;
	&#91;string&#93;$var = $args
	if &#40;$var -eq &#34;&#34;&#41;
	&#123;
		get-childitem env: &#124; sort-object name
	&#125;
	else
	&#123;
		if &#40;$var -match &#34;^(\S*?)\s*=\s*(.*)$&#34;&#41;
		&#123;
			set-item -force -path &#34;env:$($matches[1])&#34; -value [...]]]></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>

<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>]]></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>
<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>]]></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>Microsoft Web Platform Installer</title>
		<link>http://blog.isaacblum.com/2010/02/17/microsoft-web-platform-installer/</link>
		<comments>http://blog.isaacblum.com/2010/02/17/microsoft-web-platform-installer/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 16:22:56 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft Web Platform Installer]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=286</guid>
		<description><![CDATA[This has been out for a while now. I really hadn’t needed to use this, however I used it a handful of times this week, and i do love it!!
http://blogs.msdn.com/webplatform/
http://www.microsoft.com/Web/
]]></description>
			<content:encoded><![CDATA[<p>This has been out for a while now. I really hadn’t needed to use this, however I used it a handful of times this week, and i do love it!!</p>
<p>http://blogs.msdn.com/webplatform/</p>
<p>http://www.microsoft.com/Web/</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.isaacblum.com%2F2010%2F02%2F17%2Fmicrosoft-web-platform-installer%2F&amp;linkname=Microsoft%20Web%20Platform%20Installer"><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>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/02/17/microsoft-web-platform-installer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple announces iPad, TapLynx announces iPad apps</title>
		<link>http://blog.isaacblum.com/2010/01/27/apple-announces-ipad-taplynx-announces-ipad-apps/</link>
		<comments>http://blog.isaacblum.com/2010/01/27/apple-announces-ipad-taplynx-announces-ipad-apps/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 01:57:28 +0000</pubDate>
		<dc:creator>Isaac Blum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[NewsGator]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=270</guid>
		<description><![CDATA[http://taplynx.com/blog/news-announcements/create-ipad-apps-with-taplynx
]]></description>
			<content:encoded><![CDATA[<p><a href="https://email.corp.newsgator.com/owa/redir.aspx?C=7ecc9964f829466fa24070dc8682298b&amp;URL=http%3a%2f%2ftaplynx.com%2fblog%2fnews-announcements%2fcreate-ipad-apps-with-taplynx" target="_blank"></a><a href="https://email.corp.newsgator.com/owa/redir.aspx?C=7ecc9964f829466fa24070dc8682298b&amp;URL=http%3a%2f%2ftaplynx.com%2fblog%2fnews-announcements%2fcreate-ipad-apps-with-taplynx" target="_blank">http://taplynx.com/blog/news-announcements/create-ipad-apps-with-taplynx</a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.isaacblum.com%2F2010%2F01%2F27%2Fapple-announces-ipad-taplynx-announces-ipad-apps%2F&amp;linkname=Apple%20announces%20iPad%2C%20TapLynx%20announces%20iPad%20apps"><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>]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2010/01/27/apple-announces-ipad-taplynx-announces-ipad-apps/feed/</wfw:commentRss>
		<slash:comments>1</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
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
#Create a function, or in this example create/split up a large job into multiple functions.
&#160;
#Step 1 : Create threading.ps1
#Step 2 : Create function and add it to threading.ps1
&#160;
#(Sample Function)
&#160;
function [...]]]></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>

<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>]]></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
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
&#91;void&#93;&#91;reflection.assembly&#93;::Loadwithpartialname&#40;&#34;Microsoft.SharePoint&#34;&#41; &#124; out-null
&#91;void&#93;&#91;reflection.assembly&#93;::Loadwithpartialname&#40;&#34;Microsoft.Office.Server.Search&#34;&#41; &#124; out-null
&#91;void&#93;&#91;reflection.assembly&#93;::Loadwithpartialname&#40;&#34;Microsoft.Office.Server&#34;&#41; &#124; out-null
&#160;
#################################################################################################################
# Get-ConsoleAsText.ps1
# Thanks to http://blogs.msdn.com/powershell/archive/2009/01/10/capture-console-screen.aspx for Get-ConsoleAsText.ps1
# The script captures console screen buffer up to the current cursor position and returns it in plain text format.
#
# Returns: ASCII-encoded string.
#
# Example:
#
# $textFileName = &#34;$env:temp\ConsoleBuffer.txt&#34;
# .\Get-ConsoleAsText &#124; out-file $textFileName [...]]]></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>

<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>]]></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>
