<?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 for PowerShell.nu</title>
	<atom:link href="http://www.powershell.nu/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.powershell.nu</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>Comment on Try/Catch/Finally by Niklas Goude</title>
		<link>http://www.powershell.nu/2011/03/14/trycatchfinally/comment-page-1/#comment-9747</link>
		<dc:creator>Niklas Goude</dc:creator>
		<pubDate>Fri, 03 Feb 2012 09:00:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=1126#comment-9747</guid>
		<description>Remove-Item somepath.exe -ErrorAction Stop</description>
		<content:encoded><![CDATA[<p>Remove-Item somepath.exe -ErrorAction Stop</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on MOSS 2007 Script Collection 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>Comment on Insert a Page Break in a Word Document using PowerShell by Siva</title>
		<link>http://www.powershell.nu/2009/03/15/insert-a-page-break-in-a-word-document-using-powershell/comment-page-1/#comment-9743</link>
		<dc:creator>Siva</dc:creator>
		<pubDate>Wed, 25 Jan 2012 06:35:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=557#comment-9743</guid>
		<description>Hi,

I am getting the following error, when I tried to replace a string using the above code. I am trying a replace a variable with value ( which has around 20 lines). Any suggestion. Could you please let me what is the above code ?(.Net or VBA etc)

PS C:\&gt; C:\local\Powershell\File1.ps1
Exception calling &quot;Execute&quot; with &quot;11&quot; argument(s): &quot;String parameter too long.&quot;
At C:\local\Powershell\File1.ps1:24 char:25
+     $Selection.Find.Execute &lt;&lt;&lt;</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am getting the following error, when I tried to replace a string using the above code. I am trying a replace a variable with value ( which has around 20 lines). Any suggestion. Could you please let me what is the above code ?(.Net or VBA etc)</p>
<p>PS C:\&gt; C:\local\Powershell\File1.ps1<br />
Exception calling &#8220;Execute&#8221; with &#8220;11&#8243; argument(s): &#8220;String parameter too long.&#8221;<br />
At C:\local\Powershell\File1.ps1:24 char:25<br />
+     $Selection.Find.Execute &lt;&lt;&lt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Drop Down menu using Windows.Forms by eric</title>
		<link>http://www.powershell.nu/2009/01/21/dropdown-menu-using-windowsforms/comment-page-1/#comment-9742</link>
		<dc:creator>eric</dc:creator>
		<pubDate>Wed, 25 Jan 2012 00:54:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=370#comment-9742</guid>
		<description>Ok, can you read from an item from a drop down, that the user typed in? 
For example, if I have your list of options, and they type in a new one, can I get that info?</description>
		<content:encoded><![CDATA[<p>Ok, can you read from an item from a drop down, that the user typed in?<br />
For example, if I have your list of options, and they type in a new one, can I get that info?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Migrate From Windows Server 2003 to Windows Server 2008 R2 and Windows 7 Using PowerShell by Chris</title>
		<link>http://www.powershell.nu/2009/04/11/part-00-migrate-from-windows-server-2003-to-windows-server-2008-r2-and-windows-7-using-powershell/comment-page-1/#comment-9741</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 24 Jan 2012 10:19:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=597#comment-9741</guid>
		<description>Hey,

First I&#039;d like to thank you for all the work you&#039;ve done. Great job with these scripts, they are really helpful.
That being said, I was wondering if you will do the scripts for the Windows 2008 R2 part?
I could really use them as I&#039;m currently on a projet very similar to your scenario.

Any answer would be greatly appreciated.

Thanks in advance
Chris</description>
		<content:encoded><![CDATA[<p>Hey,</p>
<p>First I&#8217;d like to thank you for all the work you&#8217;ve done. Great job with these scripts, they are really helpful.<br />
That being said, I was wondering if you will do the scripts for the Windows 2008 R2 part?<br />
I could really use them as I&#8217;m currently on a projet very similar to your scenario.</p>
<p>Any answer would be greatly appreciated.</p>
<p>Thanks in advance<br />
Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Replacing text in Word documents through PowerShell by Siva</title>
		<link>http://www.powershell.nu/2009/02/05/replacing-text-in-word-documents-through-powershell/comment-page-1/#comment-9740</link>
		<dc:creator>Siva</dc:creator>
		<pubDate>Mon, 23 Jan 2012 05:13:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=413#comment-9740</guid>
		<description>I am getting the following error when I tried to replace a string. Basically I am trying to replace a string with a value( it has 15 to 20 lines of statements)


Exception calling &quot;Execute&quot; with &quot;11&quot; argument(s): &quot;String parameter too long.&quot;
At C:\local\powershell\File1.ps1:24 char:25
+     $Selection.Find.Execute &lt;&lt;&lt;&lt; (
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation</description>
		<content:encoded><![CDATA[<p>I am getting the following error when I tried to replace a string. Basically I am trying to replace a string with a value( it has 15 to 20 lines of statements)</p>
<p>Exception calling &#8220;Execute&#8221; with &#8220;11&#8243; argument(s): &#8220;String parameter too long.&#8221;<br />
At C:\local\powershell\File1.ps1:24 char:25<br />
+     $Selection.Find.Execute &lt;&lt;&lt;&lt; (<br />
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException<br />
    + FullyQualifiedErrorId : ComMethodTargetInvocation</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Adding Ou Structure using Powershell by M P</title>
		<link>http://www.powershell.nu/2009/04/13/part-11-adding-ou-structure-using-powershell/comment-page-1/#comment-9739</link>
		<dc:creator>M P</dc:creator>
		<pubDate>Fri, 13 Jan 2012 04:09:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=626#comment-9739</guid>
		<description>This isto pretty stalrr, but if youthat are still trying to figure it out. You added an extra $ in front of ou=Department while setting it initially.  Here is the corrected line.

$Department = $NewOU2.Create(“OrganizationalUnit”, “ou=Department”)</description>
		<content:encoded><![CDATA[<p>This isto pretty stalrr, but if youthat are still trying to figure it out. You added an extra $ in front of ou=Department while setting it initially.  Here is the corrected line.</p>
<p>$Department = $NewOU2.Create(“OrganizationalUnit”, “ou=Department”)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PowerShell &amp; SCCM &#8211; Packages by NickolajA</title>
		<link>http://www.powershell.nu/2010/10/07/powershell-sccm-packages/comment-page-1/#comment-9735</link>
		<dc:creator>NickolajA</dc:creator>
		<pubDate>Tue, 27 Dec 2011 09:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=1043#comment-9735</guid>
		<description>Hi,

I&#039;m trying to follow this guide to change the description of a package. When I&#039;m supposed to commit the changes by typing &#039;$pkgAdobe.Put()&#039; I get the following error: 

Method invocation failed because [Selected.System.Management.ManagementObject] doesn&#039;t contain a method named &#039;Put&#039;

Any idea why?

Regards,
NickolajA</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m trying to follow this guide to change the description of a package. When I&#8217;m supposed to commit the changes by typing &#8216;$pkgAdobe.Put()&#8217; I get the following error: </p>
<p>Method invocation failed because [Selected.System.Management.ManagementObject] doesn&#8217;t contain a method named &#8216;Put&#8217;</p>
<p>Any idea why?</p>
<p>Regards,<br />
NickolajA</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on MOSS 2007 Script Collection 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>Comment on Try/Catch/Finally by Conrad</title>
		<link>http://www.powershell.nu/2011/03/14/trycatchfinally/comment-page-1/#comment-9730</link>
		<dc:creator>Conrad</dc:creator>
		<pubDate>Wed, 14 Dec 2011 20:29:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershell.nu/?p=1126#comment-9730</guid>
		<description>I have used try/catch before without any issues, so I am not sure what is going on here...

 

Try{

remove-item \\$name\c$\windows\temp\filename.exe}

Catch {Write &quot;Not able to access files on $name&quot;}

 

It always throws an error for the remove-item and it never catches it.... Am I missing something simple?</description>
		<content:encoded><![CDATA[<p>I have used try/catch before without any issues, so I am not sure what is going on here&#8230;</p>
<p>Try{</p>
<p>remove-item \\$name\c$\windows\temp\filename.exe}</p>
<p>Catch {Write &#8220;Not able to access files on $name&#8221;}</p>
<p>It always throws an error for the remove-item and it never catches it&#8230;. Am I missing something simple?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

