<?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: Is PowerShell $ShellId too big a burden?</title>
	<atom:link href="http://huddledmasses.org/is-powershell-shellid-too-big-a-burden/feed/" rel="self" type="application/rss+xml" />
	<link>http://huddledmasses.org/is-powershell-shellid-too-big-a-burden/</link>
	<description>You can do more than breathe for free...</description>
	<lastBuildDate>Sun, 14 Mar 2010 05:17:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chad Miller</title>
		<link>http://huddledmasses.org/is-powershell-shellid-too-big-a-burden/comment-page-1/#comment-197546</link>
		<dc:creator>Chad Miller</dc:creator>
		<pubDate>Tue, 23 Sep 2008 03:52:26 +0000</pubDate>
		<guid isPermaLink="false">http://HuddledMasses.org/?p=655#comment-197546</guid>
		<description></description>
		<content:encoded><![CDATA[<p>It does seem a little pointless, but if you want to launch PowerShell from within <span class="caps">SQL</span> Server its your only option. I prefer to use <span class="caps">SQL</span> Server PowerShell Extensions (<a href="http://www.codeplex.com/sqlpsx" rel="nofollow">http://www.codeplex.com/sqlpsx</a>) in regular PowerShell when possible, but as a project developer I&#8217;m a little bias <img src='http://huddledmasses.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks for the insight into shellid and the advice to use Microsoft.PowerShell_profile.ps1 which seems cleaner than the “if ($Shellid -ne ‘Microsoft.SqlServer.Management.PowerShell.sqlps’)” approach I had taken especially since Microsoft is releasing mini-shells like sqlps.exe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel 'Jaykul' Bennett</title>
		<link>http://huddledmasses.org/is-powershell-shellid-too-big-a-burden/comment-page-1/#comment-196648</link>
		<dc:creator>Joel 'Jaykul' Bennett</dc:creator>
		<pubDate>Sat, 20 Sep 2008 22:25:30 +0000</pubDate>
		<guid isPermaLink="false">http://HuddledMasses.org/?p=655#comment-196648</guid>
		<description>*@Chad* Well, that&#039;s interesting (and now you know *why* it doesn&#039;t support Add-PSSnapin).  I&#039;m going to check if Add-Module behaves the same way. If it doesn&#039;t, maybe I&#039;ll just officially deprecate PSSnapins in PoshConsole.

By the way, (I posted this in your WorkItem too) depending on what other PowerShell hosts you use, you might want to move the loading of the PSCX profile stuff into a separate script which gets called from Microsoft.PowerShell_profile.ps1 (and/or other host-specific profile scripts). That way it wouldn&#039;t get loaded by the SQLPS (Profile.ps1 is supposed to be host-agnostic). I must admit though, a host that doesn&#039;t do snapins feels a little pointless to me ;-)</description>
		<content:encoded><![CDATA[<p><strong>@Chad</strong> Well, that&#8217;s interesting (and now you know <strong>why</strong> it doesn&#8217;t support Add-PSSnapin).  I&#8217;m going to check if Add-Module behaves the same way. If it doesn&#8217;t, maybe I&#8217;ll just officially deprecate PSSnapins in PoshConsole.</p>
<p>By the way, (I posted this in your WorkItem too) depending on what other PowerShell hosts you use, you might want to move the loading of the <span class="caps">PSCX</span> profile stuff into a separate script which gets called from Microsoft.PowerShell_profile.ps1 (and/or other host-specific profile scripts). That way it wouldn&#8217;t get loaded by the <span class="caps">SQLPS</span> (Profile.ps1 is supposed to be host-agnostic). I must admit though, a host that doesn&#8217;t do snapins feels a little pointless to me <img src='http://huddledmasses.org/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad Miller</title>
		<link>http://huddledmasses.org/is-powershell-shellid-too-big-a-burden/comment-page-1/#comment-196109</link>
		<dc:creator>Chad Miller</dc:creator>
		<pubDate>Fri, 19 Sep 2008 14:33:30 +0000</pubDate>
		<guid isPermaLink="false">http://HuddledMasses.org/?p=655#comment-196109</guid>
		<description>Microsoft&#039;s SQL Server PowerShell (sqlps.exe) implements the ShellId. I&#039;m using  &quot;if ($Shellid -ne &#039;Microsoft.SqlServer.Management.PowerShell.sqlps&#039;)&quot; in my profile to avoid running add-snapin commands when launching sqlps.exe (sqlps.exe does not support add-snapin). I posted a comment about sqlps.exe in the PSCX issue tracker:

http://www.codeplex.com/PowerShellCX/WorkItem/View.aspx?WorkItemId=18417</description>
		<content:encoded><![CDATA[<p>Microsoft&#8217;s <span class="caps">SQL</span> Server PowerShell (sqlps.exe) implements the ShellId. I&#8217;m using  &#8220;if ($Shellid -ne &#8216;Microsoft.SqlServer.Management.PowerShell.sqlps&#8217;)&#8221; in my profile to avoid running add-snapin commands when launching sqlps.exe (sqlps.exe does not support add-snapin). I posted a comment about sqlps.exe in the <span class="caps">PSCX</span> issue tracker:</p>
<p><a href="http://www.codeplex.com/PowerShellCX/WorkItem/View.aspx?WorkItemId=18417" rel="nofollow">http://www.codeplex.com/PowerShellCX/WorkItem/View.aspx?WorkItemId=18417</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel 'Jaykul' Bennett</title>
		<link>http://huddledmasses.org/is-powershell-shellid-too-big-a-burden/comment-page-1/#comment-195205</link>
		<dc:creator>Joel 'Jaykul' Bennett</dc:creator>
		<pubDate>Tue, 16 Sep 2008 12:20:49 +0000</pubDate>
		<guid isPermaLink="false">http://HuddledMasses.org/?p=655#comment-195205</guid>
		<description> I know there are a few ways to determine which host I&#039;m running in, and I&#039;ve even created a sort-of &quot;standard&quot; for checking if the Host has WPF capabilities: @if($Host.PrivateData.XamlUI)@ ... so that hypothetically other people could write Hosts that could support these cmdlets. 

I could even throw my own errors to make it look roughly the same as a #requires statement would look.

The thing is, there&#039;s a built-in mechanism for handling requirements like this ... and I can&#039;t make it work! (And that&#039;s driving my crazy).

Of course, on top of the &quot;it should be easy&quot; argument (which seems to indicate that this system is designed wrong) ... we&#039;ve been discussing the ability to filter search results on PoshCode.org based on requirements, which would work if we could parse for #requires statements, but wouldn&#039;t have any way of knowing that an if() statement was actually a requirement instead of just a logic branch -- so I&#039;d really like the #requires system to work ;-)</description>
		<content:encoded><![CDATA[<p>I know there are a few ways to determine which host I&#8217;m running in, and I&#8217;ve even created a sort-of &#8220;standard&#8221; for checking if the Host has <span class="caps">WPF</span> capabilities: <code>if($Host.PrivateData.XamlUI)</code> &#8230; so that hypothetically other people could write Hosts that could support these cmdlets. </p>
<p>I could even throw my own errors to make it look roughly the same as a #requires statement would look.</p>
<p>The thing is, there&#8217;s a built-in mechanism for handling requirements like this &#8230; and I can&#8217;t make it work! (And that&#8217;s driving my crazy).</p>
<p>Of course, on top of the &#8220;it should be easy&#8221; argument (which seems to indicate that this system is designed wrong) ... we&#8217;ve been discussing the ability to filter search results on PoshCode.org based on requirements, which would work if we could parse for #requires statements, but wouldn&#8217;t have any way of knowing that an if() statement was actually a requirement instead of just a logic branch &#8212; so I&#8217;d really like the #requires system to work <img src='http://huddledmasses.org/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lunatic Experimentalist</title>
		<link>http://huddledmasses.org/is-powershell-shellid-too-big-a-burden/comment-page-1/#comment-195070</link>
		<dc:creator>Lunatic Experimentalist</dc:creator>
		<pubDate>Tue, 16 Sep 2008 04:00:34 +0000</pubDate>
		<guid isPermaLink="false">http://HuddledMasses.org/?p=655#comment-195070</guid>
		<description>if ($host -is $yourhosttype) {#run code for your host }
else {#run generic code}</description>
		<content:encoded><![CDATA[<p>if ($host -is $yourhosttype) {#run code for your host }<br />
else {#run generic code}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Archer</title>
		<link>http://huddledmasses.org/is-powershell-shellid-too-big-a-burden/comment-page-1/#comment-194945</link>
		<dc:creator>Jason Archer</dc:creator>
		<pubDate>Mon, 15 Sep 2008 17:53:15 +0000</pubDate>
		<guid isPermaLink="false">http://HuddledMasses.org/?p=655#comment-194945</guid>
		<description>I want!

Perhaps a global variable signifying that your shell is capable of graphics in the shell output is a reasonable workaround?  It would mean that each Cmdlet would need to check for it.</description>
		<content:encoded><![CDATA[<p>I want!</p>
<p>Perhaps a global variable signifying that your shell is capable of graphics in the shell output is a reasonable workaround?  It would mean that each Cmdlet would need to check for it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
