I have read through the fine PowerShell “Deep Dives” book with its description & examples of loading .NET Framework Assemblies then referencing SMO objects to carry out SQL activity. Yet there is also the PowerShell SQL Provider [SQLPS] and its Invoke-SqlCmd module.
A scattering of comments seem to imply that the SMO objects are quicker, more efficient, and most PowerShell SQL examples use SMO. Other comments say loading the SQL Provider is cleaner [less code, easier for another person to read your code] and SQLPS is likely to gain more yet features, while little further work is expected on the SMO front.
As one who is starting to write PowerShell SQL code, is one recommended over the other at this point in time ? Advice would be appreciated.