SMO with SQL Server 2012

I’ve been working quite a bit with PowerShell and SQL Server 2012 just recently. In earlier versions of SQL Server you had to load the SMO assemblies to get access to the admin functionality.

In SQL Server 2012 –

import-module sqlps

gives you the SQL Server provider, the cmdlets and loads the SMO assemblies for you.

Nice and easy so I don’t have to do anything extra. That’s a good module

This entry was posted in PowerShell and SQL Server. Bookmark the permalink.

2 Responses to SMO with SQL Server 2012

  1. psjjw says:

    Agree, but there is one little thing that don’t like:
    When you import this module, Powershell switches location.
    That’s understandable for those who want to use the SQL provider, if you are working interactively…but its’s a nuisance if you use it in a script.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s