Loading SMO In Powershell

Chrissy LeMaire shows how to load SMO with full names when you don’t know which version is installed:

In a recent version of PowerShell, Publish-Module, which publishes modules to the Gallery began requiring fully qualified Assembly names such as “Microsoft.SqlServer.Smo, Version=$smoversion, Culture=neutral, PublicKeyToken=89845dcd8080cc91”.

Previously, it was sufficient just to use short names such as Microsoft.SqlServer.Smo. This had similar behavior to LoadWithPartialName.

I get that LoadWithPartialName is sketchy, but the solution that Chrissy has to do seems overly complicated to me.  Nonetheless, those are the rules of the game now, I suppose.

Related Posts

Streaming Data To Power BI

Sacha Tomey builds a quick Powershell script to feed streaming data into Power BI: Peter showed off three mechanisms for streaming data to a real time dashboard: The Power BI Rest API Azure Stream Analytics Streaming Datasets We’ve done a fair bit at Adatis with the first two and whilst I was aware of the August […]

Read More

The Importance Of Powershell

Kevin Hill explains why he’s advocating that DBAs learn Powershell: 2 very solid reasons (there are others) that every DBA should be learning and using PowerShell: 1 – Its very useful for admin at the O/S level. At my current client I am team lead of System and SQL Admins, along with doing any of […]

Read More


December 2016
« Nov Jan »