<?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>Wed, 02 May 2012 04:19:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Hot Tub for sale in Denver</title>
		<link>http://blog.isaacblum.com/2012/04/20/hot-tub-for-sale-in-denver/</link>
		<comments>http://blog.isaacblum.com/2012/04/20/hot-tub-for-sale-in-denver/#comments</comments>
		<pubDate>Sat, 21 Apr 2012 02:24:03 +0000</pubDate>
		<dc:creator>IsaacBlum</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[denver]]></category>
		<category><![CDATA[hot tub]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=721</guid>
		<description><![CDATA[Check it out http://denver.craigslist.org/for/2970214010.html]]></description>
			<content:encoded><![CDATA[<p>Check it out <a href="http://denver.craigslist.org/for/2970214010.html">http://denver.craigslist.org/for/2970214010.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2012/04/20/hot-tub-for-sale-in-denver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Old School Screen Savers from Mac and PC past &#8211; Mac OS X Lion compatible</title>
		<link>http://blog.isaacblum.com/2012/04/18/old-school-screen-savers-from-mac-and-pc-past-mac-os-x-lion-compatible/</link>
		<comments>http://blog.isaacblum.com/2012/04/18/old-school-screen-savers-from-mac-and-pc-past-mac-os-x-lion-compatible/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 00:12:39 +0000</pubDate>
		<dc:creator>IsaacBlum</dc:creator>
				<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[OS X Lion]]></category>
		<category><![CDATA[Screen Savers]]></category>
		<category><![CDATA[Cool Screen Savers]]></category>
		<category><![CDATA[Mac OS X Lion]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=717</guid>
		<description><![CDATA[http://www.jwz.org/xscreensaver/download.html The above link will take you to a very nice person who has spent a bunch of time compiling 200+ screen saves from years past. You will find screen savers from both PC and Mac olden days :) Currently running Mac OS X Lion 10, with no issues. Enjoy!!]]></description>
			<content:encoded><![CDATA[<p><a title="http://www.jwz.org/xscreensaver/download.html" href="http://www.jwz.org/xscreensaver/download.html" target="_blank">http://www.jwz.org/xscreensaver/download.html</a></p>
<p>The above link will take you to a very nice person who has spent a bunch of time compiling 200+ screen saves from years past. You will find screen savers from both PC and Mac olden days :)</p>
<p>Currently running Mac OS X Lion 10, with no issues. Enjoy!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2012/04/18/old-school-screen-savers-from-mac-and-pc-past-mac-os-x-lion-compatible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling Support for Alternate Languages &#8211; SharePoint 2010 PowerShell</title>
		<link>http://blog.isaacblum.com/2012/03/20/enabling-support-for-alternate-languages-sharepoint-2010-powershell/</link>
		<comments>http://blog.isaacblum.com/2012/03/20/enabling-support-for-alternate-languages-sharepoint-2010-powershell/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 21:46:02 +0000</pubDate>
		<dc:creator>IsaacBlum</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[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint 2010 Foundation]]></category>
		<category><![CDATA[Alternate Languages]]></category>
		<category><![CDATA[Languages]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=706</guid>
		<description><![CDATA[Enable all supported languages for all site collections within SharePoint 2010 Web Application. Based off this post http://msdn.microsoft.com/en-us/library/ff800886.aspx  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 ################################################################################# ########################## Change [...]]]></description>
			<content:encoded><![CDATA[<p>Enable all supported languages for all site collections within SharePoint 2010 Web Application. Based off this post <a title="http://msdn.microsoft.com/en-us/library/ff800886.aspx " href="http://msdn.microsoft.com/en-us/library/ff800886.aspx " target="_blank">http://msdn.microsoft.com/en-us/library/ff800886.aspx </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
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;">#################################################################################</span>
<span style="color: #008000;">########################## Change Inputs Below ##################################</span>
<span style="color: #008000;">#################################################################################</span>
&nbsp;
<span style="color: #008000;">#$WebAppURL = &quot;http://redleader&quot;</span>
&nbsp;
<span style="color: #008000;">#################################################################################</span>
<span style="color: #008000;">########################## Code, No Changes Below ###############################</span>
<span style="color: #008000;">#################################################################################</span>
<span style="color: #008080; font-weight: bold;">clear</span>
&nbsp;
<span style="color: #800080;">$PSSnapin</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Remove-PSSnapin</span> Microsoft.SharePoint.PowerShell <span style="color: #008080; font-style: italic;">-ErrorAction</span> SilentlyContinue <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Out-Null</span>
<span style="color: #800080;">$PSSnapin</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Add-PsSnapin</span> Microsoft.SharePoint.PowerShell <span style="color: #008080; font-style: italic;">-ErrorAction</span> SilentlyContinue <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Out-Null</span>
&nbsp;
<span style="color: #800080;">$WebApp</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPWebApplication <span style="color: #800080;">$WebAppURL</span>
<span style="color: #0000FF;">Foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$Site</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$WebApp</span>.Sites<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #800080;">$Web</span> <span style="color: pink;">=</span> <span style="color: #800080;">$Site</span>.RootWeb
	<span style="color: #800080;">$Web</span>.IsMultilingual <span style="color: pink;">=</span> <span style="color: #800080;">$true</span>
&nbsp;
	<span style="color: #800080;">$WebRegionSettings</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> Microsoft.SharePoint.SPRegionalSettings<span style="color: #000000;">&#40;</span><span style="color: #800080;">$Web</span><span style="color: #000000;">&#41;</span>
	<span style="color: #0000FF;">Foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$lang</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$WebRegionSettings</span>.InstalledLanguages<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0000FF;">If</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$Web</span>.SupportedUICultures <span style="color: #FF0000;">-notcontains</span> <span style="color: #800080;">$lang</span>.LCID<span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #800080;">$Web</span>.AddSupportedUICulture<span style="color: #000000;">&#40;</span><span style="color: #800080;">$lang</span>.LCID<span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
	<span style="color: #800080;">$Web</span>.Update<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #800080;">$Web</span>.Close<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #800080;">$Web</span>.Dispose<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
        <span style="color: #800080;">$Site</span>.Close<span style="color: #000000;">&#40;</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: #000000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2012/03/20/enabling-support-for-alternate-languages-sharepoint-2010-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerGUI ScriptEditor error &#8211; Microsoft SharePoint is not supported with version 4.0.30319.261 of the Microsoft .Net Runtime.</title>
		<link>http://blog.isaacblum.com/2012/02/29/powergui-scripteditor-error-microsoft-sharepoint-is-not-supported-with-version-4-0-30319-261-of-the-microsoft-net-runtime/</link>
		<comments>http://blog.isaacblum.com/2012/02/29/powergui-scripteditor-error-microsoft-sharepoint-is-not-supported-with-version-4-0-30319-261-of-the-microsoft-net-runtime/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 05:04:17 +0000</pubDate>
		<dc:creator>IsaacBlum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerGUI]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=698</guid>
		<description><![CDATA[I just upgraded to PowerGUI 3.2.0.2237 today. I ran into an issue once I attempted to debug a script that I know works. The error output contained this &#8220;Microsoft SharePoint is not supported with version 4.0.30319.261 of the Microsoft .Net Runtime.&#8221; Based on the release notes of PowerGUI 3.2.0.2237 it seems they added .net 4.0 support natively. Not [...]]]></description>
			<content:encoded><![CDATA[<p>I just upgraded to PowerGUI 3.2.0.2237 today. I ran into an issue once I attempted to debug a script that I know works. The error output contained this &#8220;Microsoft SharePoint is not supported with version 4.0.30319.261 of the Microsoft .Net Runtime.&#8221;</p>
<p>Based on the release notes of PowerGUI 3.2.0.2237 it seems they added .net 4.0 support natively. Not sure if it was supossed to be backwards compatible automatily or not, but at first galnce its not. If you want to continue to run you SharePoint 2010 2.0 cmdlets in PowerGUI, the only way I found was to change a config file. Please follow the below. If someone knows a better way of doing this im all ears!! Thanks</p>
<p>The below only works with x64. I&#8217;m sure there is a smiler config setting in the x86 ScriptEditor but I do not cover it below.</p>
<ol>
<li>Goto: C:\Program Files (x86)\PowerGUI\</li>
<li>Make a backup copy of this file &#8220;ScriptEditor.exe.config&#8221; then open in your favorite xml editor.</li>
<li>Make the below edit to your xml file, on line 4.</li>
</ol>
<div><strong>Before</strong></div>
<div>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243; ?&gt;<br />
&lt;configuration&gt;<br />
&lt;startup useLegacyV2RuntimeActivationPolicy=&#8221;true&#8221;&gt;<br />
&lt;supportedRuntime version=&#8221;v4.0&#8243; sku=&#8221;.NETFramework,Version=v4.0&#8243; /&gt;<br />
&lt;supportedRuntime version=&#8221;v2.0.50727&#8243; /&gt;<br />
&lt;/startup&gt;</p>
<p><strong>After</strong></p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243; ?&gt;<br />
&lt;configuration&gt;<br />
&lt;startup useLegacyV2RuntimeActivationPolicy=&#8221;true&#8221;&gt;<br />
&lt;!&#8211;&lt;supportedRuntime version=&#8221;v4.0&#8243; sku=&#8221;.NETFramework,Version=v4.0&#8243; /&gt;&#8211;&gt;<br />
&lt;supportedRuntime version=&#8221;v2.0.50727&#8243; /&gt;<br />
&lt;/startup&gt;</p>
<p>** Update 03/02/12 ** I think there is just some conflict with Visual Studio 2010 components that are installed .net 4 &amp; etc.. and this PowerGUI version. Or maybe that its an upgrade. Who knows.. I did however install PowerGUI on another machine today, and it worked fine with the SharePoint 2010 cmdlets.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2012/02/29/powergui-scripteditor-error-microsoft-sharepoint-is-not-supported-with-version-4-0-30319-261-of-the-microsoft-net-runtime/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The given key was not present in the dictionary. PowerPoint Service Application</title>
		<link>http://blog.isaacblum.com/2012/02/23/the-given-key-was-not-present-in-the-dictionary-powerpoint-service-application/</link>
		<comments>http://blog.isaacblum.com/2012/02/23/the-given-key-was-not-present-in-the-dictionary-powerpoint-service-application/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 20:22:38 +0000</pubDate>
		<dc:creator>IsaacBlum</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[PowerPoint]]></category>
		<category><![CDATA[PowerPoint Service Application]]></category>
		<category><![CDATA[The given key was not present in the dictionary]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=690</guid>
		<description><![CDATA[Don&#8217; Freak!!! Just delete the PowerPoint Service Application and this error goes away. Not sure if this is 100% true but it seems like one of the CU updates breaks access to the PowerPoint Service Application from Central Administration.]]></description>
			<content:encoded><![CDATA[<p>Don&#8217; Freak!!!</p>
<p>Just delete the PowerPoint Service Application and this error goes away. Not sure if this is 100% true but it seems like one of the CU updates breaks access to the PowerPoint Service Application from Central Administration.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2012/02/23/the-given-key-was-not-present-in-the-dictionary-powerpoint-service-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows XP, Office 2007, IE 8 with SharePoint 2010 &#8211; &#8220;the document could not be checked out&#8221;</title>
		<link>http://blog.isaacblum.com/2011/12/28/windows-xp-office-2007-ie-8-with-sharepoint-2010-the-document-could-not-be-checked-out/</link>
		<comments>http://blog.isaacblum.com/2011/12/28/windows-xp-office-2007-ie-8-with-sharepoint-2010-the-document-could-not-be-checked-out/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 21:10:03 +0000</pubDate>
		<dc:creator>IsaacBlum</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[SharePoint 2010 Foundation]]></category>
		<category><![CDATA[Office 2007]]></category>
		<category><![CDATA[the document could not be checked out]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=686</guid>
		<description><![CDATA[Spent hours trying to figure out why I couldnt check-out and check-in excel files or any files for that matter in SharePoint 2010. From a Windows 7, Office 2010, IE9 computer I never ran into issues, however with a Windows XP, Office 2007 and IE 8 I couldn&#8217;t. Kept getting the error &#8220;the document could [...]]]></description>
			<content:encoded><![CDATA[<p>Spent hours trying to figure out why I couldnt check-out and check-in excel files or any files for that matter in SharePoint 2010. From a Windows 7, Office 2010, IE9 computer I never ran into issues, however with a Windows XP, Office 2007 and IE 8 I couldn&#8217;t. Kept getting the error &#8220;the document could not be checked out&#8221;. Ran fiddler traces and looked at ULS logs and really nothing pointed to any issues. Finally after many searches I found this article: TechNet <a href="http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/4e41fd23-1b8c-45e3-a4e8-fdba4e852317/">http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/4e41fd23-1b8c-45e3-a4e8-fdba4e852317/</a> . Please see post from &#8220;Carlos_Shepardos&#8221; Sure enough I was missing a root site collection within my web app. So I didn&#8217;t have to install anything or change any settings on my client computers, just created a root site collection that the end user doesn&#8217;t even need access to. Hopefully if you catch yourself using Windows XP, Office 2007 and IE8, you will find my blog. I hope it works for you. <img src='http://blog.isaacblum.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2011/12/28/windows-xp-office-2007-ie-8-with-sharepoint-2010-the-document-could-not-be-checked-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable PowerShell Remoting</title>
		<link>http://blog.isaacblum.com/2011/11/07/enable-powershell-remoting/</link>
		<comments>http://blog.isaacblum.com/2011/11/07/enable-powershell-remoting/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 22:27:03 +0000</pubDate>
		<dc:creator>IsaacBlum</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[Remoting]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=682</guid>
		<description><![CDATA[Enable is the first PS command. The second is used if you would like to use CredSSP creds. Clicking the links will take you to the Technet article. Enable-PsRemoting -Force Enable-WSManCredSSP]]></description>
			<content:encoded><![CDATA[<p>Enable is the first PS command. The second is used if you would like to use CredSSP creds. Clicking the links will take you to the Technet article.</p>
<p><a href="http://technet.microsoft.com/en-us/library/dd819469.aspx" target="_blank"><em>Enable-PsRemoting -Force</em><br />
</a></p>
<p><a href="http://technet.microsoft.com/en-us/library/dd819469.aspx" target="_blank">Enable-WSManCredSSP</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2011/11/07/enable-powershell-remoting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPFileCollection Class &#8211; copy files to another document library</title>
		<link>http://blog.isaacblum.com/2011/10/04/spfilecollection-class-copy-files-to-another-document-library/</link>
		<comments>http://blog.isaacblum.com/2011/10/04/spfilecollection-class-copy-files-to-another-document-library/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 18:41:22 +0000</pubDate>
		<dc:creator>IsaacBlum</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 2010]]></category>
		<category><![CDATA[SharePoint 2010 Foundation]]></category>
		<category><![CDATA[copy files to another document library]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SPFileCollection]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=675</guid>
		<description><![CDATA[Original Post: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfilecollection.aspx **Please note** I didn&#8217;t attempt to &#8220;dispose&#8221;, so make sure to add it&#8230; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 $PSSnapin = Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue &#124; Out-Null clear &#160; $org = &#34;http://blueleader&#34; $dest = &#34;http://redleader&#34; &#160; $orgLibrary = &#40;Get-SPWeb $org&#41;.Folders&#91;&#34;Documents&#34;&#93; $destLibrary = &#40;Get-SPWeb $dest&#41;.Folders&#91;&#34;Documents&#34;&#93; $destFiles = $destLibrary.Files foreach [...]]]></description>
			<content:encoded><![CDATA[<p>Original Post: <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfilecollection.aspx">http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfilecollection.aspx</a></p>
<p>**Please note** I didn&#8217;t attempt to &#8220;dispose&#8221;, so make sure to add it&#8230;</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
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$PSSnapin</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Add-PsSnapin</span> Microsoft.SharePoint.PowerShell <span style="color: #008080; font-style: italic;">-ErrorAction</span> SilentlyContinue <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Out-Null</span>
<span style="color: #008080; font-weight: bold;">clear</span>
&nbsp;
<span style="color: #800080;">$org</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;http://blueleader&quot;</span>
<span style="color: #800080;">$dest</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;http://redleader&quot;</span>
&nbsp;
<span style="color: #800080;">$orgLibrary</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#40;</span>Get<span style="color: pink;">-</span>SPWeb <span style="color: #800080;">$org</span><span style="color: #000000;">&#41;</span>.Folders<span style="color: #000000;">&#91;</span><span style="color: #800000;">&quot;Documents&quot;</span><span style="color: #000000;">&#93;</span>
<span style="color: #800080;">$destLibrary</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#40;</span>Get<span style="color: pink;">-</span>SPWeb <span style="color: #800080;">$dest</span><span style="color: #000000;">&#41;</span>.Folders<span style="color: #000000;">&#91;</span><span style="color: #800000;">&quot;Documents&quot;</span><span style="color: #000000;">&#93;</span>
<span style="color: #800080;">$destFiles</span> <span style="color: pink;">=</span> <span style="color: #800080;">$destLibrary</span>.Files
<span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$file</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$orgLibrary</span>.Files<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #800080;">$curFile</span> <span style="color: pink;">=</span> <span style="color: #800080;">$file</span>.OpenBinary<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #800080;">$destURL</span> <span style="color: pink;">=</span> <span style="color: #800080;">$destFiles</span>.Folder.Url <span style="color: pink;">+</span> <span style="color: #800000;">&quot;/&quot;</span> <span style="color: pink;">+</span> <span style="color: #800080;">$file</span>.Name
	<span style="color: #800080;">$destFiles</span>.Add<span style="color: #000000;">&#40;</span><span style="color: #800080;">$destURL</span><span style="color: pink;">,</span> <span style="color: #800080;">$curFile</span><span style="color: pink;">,</span> <span style="color: #800080;">$true</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2011/10/04/spfilecollection-class-copy-files-to-another-document-library/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Best PowerShell Scripting Tool &#8211; PowerGUI</title>
		<link>http://blog.isaacblum.com/2011/08/24/best-powershell-scripting-tool-powergui/</link>
		<comments>http://blog.isaacblum.com/2011/08/24/best-powershell-scripting-tool-powergui/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 23:17:47 +0000</pubDate>
		<dc:creator>IsaacBlum</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[For The Greater Good]]></category>
		<category><![CDATA[Free Help]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[ISE]]></category>
		<category><![CDATA[PowerGUI]]></category>
		<category><![CDATA[PowerShell ISE]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=671</guid>
		<description><![CDATA[It has come to my attention that there is still a handful of folks out there writing PowerShell with NOTEPAD…. I won’t name names… But you all know who you are. Anyway I use a free tool from Quest software called PowerGUI. See the link to the latest build http://community-downloads.quest.com/powergui/Release/3.0/PowerGUI.3.0.0.2015.msi or http://powergui.org This is the tool [...]]]></description>
			<content:encoded><![CDATA[<p>It has come to my attention that there is still a handful of folks out there writing PowerShell with NOTEPAD…. I won’t name names… But you all know who you are. <img src='http://blog.isaacblum.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <img src='http://blog.isaacblum.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Anyway I use a free tool from Quest software called PowerGUI. See the link to the latest build <a title="PowerGUI 3.0" href="http://community-downloads.quest.com/powergui/Release/3.0/PowerGUI.3.0.0.2015.msi " target="_blank">http://community-downloads.quest.com/powergui/Release/3.0/PowerGUI.3.0.0.2015.msi </a>or <a title="PowerGUI" href="http://powergui.org" target="_blank">http://powergui.org</a> This is the tool that you “never leave home without”. It’s just like visual studio in the sense that you can step into code and debug variables, for each loops, you name it, it can do it. Please let me know if you have any questions.</p>
<p>BTW, a solid second place winner is&#8230; Microsoft Windows PowerShell ISE <a title="PowerShell ISE" href="http://technet.microsoft.com/en-us/library/dd315244.aspx" target="_blank">http://technet.microsoft.com/en-us/library/dd315244.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2011/08/24/best-powershell-scripting-tool-powergui/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PowerShell Install Multiple WSPs</title>
		<link>http://blog.isaacblum.com/2011/08/19/powershell-install-multiple-wsps/</link>
		<comments>http://blog.isaacblum.com/2011/08/19/powershell-install-multiple-wsps/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 22:23:18 +0000</pubDate>
		<dc:creator>IsaacBlum</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[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint 2010 Foundation]]></category>
		<category><![CDATA[enumerate]]></category>
		<category><![CDATA[Multiple]]></category>
		<category><![CDATA[WSP]]></category>
		<category><![CDATA[WSPs]]></category>

		<guid isPermaLink="false">http://blog.isaacblum.com/?p=641</guid>
		<description><![CDATA[The script enumerates a folder structure based off the input section of the PowerShell script. It then detects all .wsp files in any folder at the root of the folder and below. Once the list of files is compiled by PowerShell, it begins to either upgrade or installs each detected wsp. The script has a [...]]]></description>
			<content:encoded><![CDATA[<p>The script enumerates a folder structure based off the input section of the PowerShell script. It then detects all .wsp files in any folder at the root of the folder and below. Once the list of files is compiled by PowerShell, it begins to either upgrade or installs each detected wsp. The script has a bit of logic when attempting an install or upgrade. If the PowerShell script detects that the solution is already deployed to the farm, it will first attempt to retract the solution, once completed it then removes the solution before it attempts to install and deploys the feature to all web applications.</p>
<p>&nbsp;</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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;">######################################</span>
<span style="color: #008000;">######## Set Variables ###############</span>
<span style="color: #008000;">######################################</span>
<span style="color: #800080;">$InstallDIR</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;C:\install&quot;</span>
&nbsp;
<span style="color: #008000;">######################################</span>
<span style="color: #008000;">#### CODE, No Changes Necessary ######</span>
<span style="color: #008000;">######################################</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;">Add-PSSnapin</span> microsoft.sharepoint.powershell <span style="color: #008080; font-style: italic;">-ErrorAction</span> SilentlyContinue
&nbsp;
<span style="color: #800080;">$Dir</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">get-childitem</span> <span style="color: #800080;">$InstallDIR</span> <span style="color: #008080; font-style: italic;">-Recurse</span>
<span style="color: #800080;">$WSPList</span> <span style="color: pink;">=</span> <span style="color: #800080;">$Dir</span> <span style="color: pink;">|</span> <span style="color: #0000FF;">where</span> <span style="color: #000000;">&#123;</span><span style="color: #000080;">$_</span>.Name <span style="color: #FF0000;">-like</span> <span style="color: #800000;">&quot;*.wsp*&quot;</span><span style="color: #000000;">&#125;</span>
<span style="color: #0000FF;">Foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$wsp</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$WSPList</span> <span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #800080;">$WSPFullFileName</span> <span style="color: pink;">=</span> <span style="color: #800080;">$wsp</span>.FullName
	<span style="color: #800080;">$WSPFileName</span> <span style="color: pink;">=</span> <span style="color: #800080;">$wsp</span>.Name
	<span style="color: #008080; font-weight: bold;">clear</span>
	<span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #008080; font-style: italic;">-ForegroundColor</span> White <span style="color: #008080; font-style: italic;">-BackgroundColor</span> Blue <span style="color: #800000;">&quot;Working on $WSPFileName&quot;</span> 
&nbsp;
	try
	<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> Green <span style="color: #800000;">&quot;Checking Status of Solution&quot;</span>
		<span style="color: #800080;">$output</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPSolution <span style="color: pink;">-</span>Identity <span style="color: #800080;">$WSPFileName</span> <span style="color: #008080; font-style: italic;">-ErrorAction</span> Stop
	<span style="color: #000000;">&#125;</span>
	Catch
	<span style="color: #000000;">&#123;</span>
		<span style="color: #800080;">$DoesSolutionExists</span> <span style="color: pink;">=</span> <span style="color: #000080;">$_</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0000FF;">If</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$DoesSolutionExists</span> <span style="color: #FF0000;">-like</span> <span style="color: #800000;">&quot;*Cannot find an SPSolution*&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #FF0000;">-and</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$output</span>.Name <span style="color: #FF0000;">-notlike</span>  <span style="color: #800000;">&quot;*$WSPFileName*&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		Try
		<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> Green <span style="color: #800000;">&quot;Adding solution to farm&quot;</span>
			Add<span style="color: pink;">-</span>SPSolution <span style="color: #800000;">&quot;$WSPFullFileName&quot;</span> <span style="color: #008080; font-style: italic;">-Confirm</span>:<span style="color: #800080;">$false</span> <span style="color: #008080; font-style: italic;">-ErrorAction</span> Stop <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Out-Null</span>
&nbsp;
			<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;Checking Status of Solution&quot;</span>
			<span style="color: #800080;">$output</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPSolution <span style="color: pink;">-</span>Identity <span style="color: #800080;">$WSPFileName</span> <span style="color: #008080; font-style: italic;">-ErrorAction</span> Stop
			<span style="color: #800080;">$gobal</span> <span style="color: pink;">=</span> <span style="color: #800080;">$null</span>
			<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$output</span>.Deployed <span style="color: #FF0000;">-eq</span> <span style="color: #800080;">$false</span><span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				try
				<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> Green <span style="color: #800000;">&quot;Deploy solution to all Web Apps, will skip if this solution is globally deployed&quot;</span>
					Install<span style="color: pink;">-</span>SPSolution <span style="color: pink;">-</span>Identity <span style="color: #800000;">&quot;$WSPFileName&quot;</span> <span style="color: pink;">-</span>GACDeployment <span style="color: pink;">-</span>AllWebApplications <span style="color: #008080; font-style: italic;">-Force</span> <span style="color: #008080; font-style: italic;">-Confirm</span>:<span style="color: #800080;">$false</span> <span style="color: #008080; font-style: italic;">-ErrorAction</span> Stop <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Out-Null</span>
				<span style="color: #000000;">&#125;</span>
				Catch
				<span style="color: #000000;">&#123;</span>
					<span style="color: #800080;">$gobal</span> <span style="color: pink;">=</span> <span style="color: #000080;">$_</span>
				<span style="color: #000000;">&#125;</span>
				<span style="color: #0000FF;">If</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$gobal</span> <span style="color: #FF0000;">-like</span> <span style="color: #800000;">&quot;*This solution contains*&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;">-ForegroundColor</span> Green <span style="color: #800000;">&quot;Solution requires global deployment, Deploying now&quot;</span>
					Install<span style="color: pink;">-</span>SPSolution <span style="color: pink;">-</span>Identity <span style="color: #800000;">&quot;$WSPFileName&quot;</span> <span style="color: pink;">-</span>GACDeployment <span style="color: #008080; font-style: italic;">-Force</span> <span style="color: #008080; font-style: italic;">-Confirm</span>:<span style="color: #800080;">$false</span> <span style="color: #008080; font-style: italic;">-ErrorAction</span> Stop <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Out-Null</span>
				<span style="color: #000000;">&#125;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #008080; font-weight: bold;">Sleep</span> <span style="color: #804000;">1</span>
			<span style="color: #800080;">$dpjobs</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPTimerJob <span style="color: pink;">|</span> <span style="color: #0000FF;">Where</span> <span style="color: #000000;">&#123;</span> <span style="color: #000080;">$_</span>.Name <span style="color: #FF0000;">-like</span> <span style="color: #800000;">&quot;*$WSPFileName*&quot;</span> <span style="color: #000000;">&#125;</span>
			<span style="color: #0000FF;">If</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$dpjobs</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: #008080; font-weight: bold;">Write-Host</span> <span style="color: #008080; font-style: italic;">-ForegroundColor</span> Green <span style="color: #800000;">&quot;No solution deployment jobs found&quot;</span>
    		<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;">$dpjobs</span> <span style="color: #FF0000;">-is</span> <span style="color: #000000;">&#91;</span><span style="color: #008080;">Array</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>
				<span style="color: #000000;">&#123;</span>
					<span style="color: #0000FF;">Foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$job</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$dpjobs</span><span style="color: #000000;">&#41;</span>
					<span style="color: #000000;">&#123;</span>
						<span style="color: #800080;">$jobName</span> <span style="color: pink;">=</span> <span style="color: #800080;">$job</span>.Name
						<span style="color: #0000FF;">While</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>Get<span style="color: pink;">-</span>SPTimerJob <span style="color: #800080;">$jobName</span> <span style="color: #008080; font-style: italic;">-Debug</span>:<span style="color: #800080;">$false</span><span style="color: #000000;">&#41;</span> <span style="color: #FF0000;">-ne</span> <span style="color: #800080;">$null</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> Yellow <span style="color: #008080; font-style: italic;">-NoNewLine</span> <span style="color: #800000;">&quot;.&quot;</span>
							<span style="color: #008080; font-weight: bold;">Start-Sleep</span> <span style="color: #008080; font-style: italic;">-Seconds</span> <span style="color: #804000;">5</span>
						<span style="color: #000000;">&#125;</span>
						<span style="color: #008080; font-weight: bold;">Write-Host</span>
					<span style="color: #000000;">&#125;</span>
				<span style="color: #000000;">&#125;</span>
    			<span style="color: #0000FF;">Else</span>
    			<span style="color: #000000;">&#123;</span>
					<span style="color: #800080;">$jobName</span> <span style="color: pink;">=</span> <span style="color: #800080;">$dpjobs</span>.Name
					<span style="color: #0000FF;">While</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>Get<span style="color: pink;">-</span>SPTimerJob <span style="color: #800080;">$jobName</span> <span style="color: #008080; font-style: italic;">-Debug</span>:<span style="color: #800080;">$false</span><span style="color: #000000;">&#41;</span> <span style="color: #FF0000;">-ne</span> <span style="color: #800080;">$null</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> Yellow <span style="color: #008080; font-style: italic;">-NoNewLine</span> <span style="color: #800000;">&quot;.&quot;</span>
						<span style="color: #008080; font-weight: bold;">Start-Sleep</span> <span style="color: #008080; font-style: italic;">-Seconds</span> <span style="color: #804000;">5</span>
					<span style="color: #000000;">&#125;</span>
					<span style="color: #008080; font-weight: bold;">Write-Host</span>
    			<span style="color: #000000;">&#125;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
		Catch
		<span style="color: #000000;">&#123;</span>
			<span style="color: #008080; font-weight: bold;">Write-Error</span> <span style="color: #000080;">$_</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;Skipping $WSPFileName, Due to an error&quot;</span>
			<span style="color: #008080; font-weight: bold;">Read-Host</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0000FF;">Else</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #800080;">$skip</span> <span style="color: pink;">=</span> <span style="color: #800080;">$null</span>
		<span style="color: #800080;">$tryagain</span> <span style="color: pink;">=</span> <span style="color: #800080;">$null</span>
		Try
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$output</span>.Deployed <span style="color: #FF0000;">-eq</span> <span style="color: #800080;">$true</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> Green <span style="color: #800000;">&quot;Retracting Solution&quot;</span>
			Uninstall<span style="color: pink;">-</span>SPSolution <span style="color: pink;">-</span>AllWebApplications <span style="color: pink;">-</span>Identity <span style="color: #800080;">$WSPFileName</span> <span style="color: #008080; font-style: italic;">-Confirm</span>:<span style="color: #800080;">$false</span> <span style="color: #008080; font-style: italic;">-ErrorAction</span> Stop
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
		Catch
		<span style="color: #000000;">&#123;</span>
			<span style="color: #800080;">$tryagain</span> <span style="color: pink;">=</span> <span style="color: #000080;">$_</span>
		<span style="color: #000000;">&#125;</span>
		Try
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$tryagain</span> <span style="color: #FF0000;">-ne</span> <span style="color: #800080;">$null</span><span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				Uninstall<span style="color: pink;">-</span>SPSolution <span style="color: pink;">-</span>Identity <span style="color: #800080;">$WSPFileName</span> <span style="color: #008080; font-style: italic;">-Confirm</span>:<span style="color: #800080;">$false</span> <span style="color: #008080; font-style: italic;">-ErrorAction</span> Stop
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
		Catch
		<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;Could not Retract Solution&quot;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #008080; font-weight: bold;">Sleep</span> <span style="color: #804000;">1</span>
		<span style="color: #800080;">$dpjobs</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPTimerJob <span style="color: pink;">|</span> <span style="color: #0000FF;">Where</span> <span style="color: #000000;">&#123;</span> <span style="color: #000080;">$_</span>.Name <span style="color: #FF0000;">-like</span> <span style="color: #800000;">&quot;*$WSPFileName*&quot;</span> <span style="color: #000000;">&#125;</span>
		<span style="color: #0000FF;">If</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$dpjobs</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: #008080; font-weight: bold;">Write-Host</span> <span style="color: #008080; font-style: italic;">-ForegroundColor</span> Green <span style="color: #800000;">&quot;No solution deployment jobs found&quot;</span>
    	<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;">$dpjobs</span> <span style="color: #FF0000;">-is</span> <span style="color: #000000;">&#91;</span><span style="color: #008080;">Array</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #0000FF;">Foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$job</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$dpjobs</span><span style="color: #000000;">&#41;</span>
				<span style="color: #000000;">&#123;</span>
					<span style="color: #800080;">$jobName</span> <span style="color: pink;">=</span> <span style="color: #800080;">$job</span>.Name
					<span style="color: #0000FF;">While</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>Get<span style="color: pink;">-</span>SPTimerJob <span style="color: #800080;">$jobName</span> <span style="color: #008080; font-style: italic;">-Debug</span>:<span style="color: #800080;">$false</span><span style="color: #000000;">&#41;</span> <span style="color: #FF0000;">-ne</span> <span style="color: #800080;">$null</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> Yellow <span style="color: #008080; font-style: italic;">-NoNewLine</span> <span style="color: #800000;">&quot;.&quot;</span>
						<span style="color: #008080; font-weight: bold;">Start-Sleep</span> <span style="color: #008080; font-style: italic;">-Seconds</span> <span style="color: #804000;">5</span>
					<span style="color: #000000;">&#125;</span>
					<span style="color: #008080; font-weight: bold;">Write-Host</span>
				<span style="color: #000000;">&#125;</span>
			<span style="color: #000000;">&#125;</span>
    		<span style="color: #0000FF;">Else</span>
    		<span style="color: #000000;">&#123;</span>
				<span style="color: #800080;">$jobName</span> <span style="color: pink;">=</span> <span style="color: #800080;">$dpjobs</span>.Name
				<span style="color: #0000FF;">While</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>Get<span style="color: pink;">-</span>SPTimerJob <span style="color: #800080;">$jobName</span> <span style="color: #008080; font-style: italic;">-Debug</span>:<span style="color: #800080;">$false</span><span style="color: #000000;">&#41;</span> <span style="color: #FF0000;">-ne</span> <span style="color: #800080;">$null</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> Yellow <span style="color: #008080; font-style: italic;">-NoNewLine</span> <span style="color: #800000;">&quot;.&quot;</span>
					<span style="color: #008080; font-weight: bold;">Start-Sleep</span> <span style="color: #008080; font-style: italic;">-Seconds</span> <span style="color: #804000;">5</span>
				<span style="color: #000000;">&#125;</span>
				<span style="color: #008080; font-weight: bold;">Write-Host</span>
    		<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>		
&nbsp;
		Try
		<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> Green <span style="color: #800000;">&quot;Removing Solution from farm&quot;</span>
			Remove<span style="color: pink;">-</span>SPSolution <span style="color: pink;">-</span>Identity <span style="color: #800080;">$WSPFileName</span> <span style="color: #008080; font-style: italic;">-Confirm</span>:<span style="color: #800080;">$false</span> <span style="color: #008080; font-style: italic;">-ErrorAction</span> Stop
		<span style="color: #000000;">&#125;</span>
		Catch
		<span style="color: #000000;">&#123;</span>
			<span style="color: #800080;">$skip</span> <span style="color: pink;">=</span> <span style="color: #000080;">$_</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;Could not Remove Solution&quot;</span>
			<span style="color: #008080; font-weight: bold;">Read-Host</span>
		<span style="color: #000000;">&#125;</span>
		<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$skip</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>
			Try
			<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> Green <span style="color: #800000;">&quot;Adding solution to farm&quot;</span>
				Add<span style="color: pink;">-</span>SPSolution <span style="color: #800000;">&quot;$WSPFullFileName&quot;</span> <span style="color: #008080; font-style: italic;">-Confirm</span>:<span style="color: #800080;">$false</span> <span style="color: #008080; font-style: italic;">-ErrorAction</span> Stop <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Out-Null</span>
				<span style="color: #800080;">$gobal</span> <span style="color: pink;">=</span> <span style="color: #800080;">$null</span>
				try
				<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> Green <span style="color: #800000;">&quot;Deploy solution to all Web Apps, will skip if this solution is globally deployed&quot;</span>
					Install<span style="color: pink;">-</span>SPSolution <span style="color: pink;">-</span>Identity <span style="color: #800000;">&quot;$WSPFileName&quot;</span> <span style="color: pink;">-</span>GACDeployment <span style="color: pink;">-</span>AllWebApplications <span style="color: #008080; font-style: italic;">-Force</span> <span style="color: #008080; font-style: italic;">-Confirm</span>:<span style="color: #800080;">$false</span> <span style="color: #008080; font-style: italic;">-ErrorAction</span> Stop <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Out-Null</span>
				<span style="color: #000000;">&#125;</span>
				Catch
				<span style="color: #000000;">&#123;</span>
					<span style="color: #800080;">$gobal</span> <span style="color: pink;">=</span> <span style="color: #000080;">$_</span>
				<span style="color: #000000;">&#125;</span>
				<span style="color: #0000FF;">If</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$gobal</span> <span style="color: #FF0000;">-like</span> <span style="color: #800000;">&quot;*This solution contains*&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;">-ForegroundColor</span> Green <span style="color: #800000;">&quot;Solution requires global deployment, Deploying now&quot;</span>
					Install<span style="color: pink;">-</span>SPSolution <span style="color: pink;">-</span>Identity <span style="color: #800000;">&quot;$WSPFileName&quot;</span> <span style="color: pink;">-</span>GACDeployment <span style="color: #008080; font-style: italic;">-Force</span> <span style="color: #008080; font-style: italic;">-Confirm</span>:<span style="color: #800080;">$false</span> <span style="color: #008080; font-style: italic;">-ErrorAction</span> Stop <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Out-Null</span>
				<span style="color: #000000;">&#125;</span>
			<span style="color: #000000;">&#125;</span>
			Catch
			<span style="color: #000000;">&#123;</span>
				<span style="color: #008080; font-weight: bold;">Write-Error</span> <span style="color: #000080;">$_</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;Skipping $WSPFileName, Due to an error&quot;</span>
				<span style="color: #008080; font-weight: bold;">Read-Host</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #008080; font-weight: bold;">Sleep</span> <span style="color: #804000;">1</span>
			<span style="color: #800080;">$dpjobs</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPTimerJob <span style="color: pink;">|</span> <span style="color: #0000FF;">Where</span> <span style="color: #000000;">&#123;</span> <span style="color: #000080;">$_</span>.Name <span style="color: #FF0000;">-like</span> <span style="color: #800000;">&quot;*$WSPFileName*&quot;</span> <span style="color: #000000;">&#125;</span>
			<span style="color: #0000FF;">If</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$dpjobs</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: #008080; font-weight: bold;">Write-Host</span> <span style="color: #008080; font-style: italic;">-ForegroundColor</span> Green <span style="color: #800000;">&quot;No solution deployment jobs found&quot;</span>
    		<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;">$dpjobs</span> <span style="color: #FF0000;">-is</span> <span style="color: #000000;">&#91;</span><span style="color: #008080;">Array</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>
				<span style="color: #000000;">&#123;</span>
					<span style="color: #0000FF;">Foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$job</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$dpjobs</span><span style="color: #000000;">&#41;</span>
					<span style="color: #000000;">&#123;</span>
						<span style="color: #800080;">$jobName</span> <span style="color: pink;">=</span> <span style="color: #800080;">$job</span>.Name
						<span style="color: #0000FF;">While</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>Get<span style="color: pink;">-</span>SPTimerJob <span style="color: #800080;">$jobName</span> <span style="color: #008080; font-style: italic;">-Debug</span>:<span style="color: #800080;">$false</span><span style="color: #000000;">&#41;</span> <span style="color: #FF0000;">-ne</span> <span style="color: #800080;">$null</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> Yellow <span style="color: #008080; font-style: italic;">-NoNewLine</span> <span style="color: #800000;">&quot;.&quot;</span>
							<span style="color: #008080; font-weight: bold;">Start-Sleep</span> <span style="color: #008080; font-style: italic;">-Seconds</span> <span style="color: #804000;">5</span>
						<span style="color: #000000;">&#125;</span>
						<span style="color: #008080; font-weight: bold;">Write-Host</span>
					<span style="color: #000000;">&#125;</span>
				<span style="color: #000000;">&#125;</span>
    			<span style="color: #0000FF;">Else</span>
    			<span style="color: #000000;">&#123;</span>
					<span style="color: #800080;">$jobName</span> <span style="color: pink;">=</span> <span style="color: #800080;">$dpjobs</span>.Name
					<span style="color: #0000FF;">While</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>Get<span style="color: pink;">-</span>SPTimerJob <span style="color: #800080;">$jobName</span> <span style="color: #008080; font-style: italic;">-Debug</span>:<span style="color: #800080;">$false</span><span style="color: #000000;">&#41;</span> <span style="color: #FF0000;">-ne</span> <span style="color: #800080;">$null</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> Yellow <span style="color: #008080; font-style: italic;">-NoNewLine</span> <span style="color: #800000;">&quot;.&quot;</span>
						<span style="color: #008080; font-weight: bold;">Start-Sleep</span> <span style="color: #008080; font-style: italic;">-Seconds</span> <span style="color: #804000;">5</span>
					<span style="color: #000000;">&#125;</span>
					<span style="color: #008080; font-weight: bold;">Write-Host</span>
    			<span style="color: #000000;">&#125;</span>
			<span style="color: #000000;">&#125;</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;Cannot Install $WSPFileName, Please try manually&quot;</span>
		<span style="color: #008080; font-weight: bold;">Read-Host</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.isaacblum.com/2011/08/19/powershell-install-multiple-wsps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

