Alas, Chad Miller's excellent add-sqltable started failing. To the internet!
Could not load file or assembly 'Microsoft.SqlServer.Dmf"
Looking around, it appears that it's a problem with SMO. On 2017, they split out SMO and SSMS. Which means that installing SSMS 2017 doesn't get you SMO. Supposedly installing it (install-module sqlserver) will do that, but I'd already did that and it wasn't working.
So, after fighting with it for a little bit, I decided to "get it working" and revisit later.
1) Install SSMS 2016 (which is when they started separating out SSMS)
2) Change the version from 11 to 13 in the script, as below:
try {add-type -AssemblyName "Microsoft.SqlServer.ConnectionInfo, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" -EA Stop}
catch {add-type -AssemblyName "Microsoft.SqlServer.ConnectionInfo"}
try {add-type -AssemblyName "Microsoft.SqlServer.Smo, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" -EA Stop}
catch {add-type -AssemblyName "Microsoft.SqlServer.Smo"}
No comments:
Post a Comment