Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! Why Should I Use Windows PowerShell with SQL Server 2008?

Hey, Scripting Guy! I recently saw that SQL Server 2008 has Windows PowerShell built into it. I looked at, but I am not really impressed. Why should I be interested in using Windows PowerShell with SQL Server 2008?- JJHi JJ,For some unknown reason, it has turned cool down here in Charlotte, North Carolina, in the United States. Not that ...

Hey, Scripting Guy! Quick-Hits Friday: The Scripting Guys Respond to a Bunch of Questions (03/27/09)

Determining if SQL Is Installed; How to Read Paired Information into a Dictionary Object  Hey, Scripting Guy! Being an avid reader of your columns for the last several years has been a blast. I wrote you once before but with no success (in terms of a reply, which was expected, and in terms of not seeing an article related to my question, ...

How Can I Create a Table in a SQL Server Database?

Hey, Scripting Guy! How can I create a table in a SQL Server database?-- FD Hey, FD. And thanks: you’ve saved the Scripting Guys!Or, at any rate, you’ve saved the Scripting Guy who writes this column. As it turns out, this Scripting Guy is getting ready to leave town and attend his nephew’s wedding. Before he can leave, however, he ...

How Can I Tell Whether a Specified Table Exists in a SQL Server Database?

Hey, Scripting Guy! How can I tell whether a specified table exists in a SQL Server database?-- LL Hey, LL. Well, as it turns out it’s absolutely impossible to tell whether a specified table exists in a SQL Server database. So, sorry, time to go back to watching the Major League Baseball playoffs. By the way, who else out there hates the ...

How Can I Get a List of All the Databases on a SQL Server Computer?

Hey, Scripting Guy! How can I get a list of all the databases on a SQL Server computer?-- ER Hey, ER. Before we answer your question, we’d like to take a moment to offer our opinions on all the major – and controversial – issues of the day. We can do that because the Scripting Editor is on vacation and, well, you know what they say: ...