Loading the SQLPS module

Loading the SQLPS module gives you quick access to the sql cmdlets, sql provider and the SMO assemblies. It also, infuriatingly, moves your location into the sql provider.

I (really) *  (lots ) hate things that assume what I want to do.

You can use PowerShell to reverse this annoying, and arrogant action:


Import-Module SQLPS


Will get you back where you were.

SQLPS is slowly becoming a civilised member of the PowerShell eco-system especially when compared to its first incarnation.  A few more versions and it might behave properly.

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

2 Responses to Loading the SQLPS module

  1. Derek says:

    Thank you for this, I haven’t used the Push and Pop-Location cmdlets. I was making a variable store the pwd, then cd back after an import! Gah.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s