Using Powershell SMO you can run SQL Server statements and commands without the need to install more software.
This video shows how SQL Client SMO can be used with Powershell to select or create objects in SQL Server.
The example script for this can be found on Github.
https://github.com/HealisticEngineer/...
Follow us on
Twitter - / tipsforitpros
Facebook - / tipsforitpros