Just a note about this, on newer versions of SQL Server (2022 CTP2) note the -C flag [-C Trust Server Certificate] sqlcmd -S . -i .\install-human-events.sql -v TargetDB = "master" -C