<?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: Split-Job: make your PC work harder</title>
	<atom:link href="http://www.jansveld.net/powershell/2008/06/split-job-version-0-9/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jansveld.net/powershell/2008/06/split-job-version-0-9/</link>
	<description>Observations and examples of PowerShell in the real world</description>
	<lastBuildDate>Thu, 08 Dec 2011 14:31:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tim</title>
		<link>http://www.jansveld.net/powershell/2008/06/split-job-version-0-9/comment-page-1/#comment-1005</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Tue, 16 Nov 2010 15:54:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansveld.net/powershell/?p=5#comment-1005</guid>
		<description>I really like this possibility, but I am so new at PS that while I understand the concept, I am still in the process of looking up commands and seeing what I can do.

I have PS script that gets eventlogs from about 150 computers.  It works, but is slow.  I want to incorporate the split-job function into my script but like I said, it is all new to me.

How do I manipulate your script to pull in what I have already written?

Thanks for helping out a newbie! :)</description>
		<content:encoded><![CDATA[<p>I really like this possibility, but I am so new at PS that while I understand the concept, I am still in the process of looking up commands and seeing what I can do.</p>
<p>I have PS script that gets eventlogs from about 150 computers.  It works, but is slow.  I want to incorporate the split-job function into my script but like I said, it is all new to me.</p>
<p>How do I manipulate your script to pull in what I have already written?</p>
<p>Thanks for helping out a newbie! <img src='http://www.jansveld.net/powershell/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Practical PowerShell &#187; Split-Job 0.92</title>
		<link>http://www.jansveld.net/powershell/2008/06/split-job-version-0-9/comment-page-1/#comment-11</link>
		<dc:creator>Practical PowerShell &#187; Split-Job 0.92</dc:creator>
		<pubDate>Fri, 20 Jun 2008 01:48:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansveld.net/powershell/?p=5#comment-11</guid>
		<description>[...] is an update to the Split-Job function. Based in part on some of the comments on the previous version, I made the following [...]</description>
		<content:encoded><![CDATA[<p>[...] is an update to the Split-Job function. Based in part on some of the comments on the previous version, I made the following [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.jansveld.net/powershell/2008/06/split-job-version-0-9/comment-page-1/#comment-9</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 10 Jun 2008 20:56:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansveld.net/powershell/?p=5#comment-9</guid>
		<description>Thanks for your comments Stephen. Originally I did use a ScriptBlock as the input command but I was trying to make the syntax a bit cleaner when you need a foreach. In version 0.8, the usage looked like this:

&quot;Server1&quot;,&quot;Server2&quot;,&quot;Server3&quot; &#124; Split-Job { c:\test.ps1 -Force }
&quot;Server1&quot;,&quot;Server2&quot;,&quot;Server3&quot; &#124; Split-Job { % {gwmi Win32_ComputerSystem -ComputerName $_} }

Please note that you cannot use &quot;foreach&quot; instead of &quot;%&quot; here. Let me know what you think - I will consider rolling this back for the next version. 

Regarding your earlier question about variables and profiles: I believe that is a common limitation when dealing with runspaces. I have not run into any situations where this was a problem (as long as you don&#039;t use custom aliases in your script, which you shouldn&#039;t anyway). I am planning to go into more detail about these pitfalls and how to avoid them in an upcoming post.

Cheers,
Arnoud</description>
		<content:encoded><![CDATA[<p>Thanks for your comments Stephen. Originally I did use a ScriptBlock as the input command but I was trying to make the syntax a bit cleaner when you need a foreach. In version 0.8, the usage looked like this:</p>
<p>&#034;Server1&#034;,&#034;Server2&#034;,&#034;Server3&#034; | Split-Job { c:\test.ps1 -Force }<br />
&#034;Server1&#034;,&#034;Server2&#034;,&#034;Server3&#034; | Split-Job { % {gwmi Win32_ComputerSystem -ComputerName $_} }</p>
<p>Please note that you cannot use &#034;foreach&#034; instead of &#034;%&#034; here. Let me know what you think &#8211; I will consider rolling this back for the next version. </p>
<p>Regarding your earlier question about variables and profiles: I believe that is a common limitation when dealing with runspaces. I have not run into any situations where this was a problem (as long as you don&#039;t use custom aliases in your script, which you shouldn&#039;t anyway). I am planning to go into more detail about these pitfalls and how to avoid them in an upcoming post.</p>
<p>Cheers,<br />
Arnoud</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Mills</title>
		<link>http://www.jansveld.net/powershell/2008/06/split-job-version-0-9/comment-page-1/#comment-8</link>
		<dc:creator>Stephen Mills</dc:creator>
		<pubDate>Tue, 10 Jun 2008 18:50:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansveld.net/powershell/?p=5#comment-8</guid>
		<description>How do you use Cmdlets with parameters?  I&#039;ve played with it for a while and realized that I can&#039;t easily use parameters on Cmdlets as a command for Split-Job.  I created a simple test.ps1 to demonstrate the issue.  The first example thinks that -Force is a parameter of Split-Job.  The second one doesn&#039;t process correctly for the pipeline, it doesn&#039;t see it as a pipeline.  The third one works, but is non-intuitive.  Example 4 also works, but could cause major headaches if you are already using both types of quotes.  

One possiblity that might work, would be to require a script block and then at least the second example would work.  You could also add a $Foreach switch parameter to do the same thing it currently does automatically if it is a scriptblock.  I think I would just use script blocks and not use the $Foreach switch parameter.  That way it is consistent with what it is replacing.  

File: C:\Test.ps1
#### Begin File ###
param ([switch]$Force)
process
{ if ($Force) {$_} }
#### End File ####

C:\&gt; &quot;Server1&quot;,&quot;Server2&quot;,&quot;Server3&quot; &#124; Split-Job c:\test.ps1 -Force 
C:\&gt; &quot;Server1&quot;,&quot;Server2&quot;,&quot;Server3&quot; &#124; Split-Job { c:\test.ps1 -Force }
C:\&gt; &quot;Server1&quot;,&quot;Server2&quot;,&quot;Server3&quot; &#124; Split-Job { $_ &#124; c:\test.ps1 -Force }
Server1
Server2
Server3
C:\&gt; &quot;Server1&quot;,&quot;Server2&quot;,&quot;Server3&quot; &#124; Split-Job &#039;c:\test.ps1 -Force&#039;
Server1
Server2
Server3

Thanks,

Stephen</description>
		<content:encoded><![CDATA[<p>How do you use Cmdlets with parameters?  I&#039;ve played with it for a while and realized that I can&#039;t easily use parameters on Cmdlets as a command for Split-Job.  I created a simple test.ps1 to demonstrate the issue.  The first example thinks that -Force is a parameter of Split-Job.  The second one doesn&#039;t process correctly for the pipeline, it doesn&#039;t see it as a pipeline.  The third one works, but is non-intuitive.  Example 4 also works, but could cause major headaches if you are already using both types of quotes.  </p>
<p>One possiblity that might work, would be to require a script block and then at least the second example would work.  You could also add a $Foreach switch parameter to do the same thing it currently does automatically if it is a scriptblock.  I think I would just use script blocks and not use the $Foreach switch parameter.  That way it is consistent with what it is replacing.  </p>
<p>File: C:\Test.ps1<br />
#### Begin File ###<br />
param ([switch]$Force)<br />
process<br />
{ if ($Force) {$_} }<br />
#### End File ####</p>
<p>C:\&gt; &#034;Server1&#034;,&#034;Server2&#034;,&#034;Server3&#034; | Split-Job c:\test.ps1 -Force<br />
C:\&gt; &#034;Server1&#034;,&#034;Server2&#034;,&#034;Server3&#034; | Split-Job { c:\test.ps1 -Force }<br />
C:\&gt; &#034;Server1&#034;,&#034;Server2&#034;,&#034;Server3&#034; | Split-Job { $_ | c:\test.ps1 -Force }<br />
Server1<br />
Server2<br />
Server3<br />
C:\&gt; &#034;Server1&#034;,&#034;Server2&#034;,&#034;Server3&#034; | Split-Job &#039;c:\test.ps1 -Force&#039;<br />
Server1<br />
Server2<br />
Server3</p>
<p>Thanks,</p>
<p>Stephen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: karl prosser</title>
		<link>http://www.jansveld.net/powershell/2008/06/split-job-version-0-9/comment-page-1/#comment-4</link>
		<dc:creator>karl prosser</dc:creator>
		<pubDate>Sat, 07 Jun 2008 04:42:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansveld.net/powershell/?p=5#comment-4</guid>
		<description>this looks like a keeper. will have to look into it more.</description>
		<content:encoded><![CDATA[<p>this looks like a keeper. will have to look into it more.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Mills</title>
		<link>http://www.jansveld.net/powershell/2008/06/split-job-version-0-9/comment-page-1/#comment-3</link>
		<dc:creator>Stephen Mills</dc:creator>
		<pubDate>Fri, 06 Jun 2008 20:47:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansveld.net/powershell/?p=5#comment-3</guid>
		<description>Looks like a good script.  I&#039;ll probably use it some.  Is there anyway to duplicate your current environment in the runspaces?  Sometimes you have variables you&#039;d like to reference and profiles you need to have loaded.

You might want to check the $Pipelines.Count again before the start-sleep.  That way it wouldn&#039;t pause once more after it is done.

Thanks</description>
		<content:encoded><![CDATA[<p>Looks like a good script.  I&#039;ll probably use it some.  Is there anyway to duplicate your current environment in the runspaces?  Sometimes you have variables you&#039;d like to reference and profiles you need to have loaded.</p>
<p>You might want to check the $Pipelines.Count again before the start-sleep.  That way it wouldn&#039;t pause once more after it is done.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

