<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: MOSS 2007 Script Collection</title>
	<atom:link href="http://www.powershell.nu/2009/09/08/moss-2007-script-collection/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.powershell.nu/2009/09/08/moss-2007-script-collection/</link>
	<description>Windows PowerShell</description>
	<lastBuildDate>Fri, 03 Feb 2012 09:00:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Des</title>
		<link>http://www.powershell.nu/2009/09/08/moss-2007-script-collection/comment-page-1/#comment-9746</link>
		<dc:creator>Des</dc:creator>
		<pubDate>Wed, 01 Feb 2012 15:49:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=857#comment-9746</guid>
		<description>Hi Niklas, I wondered if you&#039;d ever tried to change the value of the NoCrawl property on a SP List from $true to $false using PowerShell in a MOSS 2007 Document Library? I&#039;ve been trying it and haven&#039;t been able to acheive it... I attach an extract of my code below

$site = New-Object Microsoft.SharePoint.SPSite($url)
$web = $site.OpenWeb()
$doclib = $web.Lists[$list]
$doclib.NoCrawl = $false
$web.Dispose()
$site.Dispose()

This runs without error or exception, but has no effect on the value of NoCrawl. I tried adding $doclib.Update() immediately after setting the value of $doclib.NoCrawl, but that results in an exception as below...

Exception calling &quot;Update&quot; with &quot;0&quot; argument(s): &quot;Object reference not set to an instance of an object.&quot;

