Install the SQL Server PowerShell Module from PowerShell Gallery

PowerShell commands such as https://docs.microsoft.com/en-us/powershell/module/sqlserver/invoke-sqlcmd?view=sqlserver-ps may require installation of the https://docs.microsoft.com/en-us/powershell/module/sqlserver/?view=sqlserver-ps. The module is supported by Microsoft but may not be included in default installations of PowerShell on Windows.