PowerShell for SQL Server DBAs

PowerShell is Microsoft’s command line shell, and scripting language. Now on version 3, this toolset provides a huge host of cmdlets allowing many management tasks to be automated, or run against multiple servers as easily as against one.

SQL Server is one of the most heavily supported applications under Powershell. Almost any task than can be done via T-SQL or through SQL Server Management Studio can also be achieved through PowerShell. This powerful ability makes managing clusters or large implementations a much easier task.

This one day course offers a good insight into PowerShell and how it can be used with SQL Server. We cover the following topics:

  • The architecture and concepts behind PowerShell
  • The tools available from Microsoft and how to use them
  • The basics of PowerShell:
    • Finding Objects
    • Working with Objects
    • Reading and Writing from files
    • Conditional Processing
    • Formatting Output
    • Parameters
    • Code Reuse
  • SQL Server and Powershell:
    • The available Options
    • Connecting
    • Configuring SQL Server
    • Querying SQL Server
    • Maintaining SQL Server
    • Managing multiple SQL Server installations, or Cluster

We use real world examples throughout, and are happy to build in certain scenarios if it’s something you wish to explore. As with all of our courses we are happy to tailor it to your needs and experience, please contact us to discuss your requirements.

Recent posts on Powershell from our blog:

Powershell script to build up restore commands for SQL Server

Posted on Jan 14th, 2012 - By Stuart Moore - 0 Comments

I often need to restore a standby server up to the latest production restore, either for testing or because I to get it ready for mirroring. As it's…

Continue Reading

List of SQL Server instances and version on Cluster Nodes

Posted on Feb 13th, 2012 - By Stuart Moore - 0 Comments

With a large windows cluster with many installed SQL Server instances it can get tricky to quickly check which instances are on which nodes, and a…

Continue Reading

Powershell to drop out create table scripts from a text file

Posted on Dec 21st, 2012 - By Stuart Moore - 0 Comments

So you've been handed a list of tables that need to be migrated  from Dev to Staging ASAP. So powershell to the rescue for a nice quick…

Continue Reading