<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Use PowerShell to Administer SQL Server 2008</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/30/use-powershell-to-administer-sql-server-2008.aspx</link><description>Summary : Microsoft MVP Sean McCown shows how to use Windows PowerShell to administer remote SQL Servers using easy commands. 
 
 Hey, Scripting Guy! I am an extremely busy database administrator (DBA), and at a recent SQL Saturday event, I heard several</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Use PowerShell to Administer SQL Server 2008</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/30/use-powershell-to-administer-sql-server-2008.aspx#3360014</link><pubDate>Tue, 05 Oct 2010 16:00:52 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3360014</guid><dc:creator>ScriptingGuy1</dc:creator><description>&lt;p&gt;We have changed that verbage to databases. Thanks for pointing it out. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3360014" width="1" height="1"&gt;</description></item><item><title>re: Use PowerShell to Administer SQL Server 2008</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/30/use-powershell-to-administer-sql-server-2008.aspx#3359878</link><pubDate>Tue, 05 Oct 2010 03:53:06 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3359878</guid><dc:creator>Sean McCown</dc:creator><description>&lt;p&gt;Justin,&lt;/p&gt;
&lt;p&gt;Thanks for catching that mistake. &amp;nbsp;You&amp;#39;re right, I meant to say databases instead of servers there. &amp;nbsp;We&amp;#39;re changing it so it &lt;/p&gt;
&lt;p&gt;should read correctly soon.&lt;/p&gt;
&lt;p&gt;As to your other comment, you&amp;#39;re right about the behavior of dir/gci, but you&amp;#39;re mistaken about the fact that I left out the &lt;/p&gt;
&lt;p&gt;context or just assumed the reader knew it. &amp;nbsp;If you look in the text directly following the code, I very clearly state &amp;nbsp;&amp;quot;First, &lt;/p&gt;
&lt;p&gt;let us talk about how to get where you need to be. In the SQL Server Management Studio (SSMS), right-click the database folder &lt;/p&gt;
&lt;p&gt;and click Start PowerShell in the shortcuts menu. Then type the code shown earlier.&amp;quot;&lt;/p&gt;
&lt;p&gt;So I don&amp;#39;t believe I assumed anything. &amp;nbsp;I gave the context of being in the databases folder.&lt;/p&gt;
&lt;p&gt;Again though, thanks for taking the time to comment because if you missed that, then others may have too, and reading through &lt;/p&gt;
&lt;p&gt;these comments may clarify this for someone.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Sean McCown&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3359878" width="1" height="1"&gt;</description></item><item><title>re: Use PowerShell to Administer SQL Server 2008</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/30/use-powershell-to-administer-sql-server-2008.aspx#3359707</link><pubDate>Mon, 04 Oct 2010 15:42:23 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3359707</guid><dc:creator>jrich</dc:creator><description>&lt;p&gt;Nice post!&lt;/p&gt;
&lt;p&gt;Just after your TSQL code you mistakenly said we&amp;#39;ll be doing this for 200 servers, not databases. It could easily be done, but thats a different task!&lt;/p&gt;
&lt;p&gt;Also one part you left out or assumed was the dir part. dir (or more so, gci) will only pull a list of databases if you are in the right location. you&amp;#39;ll want to move to the correct location first.&lt;/p&gt;
&lt;p&gt;The path looks something like this&lt;/p&gt;
&lt;p&gt;sqlserver:\sql\&amp;lt;servername&amp;gt;\&amp;lt;instancename&amp;gt;\databases&lt;/p&gt;
&lt;p&gt;If you navigate to that location your DIR will work as expected. you can do a DIR at any location you want, so for example, if you arent sure what instance to use, you can go to the server and do a dir to see what instances are available to you!&lt;/p&gt;
&lt;p&gt;Justin&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3359707" width="1" height="1"&gt;</description></item></channel></rss>