Add-Type -AssemblyName "Microsoft.SqlSever.Smo"
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.
Knowing that my machine has had multiple versions of SQL and Visual Studio installed at some point, I decided to opt for the latest and provide the FullName of the assembly instead:
Add-Type -AssemblyName 'Microsoft.SqlServer.Smo, Version=22.214.171.124, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
That seemed to work. Yes, I did get the assembly first to verify that all the referenced assemblies are there. Not sure why the loader would default to 126.96.36.199, but that is not my problem right now.