Quick Tip – Enabling SQLPSX to use SQL Server 2012

If you, like me use a LOT SQLPSX (SQL Server PowerShell Extensions), and want that it runs with SQL Server 2012, you just need to change the code in the beginning of the file SQLServer.psm1 to load the SQL Server 2012 assemblies :


try {
add-type -AssemblyName "Microsoft.SqlServer.ConnectionInfo, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91" -EA Stop
} catch {
add-type -AssemblyName "Microsoft.SqlServer.ConnectionInfo"

try {add-type -AssemblyName "Microsoft.SqlServer.Smo, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91" -EA Stop; $smoVersion = 10
} catch {
add-type -AssemblyName "Microsoft.SqlServer.Smo"; $smoVersion = 9



try {add-type -AssemblyName "Microsoft.SqlServer.SMOExtended, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91" -EA Stop}

catch {add-type -AssemblyName "Microsoft.SqlServer.SMOExtended" -EA Stop}


catch {Write-Warning "SMOExtended not available"}

Also I am facing a LOT of problems with PoweGUI, issues that not happens with ISE and the Host itself. So I decided to give the PowerShell ISE a try. So far I am enjoying, just need to check better the debug. The debug from PowerGUI is amazing !!!!

Lets see what happens !!!

About Laerte Junior

Laerte Junior Laerte Junior is a SQL Server specialist and an active member of WW SQL Server and the Windows PowerShell community. He also is a huge Star Wars fan (yes, he has the Darth Vader´s Helmet with the voice changer). He has a passion for DC comics and living the simple life. "May The Force be with all of us"
This entry was posted in Algo que Esqueci de Categorizar. Bookmark the permalink.

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 )

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