| [ Web Proxy ] |
| Viewing: https://riptutorial.com/powershell/example/26405/sqlquery | [Back] [Original] |
[logo rip]
For querying all the data from table MachineName we can use the command like below one.
$Query="Select * from MachineName"
$Inst="ServerInstance"
$DbName="DatabaseName
$UID="User ID"
$Password="Password"
Invoke-Sqlcmd2 -Serverinstance $Inst -Database $DBName -query $Query -Username $UID -Password $Password
| Web Proxy Viewer | New URL | Original Page |