The SQLPS module has been slow to load for years now and has finally been fixed in the April 2016 release. But most of us couldn't wait a few years and edited the SqlPSPostscript.ps1 file that sits in the module directory.

If you've done this on one of the SSMS previews (not SQL 2014 as it's in a different directory) and then upgraded to the April preview though you'll be missing something, two things actually, being aliases for the renamed Encode-SqlName and Decode-SqlName, which won't get put into your modified SqlPSPostScript.ps1 file. And so if you use these your older scripts may break.

How do you reproduce it?

  • Install the February 2016 SSMS preview.

  • Make a copy of your SqlPSPostScript.ps1 file.

  • Edit it in any way. I added a comment. Moo!

  • Install the April 2016 SSMS preview.

  • Revel in the glory of a broken cmdlet and missing alias.

The fix is very simple though. Delete your SQLPSPostScript.ps1 file and then re-run the installer and do a Repair (it won't do anything if you don't delete the file, and it won't fail or warn you either).

Here's the properly modified file with the aliases after the repair.