<?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: SQL Server 2008 PowerShell SnapIn	</title>
	<atom:link href="https://lobsterpot.com.au/blog/2008/03/04/sql-server-2008-powershell-snapin/feed/" rel="self" type="application/rss+xml" />
	<link>https://lobsterpot.com.au/blog/2008/03/04/sql-server-2008-powershell-snapin/</link>
	<description></description>
	<lastBuildDate>Wed, 11 Mar 2009 20:34:34 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		By: robfarley		</title>
		<link>https://lobsterpot.com.au/blog/2008/03/04/sql-server-2008-powershell-snapin/#comment-593</link>

		<dc:creator><![CDATA[robfarley]]></dc:creator>
		<pubDate>Wed, 11 Mar 2009 20:34:34 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/03/04/sql-server-2008-powershell-snapin.aspx#comment-593</guid>

					<description><![CDATA[Yes Mark, you&#039;re correct. SQLPS isn&#039;t without its uses, but all too often I want to hook into slightly more than what I have available.

And I&#039;m often running PowerShell anyway, which makes the snapins way more useful.

Rob]]></description>
			<content:encoded><![CDATA[<p>Yes Mark, you&#8217;re correct. SQLPS isn&#8217;t without its uses, but all too often I want to hook into slightly more than what I have available.</p>
<p>And I&#8217;m often running PowerShell anyway, which makes the snapins way more useful.</p>
<p>Rob</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: MarkTab		</title>
		<link>https://lobsterpot.com.au/blog/2008/03/04/sql-server-2008-powershell-snapin/#comment-592</link>

		<dc:creator><![CDATA[MarkTab]]></dc:creator>
		<pubDate>Wed, 11 Mar 2009 15:09:55 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/03/04/sql-server-2008-powershell-snapin.aspx#comment-592</guid>

					<description><![CDATA[By the way -- I will also provide a document quotation on why use SQLPS at all if anybody could simply add the PS PlugIn.  SQLPS is a &quot;Power Shell Mini-Shell&quot;:

&quot;By default, sqlps runs with the scripting execution policy set to Restricted, which prevents running any PowerShell scripts. You can use the Set-ExecutionPolicy cmdlet to enable running signed scripts, or any scripts. Only run scripts from trusted sources, and secure all input and output files using the appropriate NTFS permissions.&quot;

from http://msdn.microsoft.com/en-us/library/cc281962.aspx

Powershell is, well, powerful, and a main concern for a SQL Server admin is inadvertently running something against a shared-database environment.  

SQLPS is therefore the default window when right-clicking an object in SSMS.

The link I referenced provides a script for adding SQL Server snap-ins to any PowerShell environment (it is more than just three lines since it includes conditional registration, for example).  Also provided is a script to load SMO only (if, for example, the intention is to port to .NET and not use the SQL provider).]]></description>
			<content:encoded><![CDATA[<p>By the way &#8212; I will also provide a document quotation on why use SQLPS at all if anybody could simply add the PS PlugIn.  SQLPS is a &#8220;Power Shell Mini-Shell&#8221;:</p>
<p>&#8220;By default, sqlps runs with the scripting execution policy set to Restricted, which prevents running any PowerShell scripts. You can use the Set-ExecutionPolicy cmdlet to enable running signed scripts, or any scripts. Only run scripts from trusted sources, and secure all input and output files using the appropriate NTFS permissions.&#8221;</p>
<p>from <a href="http://msdn.microsoft.com/en-us/library/cc281962.aspx" rel="nofollow ugc">http://msdn.microsoft.com/en-us/library/cc281962.aspx</a></p>
<p>Powershell is, well, powerful, and a main concern for a SQL Server admin is inadvertently running something against a shared-database environment.  </p>
<p>SQLPS is therefore the default window when right-clicking an object in SSMS.</p>
<p>The link I referenced provides a script for adding SQL Server snap-ins to any PowerShell environment (it is more than just three lines since it includes conditional registration, for example).  Also provided is a script to load SMO only (if, for example, the intention is to port to .NET and not use the SQL provider).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: MarkTab		</title>
		<link>https://lobsterpot.com.au/blog/2008/03/04/sql-server-2008-powershell-snapin/#comment-591</link>

		<dc:creator><![CDATA[MarkTab]]></dc:creator>
		<pubDate>Wed, 11 Mar 2009 14:50:22 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/03/04/sql-server-2008-powershell-snapin.aspx#comment-591</guid>

					<description><![CDATA[Thanks for this post.

For the TOTAL newbie, when I type:
get-pssnapin -reg


I receive:
Name        : SqlServerCmdletSnapin100
PSVersion   : 1.0
Description : This is a PowerShell snap-in that includes various SQL Server cmdlets.

Name        : SqlServerProviderSnapin100
PSVersion   : 1.0
Description : SQL Server Provider


Then, I should do (based on the &quot;Name&quot;):
Add-PSSnapin SqlServerProviderSnapin100
Add-PSSnapin SqlServerCmdletSnapin100

]]></description>
			<content:encoded><![CDATA[<p>Thanks for this post.</p>
<p>For the TOTAL newbie, when I type:<br />
get-pssnapin -reg</p>
<p>I receive:<br />
Name        : SqlServerCmdletSnapin100<br />
PSVersion   : 1.0<br />
Description : This is a PowerShell snap-in that includes various SQL Server cmdlets.</p>
<p>Name        : SqlServerProviderSnapin100<br />
PSVersion   : 1.0<br />
Description : SQL Server Provider</p>
<p>Then, I should do (based on the &#8220;Name&#8221;):<br />
Add-PSSnapin SqlServerProviderSnapin100<br />
Add-PSSnapin SqlServerCmdletSnapin100</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Rob Farley		</title>
		<link>https://lobsterpot.com.au/blog/2008/03/04/sql-server-2008-powershell-snapin/#comment-590</link>

		<dc:creator><![CDATA[Rob Farley]]></dc:creator>
		<pubDate>Mon, 28 Apr 2008 20:57:09 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/03/04/sql-server-2008-powershell-snapin.aspx#comment-590</guid>

					<description><![CDATA[Goodwin - there are some great books around. Pop down to a bookshop and glance through a few to find one that suits your learning style. But also read blogs like blogs.msdn.com/powershell to stay learning!

Aaron - I&#039;m not sure, because I don&#039;t run Exchange locally. However, if there&#039;s a PowerShell provider at all (through this Exchange Shell you mention), you should be able to see if it&#039;s treated as a snapin using &quot;Get-PSSnapin -reg&quot; like Darren and I did for the SQL stuff. And post back here to let me know how you go.]]></description>
			<content:encoded><![CDATA[<p>Goodwin &#8211; there are some great books around. Pop down to a bookshop and glance through a few to find one that suits your learning style. But also read blogs like blogs.msdn.com/powershell to stay learning!</p>
<p>Aaron &#8211; I&#8217;m not sure, because I don&#8217;t run Exchange locally. However, if there&#8217;s a PowerShell provider at all (through this Exchange Shell you mention), you should be able to see if it&#8217;s treated as a snapin using &#8220;Get-PSSnapin -reg&#8221; like Darren and I did for the SQL stuff. And post back here to let me know how you go.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Aaron Guilmette		</title>
		<link>https://lobsterpot.com.au/blog/2008/03/04/sql-server-2008-powershell-snapin/#comment-589</link>

		<dc:creator><![CDATA[Aaron Guilmette]]></dc:creator>
		<pubDate>Mon, 28 Apr 2008 20:50:11 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/03/04/sql-server-2008-powershell-snapin.aspx#comment-589</guid>

					<description><![CDATA[Does anyone know if this works for the Exchange 2007 Command Shell?  For those of us that admin multiple platforms and applications, the prospect of PS bloat is demoralizing.]]></description>
			<content:encoded><![CDATA[<p>Does anyone know if this works for the Exchange 2007 Command Shell?  For those of us that admin multiple platforms and applications, the prospect of PS bloat is demoralizing.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: G D Milner		</title>
		<link>https://lobsterpot.com.au/blog/2008/03/04/sql-server-2008-powershell-snapin/#comment-588</link>

		<dc:creator><![CDATA[G D Milner]]></dc:creator>
		<pubDate>Tue, 22 Apr 2008 00:54:37 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/03/04/sql-server-2008-powershell-snapin.aspx#comment-588</guid>

					<description><![CDATA[In my opinion, the best book on Powershell is and remains Bruce Payette&#039;s Powershell in Action. Also very good is the Windows PowerShell Cookbook by Lee Holmes. 

I just started reading Pro Windows PowerShell by Hristo Deshev, and that one looks pretty good, too. 

If you only buy one book, however, get Powershell in Action. 

Cheers]]></description>
			<content:encoded><![CDATA[<p>In my opinion, the best book on Powershell is and remains Bruce Payette&#8217;s Powershell in Action. Also very good is the Windows PowerShell Cookbook by Lee Holmes. </p>
<p>I just started reading Pro Windows PowerShell by Hristo Deshev, and that one looks pretty good, too. </p>
<p>If you only buy one book, however, get Powershell in Action. </p>
<p>Cheers</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Goodwin Robinson		</title>
		<link>https://lobsterpot.com.au/blog/2008/03/04/sql-server-2008-powershell-snapin/#comment-587</link>

		<dc:creator><![CDATA[Goodwin Robinson]]></dc:creator>
		<pubDate>Thu, 17 Apr 2008 04:33:26 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/03/04/sql-server-2008-powershell-snapin.aspx#comment-587</guid>

					<description><![CDATA[Hi Rob and everyone!

Great article, I DBA managing just over 60 SQL Server 2000/2005 Instances, supporting over 300 databses and it seems my day will be much more productive if I can script in PowerShell.

I know the basis in VBScript via WSH, so some knowledge base on my part to work with, but will like to take on PowerShell.

So, Please where would you suggest I start - books and web resource etc I could use to get up to speed.

Thanks

Goodwin]]></description>
			<content:encoded><![CDATA[<p>Hi Rob and everyone!</p>
<p>Great article, I DBA managing just over 60 SQL Server 2000/2005 Instances, supporting over 300 databses and it seems my day will be much more productive if I can script in PowerShell.</p>
<p>I know the basis in VBScript via WSH, so some knowledge base on my part to work with, but will like to take on PowerShell.</p>
<p>So, Please where would you suggest I start &#8211; books and web resource etc I could use to get up to speed.</p>
<p>Thanks</p>
<p>Goodwin</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Rob Farley		</title>
		<link>https://lobsterpot.com.au/blog/2008/03/04/sql-server-2008-powershell-snapin/#comment-586</link>

		<dc:creator><![CDATA[Rob Farley]]></dc:creator>
		<pubDate>Tue, 25 Mar 2008 16:16:01 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/03/04/sql-server-2008-powershell-snapin.aspx#comment-586</guid>

					<description><![CDATA[Sorry Steve, I actually haven&#039;t tried this! I doubt it&#039;ll work, but please try and let me know!]]></description>
			<content:encoded><![CDATA[<p>Sorry Steve, I actually haven&#8217;t tried this! I doubt it&#8217;ll work, but please try and let me know!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: steve		</title>
		<link>https://lobsterpot.com.au/blog/2008/03/04/sql-server-2008-powershell-snapin/#comment-585</link>

		<dc:creator><![CDATA[steve]]></dc:creator>
		<pubDate>Tue, 25 Mar 2008 07:02:50 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/03/04/sql-server-2008-powershell-snapin.aspx#comment-585</guid>

					<description><![CDATA[So do you need to install SQL 2008 or can you just copy the SQLPS.exe to your local machine?
]]></description>
			<content:encoded><![CDATA[<p>So do you need to install SQL 2008 or can you just copy the SQLPS.exe to your local machine?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Rob Farley		</title>
		<link>https://lobsterpot.com.au/blog/2008/03/04/sql-server-2008-powershell-snapin/#comment-584</link>

		<dc:creator><![CDATA[Rob Farley]]></dc:creator>
		<pubDate>Fri, 14 Mar 2008 15:59:45 +0000</pubDate>
		<guid isPermaLink="false">/blogs/robfarley/archive/2008/03/04/sql-server-2008-powershell-snapin.aspx#comment-584</guid>

					<description><![CDATA[But &#039;Invoke-SqlCmd&#039; comes with the SQL PS Provider, so you don&#039;t need to roll your own.

And for backup times, you don&#039;t need to go back into T-SQL, you can just do it from SMO directly:

PS SQL:rob-pcdefaultDatabases&gt; gci &#124; select-object name,lastbackupdate

And if you need to make SMO connections, you can. I guess it&#039;s no different really to using invoke-sqlcmd.

Of course, with SSMS 2008, you can do Local Server Group queries, which makes this much easier to do using T-SQL directly.

Rob]]></description>
			<content:encoded><![CDATA[<p>But &#8216;Invoke-SqlCmd&#8217; comes with the SQL PS Provider, so you don&#8217;t need to roll your own.</p>
<p>And for backup times, you don&#8217;t need to go back into T-SQL, you can just do it from SMO directly:</p>
<p>PS SQL:rob-pcdefaultDatabases> gci | select-object name,lastbackupdate</p>
<p>And if you need to make SMO connections, you can. I guess it&#8217;s no different really to using invoke-sqlcmd.</p>
<p>Of course, with SSMS 2008, you can do Local Server Group queries, which makes this much easier to do using T-SQL directly.</p>
<p>Rob</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
