【PowerShell】Invoke-Sqlcmdを使う

Powershellのオブジェクトとして各パーツを扱えるので便利な模様
1 |
Install-Module -Name SqlServer |
1 2 3 |
Invoke-Sqlcmd -ServerInstance "test.database.windows.net" -Database "test" -Username "user" -Password "password" -Query "select @@version |
1 2 3 |
Column1 ------- Microsoft SQL Azure (RTM) - 12.0.2000.8 ... |