<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Dmitry's PowerBlog: PowerShell and beyond &#187; Knowledge Base</title>
	<atom:link href="http://dmitrysotnikov.wordpress.com/category/knowledge-base/feed/" rel="self" type="application/rss+xml" />
	<link>http://dmitrysotnikov.wordpress.com</link>
	<description>Dmitry Sotnikov's view on PowerShell, PowerGUI and everything he sees around</description>
	<lastBuildDate>Mon, 30 Nov 2009 11:00:31 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='dmitrysotnikov.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/930c8793b5aed06d07140b3be0db9d23?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Dmitry's PowerBlog: PowerShell and beyond &#187; Knowledge Base</title>
		<link>http://dmitrysotnikov.wordpress.com</link>
	</image>
			<item>
		<title>Set -WhatIf ON by default</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/09/17/set-whatif-on-by-default/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/09/17/set-whatif-on-by-default/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 10:36:43 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[KB]]></category>
		<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1527</guid>
		<description><![CDATA[Making PowerShell safe by default is trivial. Ulf here suggested that &#8220;socially responsible&#8221; PowerShell needs to use -WhatIf by default for all operations, and actually perform the actions only if explicitly asked to do so.
To make PowerShell operate in this mode, all you need to do is set $WhatIfPreference variable to $true, and use -WhatIf:$false [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1527&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Making PowerShell safe by default is trivial. Ulf <a href="http://msmvps.com/blogs/ulfbsimonweidner/archive/2009/09/15/powershell-s-social-responsibility.aspx">here</a> suggested that &#8220;socially responsible&#8221; PowerShell needs to use -WhatIf by default for all operations, and actually perform the actions only if explicitly asked to do so.</p>
<p>To make PowerShell operate in this mode, all you need to do is set <code>$WhatIfPreference</code> variable to $true, and use <code>-WhatIf:$false</code> when you do want something to be executed. (colon is mandatory by the way &#8211; because this is a switch parameter).</p>
<p>Here&#8217;s my session (copy/pasted from PowerShell Console pane of <a href="http://powergui.org">PowerGUI Script Editor</a>):</p>
<pre><code>C:\&gt; $WhatIfPreference</code>
<code>False</code>
<code>C:\&gt; $WhatIfPreference = $true</code>
<code>C:\&gt; $WhatIfPreference</code>
<code>True</code>
<code>C:\&gt; Get-Process notepad</code>
<code></code>
<code>Handles  NPM(K)  PM(K)   WS(K)  Id  ProcessName</code>
<code>-------  ------  -----   -----  --  -----------</code>
<code>     63       3   2372    6668  66      notepad</code>
<code></code>
<code></code>
<code>C:\&gt; Get-Process notepad | Stop-Process</code>
<code>What if: Performing operation "Stop-Process" on Target "notepad (4708)".</code>
<code>C:\&gt; Get-Process notepad | Stop-Process -WhatIf:$false</code></pre>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/KB" target="_blank" rel="tag" title="Link to Technorati Tag category for KB">KB</a>, <a href="http://www.technorati.com/tag/Knowledge+Base" target="_blank" rel="tag" title="Link to Technorati Tag category for Knowledge Base">Knowledge Base</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F17%2Fset%2Dwhatif%2Don%2Dby%2Ddefault%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F17%2Fset%2Dwhatif%2Don%2Dby%2Ddefault%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F17%2Fset%2Dwhatif%2Don%2Dby%2Ddefault%2F;title=Set%20%2DWhatIf%20ON%20by%20default" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=Set%20%2DWhatIf%20ON%20by%20default&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F17%2Fset%2Dwhatif%2Don%2Dby%2Ddefault%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F17%2Fset%2Dwhatif%2Don%2Dby%2Ddefault%2F&amp;Title=Set%20%2DWhatIf%20ON%20by%20default" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F17%2Fset%2Dwhatif%2Don%2Dby%2Ddefault%2F&amp;title=Set%20%2DWhatIf%20ON%20by%20default" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F17%2Fset%2Dwhatif%2Don%2Dby%2Ddefault%2F&amp;title=Set%20%2DWhatIf%20ON%20by%20default" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=Set%20%2DWhatIf%20ON%20by%20default&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F17%2Fset%2Dwhatif%2Don%2Dby%2Ddefault%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1527/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1527&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/09/17/set-whatif-on-by-default/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>Fastest way to retrieve AD objects</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/09/10/fastest-way-to-retrieve-ad-objects/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/09/10/fastest-way-to-retrieve-ad-objects/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 20:01:08 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[AD cmdlets]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[KB]]></category>
		<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1513</guid>
		<description><![CDATA[DontUseDefaultIncludedProperties is the AD cmdlets parameter you need when you want to get AD objects fast without extra properties you do not need. For example, I have just used it in my script to locate the largest groups in our Active Directory. Let&#8217;s talk about how effective it really is and how it works under [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1513&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><code>DontUseDefaultIncludedProperties</code> is the AD cmdlets parameter you need when you want to get AD objects fast without extra properties you do not need. For example, I have just used it in my script to <a href="http://dmitrysotnikov.wordpress.com/2009/09/08/find-large-ad-groups/">locate the largest groups in our Active Directory</a>. Let&#8217;s talk about how effective it really is and how it works under the covers.</p>
<p>First, of all, let me prove that it is indeed very efficient. Here&#8217;s the same Get-QADUser run 100 times with and without the parameter:</p>
<p><code>[PS] C:\&gt;Measure-Command { for ($i=0;$i -lt 100;$i++) { $a = Get-QADUser -SamAccountName dsotnikov -<strong>DontUseDefaultIncludedProperties</strong> } }</code><br />
<code></code><br />
<code>...</code><br />
<code>Seconds           : 3</code><br />
<code>Milliseconds      : 951</code><br />
<code>...</code><br />
<code></code><br />
<code></code><br />
<code>[PS] C:\&gt;Measure-Command { for ($i=0;$i -lt 100;$i++) { $a = Get-QADUser -SamAccountName dsotnikov } }</code><br />
<code></code><br />
<code>...</code><br />
<code>Seconds           : 7</code><br />
<code>Milliseconds      : 526</code><br />
<code>...</code></p>
<p>That&#8217;s twice as fast with the parameter than it is without it!</p>
<p>Why? Because <code>DontUseDefaultIncludedProperties</code> makes the cmdlet only retrieve 2 attributes: <code>distinguishedName</code> и <code>objectClass</code>, whereas the cmdlet without it will go get quite a few other properties.</p>
<p>You can easily see which attributes got retrieved by running:<br />
<code>$a = Get-QADUser -SamAccountName dsotnikov -DontUseDefaultIncludedProperties</code><br />
<code>$a.Cache.AttributesInCache</code></p>
<p>The interesting thing is that the cmdlet is even smarter with subsequent use of the object. For most properties (to be specific, for all regular .NET properties of the object but not PowerShell dynamic NoteProperties), we will go and retrieve the property once you request it later on. E.g. this will actually work and give you the account description:</p>
<p><code>$a = Get-QADUser -SamAccountName dsotnikov -DontUseDefaultIncludedProperties</code><br />
<code>$a.Description</code></p>
<p>And this will retrieve a whole bunch of attributes:<br />
<code>Get-QADUser -SamAccountName dsotnikov -DontUseDefaultIncludedProperties | Format-List *</code></p>
<p>You can obviously keep using <code>$a.Cache.AttributesInCache</code> to check which ones we retrieve.</p>
<p>Pretty cool, isn&#8217;t it?</p>
<p>The only other thing I would note is the difference between:</p>
<p><code>Get-QADUser <strong>-SamAccountName </strong>dsotnikov -DontUseDefaultIncludedProperties</code></p>
<p>and</p>
<p><code>Get-QADUser dsotnikov -DontUseDefaultIncludedProperties</code></p>
<p>The former is way more efficient than the latter because the <code>-SamAccountName</code> parameter (or any other parameter besides the generic implied <code>-Identity</code>) lets us optimize the query specifically to search by that attribute rather than do the <a href="http://support.microsoft.com/kb/243299">Ambiguous Name Resolution</a> which we use otherwise. Be specific in your parameters and we will give you the fastest results!</p>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/AD" target="_blank" rel="tag" title="Link to Technorati Tag category for AD">AD</a>, <a href="http://www.technorati.com/tag/AD+cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for AD cmdlets">AD cmdlets</a>, <a href="http://www.technorati.com/tag/Active+Directory" target="_blank" rel="tag" title="Link to Technorati Tag category for Active Directory">Active Directory</a>, <a href="http://www.technorati.com/tag/Examples" target="_blank" rel="tag" title="Link to Technorati Tag category for Examples">Examples</a>, <a href="http://www.technorati.com/tag/KB" target="_blank" rel="tag" title="Link to Technorati Tag category for KB">KB</a>, <a href="http://www.technorati.com/tag/Knowledge+Base" target="_blank" rel="tag" title="Link to Technorati Tag category for Knowledge Base">Knowledge Base</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F10%2Ffastest%2Dway%2Dto%2Dretrieve%2Dad%2Dobjects%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F10%2Ffastest%2Dway%2Dto%2Dretrieve%2Dad%2Dobjects%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F10%2Ffastest%2Dway%2Dto%2Dretrieve%2Dad%2Dobjects%2F;title=Fastest%20way%20to%20retrieve%20AD%20objects" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=Fastest%20way%20to%20retrieve%20AD%20objects&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F10%2Ffastest%2Dway%2Dto%2Dretrieve%2Dad%2Dobjects%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F10%2Ffastest%2Dway%2Dto%2Dretrieve%2Dad%2Dobjects%2F&amp;Title=Fastest%20way%20to%20retrieve%20AD%20objects" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F10%2Ffastest%2Dway%2Dto%2Dretrieve%2Dad%2Dobjects%2F&amp;title=Fastest%20way%20to%20retrieve%20AD%20objects" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F10%2Ffastest%2Dway%2Dto%2Dretrieve%2Dad%2Dobjects%2F&amp;title=Fastest%20way%20to%20retrieve%20AD%20objects" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=Fastest%20way%20to%20retrieve%20AD%20objects&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F09%2F10%2Ffastest%2Dway%2Dto%2Dretrieve%2Dad%2Dobjects%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1513/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1513/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1513/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1513/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1513/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1513/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1513/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1513/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1513/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1513/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1513&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/09/10/fastest-way-to-retrieve-ad-objects/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>Catch variable typos</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/07/08/catch-variable-typos/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/07/08/catch-variable-typos/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 10:00:17 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[IDE]]></category>
		<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[PowerGUI]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1373</guid>
		<description><![CDATA[Did you know that PowerShell has so called strict mode in which it can catch and report any use of uninitialized variables? I&#8217;ve started doing this while scripting and it made debugging scripts so much easier! Lot&#8217;s of typos and copy/paste issues simply get detected right away.
In PowerShell v1 you can turn this mode on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1373&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Did you know that PowerShell has so called strict mode in which it can catch and report any use of uninitialized variables? I&#8217;ve started doing this while scripting and it made debugging scripts so much easier! Lot&#8217;s of typos and copy/paste issues simply get detected right away.</p>
<p>In PowerShell v1 you can turn this mode on by executing: <code>Set-PSDebug –strict</code></p>
<p>In PowerShell v2 by doing: <code>Set-StrictMode –version 1</code> or <code>Set-StrictMode –version 2</code>.</p>
<p>(See <a href="http://www.microsoft.com/technet/scriptcenter/topics/winpsh/strictmode.mspx">this great article</a> explaining all the difference.)</p>
<p>To make this apply to all my debugging sessions, but not to command line and PowerGUI admin console, I did the following:</p>
<p>1. Opened my PowerShell profile:</p>
<p><img src="http://dmitrysotnikov.files.wordpress.com/2009/07/open-profile.png?w=252&#038;h=345" alt="Open-Profile" title="Open-Profile" width="252" height="345" class="aligncenter size-full wp-image-1374" /></p>
<p>2. Added this code in there:</p>
<pre><span style="color:#0000FF;">if</span><span style="color:#000000;"> (</span><span style="color:#800080;">$host</span><span style="color:#000000;">.</span><span style="color:#8B4513;">Name</span><span style="color:#000000;"> </span><span style="color:#FF0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;">PowerGUIScriptEditorHost</span><span style="color:#800000;">'</span><span style="color:#000000;">) {
    </span><span style="color:#5F9EA0;font-weight:bold;">Set-StrictMode</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;font-style:italic;">-Version</span><span style="color:#000000;"> </span><span style="color:#800000;">2.0</span><span style="color:#000000;">
}</span></pre>
<p>That&#8217;s it. Close the profile and restart the PowerGUI Script Editor.</p>
<p>P.S. Please forgive me the &#8220;<code>if</code>&#8221; workaround in common profile. In the future we will at some point start supporting a separate profile specifically for the script editor. This is the best practice and we&#8217;ll get there. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1373/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1373/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1373&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/07/08/catch-variable-typos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>

		<media:content url="http://dmitrysotnikov.files.wordpress.com/2009/07/open-profile.png" medium="image">
			<media:title type="html">Open-Profile</media:title>
		</media:content>
	</item>
		<item>
		<title>Customize hotkeys in PowerGUI Script Editor</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/07/06/customize-hotkeys-in-powergui-script-editor/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/07/06/customize-hotkeys-in-powergui-script-editor/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 10:00:29 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[IDE]]></category>
		<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[PowerGUI]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1370</guid>
		<description><![CDATA[One of the hidden gems in PowerGUI Script Editor is the ability to fully customize its toolbars and hotkeys.
Say, you want to have a hotkey to collapse all regions in a PowerShell script &#8211; this could not be easier, just:

On the Tools menu, click Customize.
In the Customize dialog box, click the Keyboard tab.
On the Keyboard [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1370&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>One of the hidden gems in <a href="http://powergui.org">PowerGUI Script Editor</a> is the ability to fully customize its toolbars and hotkeys.</p>
<p>Say, you want to have a hotkey to collapse all regions in a PowerShell script &#8211; this could not be easier, just:</p>
<ol>
<li>On the <strong>Tools </strong>menu, click <strong>Customize</strong>.</li>
<li>In the <strong>Customize </strong>dialog box, click the <strong>Keyboard </strong>tab.</li>
<li>On the <strong>Keyboard </strong>tab, select the command you need.</li>
<li>In the <strong>Press shortcut key(s)</strong>, assign the hotkey you want.</li>
</ol>
<p><a href="http://dmitrysotnikov.files.wordpress.com/2009/07/customize-editor-hotkeys.png"><img class="aligncenter size-full wp-image-1371" title="Customize-Editor-Hotkeys" src="http://dmitrysotnikov.files.wordpress.com/2009/07/customize-editor-hotkeys.png?w=500&#038;h=393" alt="Customize-Editor-Hotkeys" width="500" height="393" /></a></p>
<p>Other tabs of this dialog box are also useful:</p>
<ul>
<li><strong>Toolbars </strong>- lets you create your own toolbars.</li>
<li><strong>Commands </strong>- lets you add buttons to existing toolbars by simply dragging them from the dialog box to the toolbar.</li>
</ul>
<p>Hope this makes your PowerShell scripting even more enjoyable!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1370/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1370&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/07/06/customize-hotkeys-in-powergui-script-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>

		<media:content url="http://dmitrysotnikov.files.wordpress.com/2009/07/customize-editor-hotkeys.png" medium="image">
			<media:title type="html">Customize-Editor-Hotkeys</media:title>
		</media:content>
	</item>
		<item>
		<title>Clearing PowerShell runspace before debugging</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/06/01/clearing-powershell-runspace-before-debugging/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/06/01/clearing-powershell-runspace-before-debugging/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 10:00:31 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[KB]]></category>
		<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[PowerGUI]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1225</guid>
		<description><![CDATA[Another PowerGUI Script Editor option I would like to highlight &#8211; is the ability to clear the PowerShell runspace each time you start debugging a script:

Here&#8217;s the rule of thumb on picking the option you need:
Pick &#8220;Run all scripts in the same runspace&#8221; if you want the editor to behave like a PowerShell command line [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1225&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Another <a href="http://powergui.org">PowerGUI Script Editor</a> option I would like to highlight &#8211; is the ability to clear the PowerShell runspace each time you start debugging a script:</p>
<p><a href="http://dmitrysotnikov.files.wordpress.com/2009/05/editor_reset_runspace.png"><img src="http://dmitrysotnikov.files.wordpress.com/2009/05/editor_reset_runspace.png?w=300&#038;h=193" alt="Editor_Reset_Runspace" title="Editor_Reset_Runspace" width="300" height="193" class="aligncenter size-medium wp-image-1226" /></a></p>
<p>Here&#8217;s the rule of thumb on picking the option you need:</p>
<p>Pick &#8220;<strong>Run all scripts in the same runspace</strong>&#8221; if you want the editor to behave like a PowerShell command line in which as you execute scripts and commands they leave the variables with their values assigned and available to whatever scripts you execute after that.</p>
<p>Pick &#8220;<strong>Reset PowerShell runspace each time debugging is started</strong>&#8221; if you want PowerGUI to completely clear PowerShell and (optionally) re-load your profile each time you start debugging. This basically emulates the situation when you start a new PowerShell window every time before executing a script &#8211; completely pristine environment with nothing left from whichever commands and scripts you executed before.</p>
<p>Use whatever model fits best and enjoy your scripting!</p>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/KB" target="_blank" rel="tag" title="Link to Technorati Tag category for KB">KB</a>, <a href="http://www.technorati.com/tag/Knowledge+Base" target="_blank" rel="tag" title="Link to Technorati Tag category for Knowledge Base">Knowledge Base</a>, <a href="http://www.technorati.com/tag/PowerGUI" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerGUI">PowerGUI</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F01%2Fclearing%2Dpowershell%2Drunspace%2Dbefore%2Ddebugging%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F01%2Fclearing%2Dpowershell%2Drunspace%2Dbefore%2Ddebugging%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F01%2Fclearing%2Dpowershell%2Drunspace%2Dbefore%2Ddebugging%2F;title=Clearing%20PowerShell%20runspace%20before%20debugging" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=Clearing%20PowerShell%20runspace%20before%20debugging&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F01%2Fclearing%2Dpowershell%2Drunspace%2Dbefore%2Ddebugging%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F01%2Fclearing%2Dpowershell%2Drunspace%2Dbefore%2Ddebugging%2F&amp;Title=Clearing%20PowerShell%20runspace%20before%20debugging" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F01%2Fclearing%2Dpowershell%2Drunspace%2Dbefore%2Ddebugging%2F&amp;title=Clearing%20PowerShell%20runspace%20before%20debugging" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F01%2Fclearing%2Dpowershell%2Drunspace%2Dbefore%2Ddebugging%2F&amp;title=Clearing%20PowerShell%20runspace%20before%20debugging" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=Clearing%20PowerShell%20runspace%20before%20debugging&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2009%2F06%2F01%2Fclearing%2Dpowershell%2Drunspace%2Dbefore%2Ddebugging%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1225/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1225&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/06/01/clearing-powershell-runspace-before-debugging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>

		<media:content url="http://dmitrysotnikov.files.wordpress.com/2009/05/editor_reset_runspace.png?w=300" medium="image">
			<media:title type="html">Editor_Reset_Runspace</media:title>
		</media:content>
	</item>
		<item>
		<title>Multiple PowerShell runspaces in PowerGUI Editor</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/05/28/multiple-powershell-runspaces-in-powergui-editor/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/05/28/multiple-powershell-runspaces-in-powergui-editor/#comments</comments>
		<pubDate>Thu, 28 May 2009 08:15:26 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[KB]]></category>
		<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[PowerGUI]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1222</guid>
		<description><![CDATA[By default, PowerGUI Script Editor is a single instance application &#8211; all scripts get opened as different tabs on the same window, and all the scripts and interactive commands in the same PowerShell session. They &#8220;see&#8221; the same variables and so on.
This however is very easy to change. Just go to Tools / Options and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1222&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>By default, PowerGUI Script Editor is a single instance application &#8211; all scripts get opened as different tabs on the same window, and all the scripts and interactive commands in the same PowerShell session. They &#8220;see&#8221; the same variables and so on.</p>
<p>This however is very easy to change. Just go to <strong>Tools / Options</strong> and clear the <strong>Allow only one instance of the application to run</strong> &#8211; and you can have as many PowerGUI Script Editor windows as you like.</p>
<p><a href="http://dmitrysotnikov.files.wordpress.com/2009/05/editor_single_multiple_runspace_switch.png"><img src="http://dmitrysotnikov.files.wordpress.com/2009/05/editor_single_multiple_runspace_switch.png?w=300&#038;h=168" alt="Editor_Single_Multiple_Runspace_Switch" title="Editor_Single_Multiple_Runspace_Switch" width="300" height="168" class="aligncenter size-medium wp-image-1223" /></a></p>
<p>Each window will have its own PowerShell runspace &#8211; totally isolated from other windows (but still shared within the tabs of the same window).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1222/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1222&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/05/28/multiple-powershell-runspaces-in-powergui-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>

		<media:content url="http://dmitrysotnikov.files.wordpress.com/2009/05/editor_single_multiple_runspace_switch.png?w=300" medium="image">
			<media:title type="html">Editor_Single_Multiple_Runspace_Switch</media:title>
		</media:content>
	</item>
		<item>
		<title>AD PowerPack now compatible with cmdlets 1.2</title>
		<link>http://dmitrysotnikov.wordpress.com/2009/04/30/ad-powerpack-now-compatible-with-cmdlets-12/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2009/04/30/ad-powerpack-now-compatible-with-cmdlets-12/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 15:28:34 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD cmdlets]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[KB]]></category>
		<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Known Issues]]></category>
		<category><![CDATA[PowerGUI]]></category>
		<category><![CDATA[PowerPack]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=1175</guid>
		<description><![CDATA[If you upgraded to AD cmdlets 1.2 and noticed that some links and actions in PowerGUI&#8217;s Active Directory and Network PowerPacks stopped working.
Now there are fixes available for both of the packs: just download and re-import them and you will get all the functionality back.
For those interested, the issue was related to AD cmdlets 1.2 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1175&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you upgraded to AD cmdlets 1.2 and noticed that some links and actions in PowerGUI&#8217;s <a href="http://powergui.org/entry.jspa?externalID=763&amp;categoryID=46">Active Directory</a> and <a href="http://powergui.org/entry.jspa?externalID=2363&amp;categoryID=48">Network</a> PowerPacks stopped working.</p>
<p>Now there are fixes available for both of the packs: just download and re-import them and you will get all the functionality back.</p>
<p>For those interested, the issue was related to AD cmdlets 1.2 losing Connection property in all their objects. This property was extensively used by our PowerPacks to provide for simultaneous work against multiple directories (e.g. test and production, AD and ADAM, or just multiple domains or forests).</p>
<p>AD cmdlets team is by the way working on a 1.2.1 patch release which would get the property back, but we thought we would provide a fix on PowerGUI side too.</p>
<p>As a free bonus AD PowerPack has a few other nice features:</p>
<ul>
<li>Moved &#8220;Managed Domains&#8221; from the Network PowerPack to this PowerPack</li>
<li>Added top level Configuration node to allow you to set global settings that define what domain to connect to, what account to use, what properties to retrieve by default for each object type, what page size to use, what size limit to use and whether or not to perform searches across the entire forest or only the domain you connect to</li>
<li>Added several child nodes to provide fast access to common objects that users want to retrieve, including Locked Users, Disabled Users, Expired Users, Security Groups, Distribution Lists, Domain Controllers, and Exchange Servers</li>
<li>Fixed Empty Groups node such that it only returns truly empty groups (those which have no members and that aren&#8217;t set as primary group for any user or computer)</li>
<li>Added Unlock user action (this was overlooked in early releases)</li>
<li>Added Search&#8230; node to allow users to search their current Active Directory domain or the entire forest to which it belongs for objects by type and/or name</li>
</ul>
<p>Here are the links to read more and download the updated <a href="http://powergui.org/entry.jspa?externalID=763&amp;categoryID=46">Active Directory</a> and <a href="http://powergui.org/entry.jspa?externalID=2363&amp;categoryID=48">Network</a> PowerPacks.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/1175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=1175&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2009/04/30/ad-powerpack-now-compatible-with-cmdlets-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerGUI and CTP3</title>
		<link>http://dmitrysotnikov.wordpress.com/2008/12/23/powergui-and-ctp3/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2008/12/23/powergui-and-ctp3/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 11:46:59 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[KB]]></category>
		<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Known Issues]]></category>
		<category><![CDATA[PowerGUI]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[PowerShell v2]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=921</guid>
		<description><![CDATA[PowerShell team has just posted the latest pre-release drop of the upcoming version 2 &#8211; and they did in on track with the timeline they announced back in November.
The current version of PowerGUI (1.5.3) which you can download from PowerGUI.org is in general compatible with CTP3 but does have a few issues. For example, the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=921&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>PowerShell team has just <a href="http://blogs.msdn.com/powershell/archive/2008/12/23/early-christmas-present-from-powershell-team-community-technology-preview-3-ctp3-of-windows-powershell-v2.aspx">posted the latest pre-release drop of the upcoming version 2</a> &#8211; and they did in on track with the <a href="http://dmitrysotnikov.wordpress.com/2008/11/06/powershell-v2-release-schedule/">timeline they announced back in November</a>.</p>
<p>The current version of PowerGUI (1.5.3) which you can <a href="http://powergui.org/downloads.jspa">download from PowerGUI.org</a> is in general compatible with CTP3 but does have a few issues. For example, the editor works fine and you can get syntax highlight and intellisense for new cmdlets, but step-by-step debugging might leave awkward yellow marking on previous steps. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>These issues are obviously fully fixed in the upcoming 1.6 release which is coming out literally in a matter of days now. Stay tuned. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/KB" target="_blank" rel="tag" title="Link to Technorati Tag category for KB">KB</a>, <a href="http://www.technorati.com/tag/Knowledge+Base" target="_blank" rel="tag" title="Link to Technorati Tag category for Knowledge Base">Knowledge Base</a>, <a href="http://www.technorati.com/tag/Known+Issues" target="_blank" rel="tag" title="Link to Technorati Tag category for Known Issues">Known Issues</a>, <a href="http://www.technorati.com/tag/PowerGUI" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerGUI">PowerGUI</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a>, <a href="http://www.technorati.com/tag/PowerShell+v2" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell v2">PowerShell v2</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F12%2F23%2Fpowergui%2Dand%2Dctp3%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F12%2F23%2Fpowergui%2Dand%2Dctp3%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F12%2F23%2Fpowergui%2Dand%2Dctp3%2F;title=PowerGUI%20and%20CTP3" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=PowerGUI%20and%20CTP3&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F12%2F23%2Fpowergui%2Dand%2Dctp3%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F12%2F23%2Fpowergui%2Dand%2Dctp3%2F&amp;Title=PowerGUI%20and%20CTP3" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F12%2F23%2Fpowergui%2Dand%2Dctp3%2F&amp;title=PowerGUI%20and%20CTP3" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F12%2F23%2Fpowergui%2Dand%2Dctp3%2F&amp;title=PowerGUI%20and%20CTP3" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=PowerGUI%20and%20CTP3&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F12%2F23%2Fpowergui%2Dand%2Dctp3%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/921/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/921/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/921/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/921/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/921/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/921/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/921/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/921/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/921/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/921/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=921&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2008/12/23/powergui-and-ctp3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>$input gotchas</title>
		<link>http://dmitrysotnikov.wordpress.com/2008/11/26/input-gotchas/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2008/11/26/input-gotchas/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 21:47:56 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[KB]]></category>
		<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Known Issues]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=862</guid>
		<description><![CDATA[$input (a.k.a. &#8220;dollar input&#8221; or &#8220;input variable&#8221;) is one of those esoteric parts of the PowerShell language that create a lot of confusion. In fact just today there was a discussion on how it actually works on the PowerShell MVP mailing list. We even had to read the documentation to figure it out.  
Anyways, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=862&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><code>$input</code> (a.k.a. <em>&#8220;dollar input&#8221;</em> or <em>&#8220;input variable&#8221;</em>) is one of those esoteric parts of the PowerShell language that create a lot of confusion. In fact just today there was a discussion on how it actually works on the PowerShell MVP mailing list. We even had to read the documentation to figure it out. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Anyways, basically <code>$input</code> in an enumerator which provides access to the pipeline you have.</p>
<p>So basically if you have a function which sums up the elements from the pipeline you can have something like:</p>
<pre><span style="color:#0000FF;">Function</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;">Sum</span><span style="color:#000000;"> {
    </span><span style="color:#800080;">$sum</span><span style="color:#000000;"> </span><span style="color:#FF0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">0</span><span style="color:#000000;">
    </span><span style="color:#000080;">$input</span><span style="color:#000000;"> |  </span><span style="color:#5F9EA0;font-weight:bold;">foreach</span><span style="color:#000000;"> { </span><span style="color:#800080;">$sum</span><span style="color:#000000;"> </span><span style="color:#FF0000;">+=</span><span style="color:#000000;"> </span><span style="color:#000080;">$_</span><span style="color:#000000;"> }
    </span><span style="color:#800080;">$sum</span><span style="color:#000000;">
}

</span><span style="color:#000000;">1</span><span style="color:#000000;">, </span><span style="color:#000000;">2</span><span style="color:#000000;">, </span><span style="color:#000000;">3</span><span style="color:#000000;"> | </span><span style="color:#5F9EA0;">Sum</span></pre>
<p>Easy. In fact if you have ever added any script actions or links in the PowerGUI admin console, this is basically what you use to get access to the selection from the central grid.</p>
<p>Now, there are a couple not so obvious gotchas here:</p>
<p><strong>1. Enumerator is not an array</strong></p>
<p>Suppose you want to know how many objects you get from the pipeline &#8211; a totally valid question. Maybe your function is supposed to only get one.</p>
<p>You just do <code>$input.Count</code> and&#8230; get nothing. Such property does not exist. This is an enumerator and it simply does not have such a property.</p>
<p>OK, you say, let&#8217;s wrap it into an array and we&#8217;ll learn the size:</p>
<pre><span style="color:#000000;">@(</span><span style="color:#000080;">$input</span><span style="color:#000000;">).Count</span></pre>
<p>This works&#8230; Kind of&#8230; If you modify our example above to:</p>
<pre><span style="color:#0000FF;">Function</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;">Sum</span><span style="color:#000000;"> {
    </span><span style="color:#800000;">"</span><span style="color:#800000;">Number of elements: </span><span style="color:#800000;">"</span><span style="color:#000000;"> </span><span style="color:#FF0000;">+</span><span style="color:#000000;"> @(</span><span style="color:#000080;">$input</span><span style="color:#000000;">).Count
    </span><span style="color:#800080;">$sum</span><span style="color:#000000;"> </span><span style="color:#FF0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">0</span><span style="color:#000000;">
    </span><span style="color:#000080;">$input</span><span style="color:#000000;"> |  </span><span style="color:#5F9EA0;font-weight:bold;">foreach</span><span style="color:#000000;"> { </span><span style="color:#800080;">$sum</span><span style="color:#000000;"> </span><span style="color:#FF0000;">+=</span><span style="color:#000000;"> </span><span style="color:#000080;">$_</span><span style="color:#000000;"> }
    </span><span style="color:#800000;">"</span><span style="color:#800000;">Sum is: </span><span style="color:#800000;">"</span><span style="color:#000000;"> </span><span style="color:#FF0000;">+</span><span style="color:#000000;"> </span><span style="color:#800080;">$sum</span><span style="color:#000000;">
}

</span><span style="color:#000000;">1</span><span style="color:#000000;">, </span><span style="color:#000000;">2</span><span style="color:#000000;">, </span><span style="color:#000000;">3</span><span style="color:#000000;"> | </span><span style="color:#5F9EA0;">Sum</span></pre>
<p>You get:</p>
<p><code>Number of elements: 3</code><br />
<code>Sum is: 0</code></p>
<p>The first line is correct &#8211; we had 3 elements. But why the heck is the sum 0 now?</p>
<p>Well, $input is an enumerator, and when you use it &#8211; you get to the next element. So once we used it to create a temporary array we got to its end. To fix it, simply reset it back:</p>
<pre><span style="color:#0000FF;">Function</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;">Sum</span><span style="color:#000000;"> {
    </span><span style="color:#800000;">"</span><span style="color:#800000;">Number of elements: </span><span style="color:#800000;">"</span><span style="color:#000000;"> </span><span style="color:#FF0000;">+</span><span style="color:#000000;"> @(</span><span style="color:#000080;">$input</span><span style="color:#000000;">).Count
    </span><span style="color:#000080;">$input</span><span style="color:#000000;">.Reset()

    </span><span style="color:#800080;">$sum</span><span style="color:#000000;"> </span><span style="color:#FF0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">0</span><span style="color:#000000;">
    </span><span style="color:#000080;">$input</span><span style="color:#000000;"> |  </span><span style="color:#5F9EA0;font-weight:bold;">foreach</span><span style="color:#000000;"> { </span><span style="color:#800080;">$sum</span><span style="color:#000000;"> </span><span style="color:#FF0000;">+=</span><span style="color:#000000;"> </span><span style="color:#000080;">$_</span><span style="color:#000000;"> }
    </span><span style="color:#800000;">"</span><span style="color:#800000;">Sum is: </span><span style="color:#800000;">"</span><span style="color:#000000;"> </span><span style="color:#FF0000;">+</span><span style="color:#000000;"> </span><span style="color:#800080;">$sum</span><span style="color:#000000;">
}

</span><span style="color:#000000;">1</span><span style="color:#000000;">, </span><span style="color:#000000;">2</span><span style="color:#000000;">, </span><span style="color:#000000;">3</span><span style="color:#000000;"> | </span><span style="color:#5F9EA0;">Sum</span></pre>
<p>Now we are good again:</p>
<p><code>Number of elements: 3</code><br />
<code>Sum is: 6</code></p>
<p><strong>2. Just using $input holds the pipeline till all objects are collected</strong></p>
<p>This second one was spotted by Per <a href="http://msgoodies.blogspot.com/2007/07/powershell-input-vs-process.html">here</a>. He tried using $input and noticed that his function did not get executed until the whole pipeline was processed (that is his function was not invoked for each element one by one, but rather for the whole collection) &#8211; read <a href="http://msgoodies.blogspot.com/2007/07/powershell-input-vs-process.html">his post</a> for details.</p>
<p>This happens because according to <a href="http://technet.microsoft.com/en-us/library/bb978577.aspx">PowerShell help</a>:</p>
<blockquote><p>&#8220;In the Process block of a function, $input contains the object currently in the pipeline&#8230; If the function does not have a Process block, the value of $input is available to the End block, and it contains all of the input to the function.&#8221;</p></blockquote>
<p>So basically the reason for the code above to process the whole collection (rather than go item by item) is that we did not have a process block inside the function, so if you care about item by item processing &#8211; go with the process block, if not &#8211; feel free to use $input.</p>
<p>And by the way, inside the process block just stick to $_ like this:</p>
<pre><span style="color:#0000FF;">Function</span><span style="color:#000000;"> </span><span style="color:#5F9EA0;">Sum</span><span style="color:#000000;"> {
  </span><span style="color:#0000FF;">begin</span><span style="color:#000000;"> { </span><span style="color:#800080;">$sum</span><span style="color:#000000;"> </span><span style="color:#FF0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">0</span><span style="color:#000000;"> }
  </span><span style="color:#0000FF;">process</span><span style="color:#000000;"> { </span><span style="color:#800080;">$sum</span><span style="color:#000000;"> </span><span style="color:#FF0000;">+=</span><span style="color:#000000;"> </span><span style="color:#000080;">$_</span><span style="color:#000000;"> }
  </span><span style="color:#0000FF;">end</span><span style="color:#000000;"> { </span><span style="color:#800080;">$sum</span><span style="color:#000000;"> }
}

</span><span style="color:#000000;">1</span><span style="color:#000000;">, </span><span style="color:#000000;">2</span><span style="color:#000000;">, </span><span style="color:#000000;">3</span><span style="color:#000000;"> | </span><span style="color:#5F9EA0;">Sum</span></pre>
<p>Using <code>$input</code> inside <code>process</code> is a hustle and <a href="http://www.nivot.org/">Oisin</a> promised a post <a href="http://www.nivot.org/">on his blog</a> on the reasons why. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/KB" target="_blank" rel="tag" title="Link to Technorati Tag category for KB">KB</a>, <a href="http://www.technorati.com/tag/Knowledge+Base" target="_blank" rel="tag" title="Link to Technorati Tag category for Knowledge Base">Knowledge Base</a>, <a href="http://www.technorati.com/tag/Known+Issues" target="_blank" rel="tag" title="Link to Technorati Tag category for Known Issues">Known Issues</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F11%2F26%2Finput%2Dgotchas%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F11%2F26%2Finput%2Dgotchas%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F11%2F26%2Finput%2Dgotchas%2F;title=%24input%20gotchas" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=%24input%20gotchas&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F11%2F26%2Finput%2Dgotchas%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F11%2F26%2Finput%2Dgotchas%2F&amp;Title=%24input%20gotchas" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F11%2F26%2Finput%2Dgotchas%2F&amp;title=%24input%20gotchas" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F11%2F26%2Finput%2Dgotchas%2F&amp;title=%24input%20gotchas" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=%24input%20gotchas&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F11%2F26%2Finput%2Dgotchas%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/862/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/862/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/862/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/862/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/862/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/862/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/862/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/862/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/862/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/862/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=862&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2008/11/26/input-gotchas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
		<item>
		<title>New patch for AD cmdlets</title>
		<link>http://dmitrysotnikov.wordpress.com/2008/09/22/new-patch-for-ad-cmdlets/</link>
		<comments>http://dmitrysotnikov.wordpress.com/2008/09/22/new-patch-for-ad-cmdlets/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 08:00:40 +0000</pubDate>
		<dc:creator>Dmitry Sotnikov</dc:creator>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[AD cmdlets]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[KB]]></category>
		<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Known Issues]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[cmdlets]]></category>

		<guid isPermaLink="false">http://dmitrysotnikov.wordpress.com/?p=650</guid>
		<description><![CDATA[There is a new patch available for AD cmdlets. It fixes two pretty important issues:

Add-QADPermission: -applytotype not working
AD cmdlets crashing in STA mode (which affected PowerGUI users who wanted to take advantage of PowerShell v2 STA mode to spice up PowerGUI with some WPF)

This patch was released as a maintenance release 1.1.2 and was published [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=650&subd=dmitrysotnikov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>There is a new <a href="http://www.quest.com/powershell/activeroles-server.aspx">patch available for AD cmdlets</a>. It fixes two pretty important issues:</p>
<ul>
<li><a href="http://www.powergui.org/thread.jspa?threadID=7344&amp;tstart=15">Add-QADPermission: -applytotype not working</a></li>
<li>AD cmdlets crashing in STA mode (which affected PowerGUI users who wanted to take advantage of PowerShell v2 STA mode to spice up PowerGUI with some WPF)</li>
</ul>
<p><a href="http://www.quest.com/powershell/activeroles-server.aspx">This patch</a> was released as a maintenance release 1.1.2 and was published on September 8. If you downloaded the setup after that date you probably have the version already (just look up the Support information in <em>Control Panel</em> / <em>Add/Remove Programs</em>). If not &#8211; download the latest build and install on top of the version you are using &#8211; this will upgrade your installation to the patched version.</p>
<p>I want to say thanks to the team which quickly released the patch is demonstrated the commitment to fixing the issues for which they cannot provide a workaround &#8211; way to go!</p>
<p><span class="technoratitag">Tags: <a href="http://www.technorati.com/tag/AD" target="_blank" rel="tag" title="Link to Technorati Tag category for AD">AD</a>, <a href="http://www.technorati.com/tag/AD+cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for AD cmdlets">AD cmdlets</a>, <a href="http://www.technorati.com/tag/Active+Directory" target="_blank" rel="tag" title="Link to Technorati Tag category for Active Directory">Active Directory</a>, <a href="http://www.technorati.com/tag/KB" target="_blank" rel="tag" title="Link to Technorati Tag category for KB">KB</a>, <a href="http://www.technorati.com/tag/Knowledge+Base" target="_blank" rel="tag" title="Link to Technorati Tag category for Knowledge Base">Knowledge Base</a>, <a href="http://www.technorati.com/tag/Known+Issues" target="_blank" rel="tag" title="Link to Technorati Tag category for Known Issues">Known Issues</a>, <a href="http://www.technorati.com/tag/PowerShell" target="_blank" rel="tag" title="Link to Technorati Tag category for PowerShell">PowerShell</a>, <a href="http://www.technorati.com/tag/cmdlets" target="_blank" rel="tag" title="Link to Technorati Tag category for cmdlets">cmdlets</a></span><br /><span class="sociallinks">Add to: | <a href="http://technorati.com/faves?add=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F09%2F22%2Fnew%2Dpatch%2Dfor%2Dad%2Dcmdlets%2F" target="_blank">Technorati</a> |  <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F09%2F22%2Fnew%2Dpatch%2Dfor%2Dad%2Dcmdlets%2F" target="_blank">Digg</a> |  <a href="http://del.icio.us/post?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F09%2F22%2Fnew%2Dpatch%2Dfor%2Dad%2Dcmdlets%2F;title=New%20patch%20for%20AD%20cmdlets" target="_blank">del.icio.us</a> |  <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=New%20patch%20for%20AD%20cmdlets&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F09%2F22%2Fnew%2Dpatch%2Dfor%2Dad%2Dcmdlets%2F" target="_blank">Yahoo</a> |  <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F09%2F22%2Fnew%2Dpatch%2Dfor%2Dad%2Dcmdlets%2F&amp;Title=New%20patch%20for%20AD%20cmdlets" target="_blank">BlinkList</a> |  <a href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F09%2F22%2Fnew%2Dpatch%2Dfor%2Dad%2Dcmdlets%2F&amp;title=New%20patch%20for%20AD%20cmdlets" target="_blank">Spurl</a> |  <a href="http://reddit.com/submit?url=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F09%2F22%2Fnew%2Dpatch%2Dfor%2Dad%2Dcmdlets%2F&amp;title=New%20patch%20for%20AD%20cmdlets" target="_blank">reddit</a> |   <a href="http://www.furl.net/storeIt.jsp?t=New%20patch%20for%20AD%20cmdlets&amp;u=http%3A%2F%2Fdmitrysotnikov%2Ewordpress%2Ecom%2F2008%2F09%2F22%2Fnew%2Dpatch%2Dfor%2Dad%2Dcmdlets%2F" target="_blank">Furl</a> |  </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dmitrysotnikov.wordpress.com/650/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dmitrysotnikov.wordpress.com/650/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dmitrysotnikov.wordpress.com/650/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dmitrysotnikov.wordpress.com/650/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dmitrysotnikov.wordpress.com/650/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dmitrysotnikov.wordpress.com/650/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dmitrysotnikov.wordpress.com/650/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dmitrysotnikov.wordpress.com/650/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dmitrysotnikov.wordpress.com/650/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dmitrysotnikov.wordpress.com/650/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dmitrysotnikov.wordpress.com&blog=867377&post=650&subd=dmitrysotnikov&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dmitrysotnikov.wordpress.com/2008/09/22/new-patch-for-ad-cmdlets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ecc57e2c1be48013620bf85fb983dbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitrysotnikov</media:title>
		</media:content>
	</item>
	</channel>
</rss>