Any suggestions?</description>
		<content:encoded><![CDATA[<p>Hi Niklas, I wondered if you&#8217;d ever tried to change the value of the NoCrawl property on a SP List from $true to $false using PowerShell in a MOSS 2007 Document Library? I&#8217;ve been trying it and haven&#8217;t been able to acheive it&#8230; I attach an extract of my code below</p>
<p>$site = New-Object Microsoft.SharePoint.SPSite($url)<br />
$web = $site.OpenWeb()<br />
$doclib = $web.Lists[$list]<br />
$doclib.NoCrawl = $false<br />
$web.Dispose()<br />
$site.Dispose()</p>
<p>This runs without error or exception, but has no effect on the value of NoCrawl. I tried adding $doclib.Update() immediately after setting the value of $doclib.NoCrawl, but that results in an exception as below&#8230;</p>
<p>Exception calling &#8220;Update&#8221; with &#8220;0&#8243; argument(s): &#8220;Object reference not set to an instance of an object.&#8221;</p>
<p>Any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey</title>
		<link>http://www.powershell.nu/2009/09/08/moss-2007-script-collection/comment-page-1/#comment-9734</link>
		<dc:creator>Sergey</dc:creator>
		<pubDate>Thu, 22 Dec 2011 13:59:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=857#comment-9734</guid>
		<description>Hi Niklas! Thanks a lot for this great work. 
I have some error after executing Get-SPList function. It return the number of items in a list and bellow the number is the error. It seems it doesn&#039;t matter on anything but just wanted to ask if it can be resolved.

PS C:\&gt; $SPList = Get-SPList -url http://project/PWA/TestSite -List Test2; $SPList.ItemCount; $SPList.Dispose()

2
[Microsoft.SharePoint.SPList] doesn&#039;t contain method called &quot;Dispose&quot;
$SPList.Dispose &lt;&lt;&lt;&lt; ()
    + CategoryInfo          : InvalidOperation: (Dispose:String) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound</description>
		<content:encoded><![CDATA[<p>Hi Niklas! Thanks a lot for this great work.<br />
I have some error after executing Get-SPList function. It return the number of items in a list and bellow the number is the error. It seems it doesn&#8217;t matter on anything but just wanted to ask if it can be resolved.</p>
<p>PS C:\&gt; $SPList = Get-SPList -url <a href="http://project/PWA/TestSite" rel="nofollow">http://project/PWA/TestSite</a> -List Test2; $SPList.ItemCount; $SPList.Dispose()</p>
<p>2<br />
[Microsoft.SharePoint.SPList] doesn&#8217;t contain method called &#8220;Dispose&#8221;<br />
$SPList.Dispose &lt;&lt;&lt;&lt; ()<br />
    + CategoryInfo          : InvalidOperation: (Dispose:String) [], RuntimeException<br />
    + FullyQualifiedErrorId : MethodNotFound</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith</title>
		<link>http://www.powershell.nu/2009/09/08/moss-2007-script-collection/comment-page-1/#comment-9028</link>
		<dc:creator>Keith</dc:creator>
		<pubDate>Wed, 24 Aug 2011 19:42:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=857#comment-9028</guid>
		<description>&lt;a href=&quot;#comment-8306&quot; rel=&quot;nofollow&quot;&gt;@Asys  &lt;/a&gt; 

You have to run these from a sharepoint server</description>
		<content:encoded><![CDATA[<p><a href="#comment-8306" rel="nofollow">@Asys  </a> </p>
<p>You have to run these from a sharepoint server</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Asys</title>
		<link>http://www.powershell.nu/2009/09/08/moss-2007-script-collection/comment-page-1/#comment-8306</link>
		<dc:creator>Asys</dc:creator>
		<pubDate>Thu, 28 Jul 2011 21:12:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=857#comment-8306</guid>
		<description>Niklas, the scripts did not work for me on SP 2007. I get the following error:
New-Object : Cannot find type [Microsoft.SharePoint.SPSite]: make sure the assembly containing this type is loaded.
+     New-Object &lt;&lt;&lt;&lt;  Microsoft.SharePoint.SPSite($url)
    + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentExcepti 
   on
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewOb 
   jectCommand</description>
		<content:encoded><![CDATA[<p>Niklas, the scripts did not work for me on SP 2007. I get the following error:<br />
New-Object : Cannot find type [Microsoft.SharePoint.SPSite]: make sure the assembly containing this type is loaded.<br />
+     New-Object &lt;&lt;&lt;&lt;  Microsoft.SharePoint.SPSite($url)<br />
    + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentExcepti<br />
   on<br />
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewOb<br />
   jectCommand</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Suheil</title>
		<link>http://www.powershell.nu/2009/09/08/moss-2007-script-collection/comment-page-1/#comment-5929</link>
		<dc:creator>Suheil</dc:creator>
		<pubDate>Mon, 23 May 2011 02:59:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=857#comment-5929</guid>
		<description>Hi

Do we have any built-in out-of-the-box cmdlets in powershell for MOSS 2007 like we have for SP2010?</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Do we have any built-in out-of-the-box cmdlets in powershell for MOSS 2007 like we have for SP2010?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://www.powershell.nu/2009/09/08/moss-2007-script-collection/comment-page-1/#comment-4874</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Fri, 25 Feb 2011 18:48:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=857#comment-4874</guid>
		<description>Hello,
The function there are amazing! thx
I am working on a Powershell script to change &#039;&#039;Created By&#039;&#039; and &#039;&#039;Created Date&#039;&#039; from a list of type discussion board in MOSS2007.
When I use the Get-SPItem and use the -All switch it work great. When I filter by ID (taken from the previous command result) it works fine. When I search by Title and Name taken from the 1st result list it does not find it. It could be useful for me by subject/Title as I do not have the ID for my search. The second problem is having error when updating fields. thx for help</description>
		<content:encoded><![CDATA[<p>Hello,<br />
The function there are amazing! thx<br />
I am working on a Powershell script to change &#8221;Created By&#8221; and &#8221;Created Date&#8221; from a list of type discussion board in MOSS2007.<br />
When I use the Get-SPItem and use the -All switch it work great. When I filter by ID (taken from the previous command result) it works fine. When I search by Title and Name taken from the 1st result list it does not find it. It could be useful for me by subject/Title as I do not have the ID for my search. The second problem is having error when updating fields. thx for help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jas</title>
		<link>http://www.powershell.nu/2009/09/08/moss-2007-script-collection/comment-page-1/#comment-4873</link>
		<dc:creator>Jas</dc:creator>
		<pubDate>Thu, 24 Feb 2011 17:35:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=857#comment-4873</guid>
		<description>Any idea on calling moss search web service through PowerShell?</description>
		<content:encoded><![CDATA[<p>Any idea on calling moss search web service through PowerShell?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sangeet Ahuja</title>
		<link>http://www.powershell.nu/2009/09/08/moss-2007-script-collection/comment-page-1/#comment-4827</link>
		<dc:creator>Sangeet Ahuja</dc:creator>
		<pubDate>Sat, 29 Jan 2011 08:56:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=857#comment-4827</guid>
		<description>Thanks very much for this compendium.

A small question : Is there a script to create Site collections ?</description>
		<content:encoded><![CDATA[<p>Thanks very much for this compendium.</p>
<p>A small question : Is there a script to create Site collections ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cliff</title>
		<link>http://www.powershell.nu/2009/09/08/moss-2007-script-collection/comment-page-1/#comment-4769</link>
		<dc:creator>Cliff</dc:creator>
		<pubDate>Tue, 14 Dec 2010 14:59:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=857#comment-4769</guid>
		<description>Thank you very much for these. I have learned a lot from reading your code. I am having a problem with the Add-SPListViewWebPart.ps1 that I hope you can help with. I get the following error when I run it:

Exception calling &quot;AddWebPart&quot; with &quot;3&quot; argument(s): &quot;This page has encountered a cri
tical error. Contact your system administrator if this problem persists.&quot;
At line:74 char:28
+     $WebPartManager.AddWebPart &lt;&lt;&lt;&lt; ($ListViewWebPart,$Zone,$Index)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException</description>
		<content:encoded><![CDATA[<p>Thank you very much for these. I have learned a lot from reading your code. I am having a problem with the Add-SPListViewWebPart.ps1 that I hope you can help with. I get the following error when I run it:</p>
<p>Exception calling &#8220;AddWebPart&#8221; with &#8220;3&#8243; argument(s): &#8220;This page has encountered a cri<br />
tical error. Contact your system administrator if this problem persists.&#8221;<br />
At line:74 char:28<br />
+     $WebPartManager.AddWebPart &lt;&lt;&lt;&lt; ($ListViewWebPart,$Zone,$Index)<br />
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException<br />
    + FullyQualifiedErrorId : DotNetMethodException</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blog Post: Emptying the Second Stage Recycle Bin in SharePoint 2007 &#124; IT.beta</title>
		<link>http://www.powershell.nu/2009/09/08/moss-2007-script-collection/comment-page-1/#comment-4661</link>
		<dc:creator>Blog Post: Emptying the Second Stage Recycle Bin in SharePoint 2007 &#124; IT.beta</dc:creator>
		<pubDate>Fri, 29 Oct 2010 23:04:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=857#comment-4661</guid>
		<description>[...] If you want to see the problem in action, then try this PowerShell script.&#160; I am leveraging the Get-SPWeb cmdlet from PowerShell.nu’s MOSS 2007 Script Collection. [...]</description>
		<content:encoded><![CDATA[<p>[...] If you want to see the problem in action, then try this PowerShell script.&#160; I am leveraging the Get-SPWeb cmdlet from PowerShell.nu’s MOSS 2007 Script Collection. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

