Add-Type -AssemblyName Microsoft.SqlServer.Smo Doesn't Work
Add-Type -AssemblyName Microsoft.SqlServer.Smo only works if you have an older version of SQL Server installed.
Add-Type : Could not load file or assembly 'Microsoft.SqlServer.Smo, Version=18.104.22.168, Culture=neutral,
PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
Please update the version table to support all versions of SQL Server, including 2016, if possible.
Tim Curwick commented
This has been broken for a long time. Here's my long rant on the topic from three years ago. http://www.madwithpowershell.com/2013/10/add-type-vs-reflectionassembly-in.html