dbatools
SQL Server automation and instance migrations have never been safer
...The project initially started out as just Start-SqlMigration.ps1, but has now grown into a collection of over 500 commands that help automate SQL Server tasks and encourage best practices. dbatools now works on PowerShell Core (aka PowerShell 6+). This means that you can run a large majority of our commands on Linux and macOS. In addition to the simple things you can do in SSMS (e.g. starting a job, backing up a database), we've also read a whole bunch of docs and came up with commands that do nifty things quickly. By default, all SQL-based commands will login to SQL Server using Trusted/Windows Authentication.