Closed dotps1 closed 7 years ago
Sorry for the delay in answering.
There are two ways to pass in queries, and I admit it's a little confusing.
To simply pass in Sql text, use the -Sql
parameter:
Invoke-MySqlQuery -Sql 'SELECT * FROM v_computers' -Credential $credentials -Database MyDB -Server MyServer
The SqlQuery parameter is actually an object you have to build that consists of the Sql text, Sql parameters, and other information. It's used for piping in multiple CUDs in a single transaction. For more information on the SqlQuery parameter see the doc here: https://github.com/ctigeek/InvokeQueryPowershellModule#sqlquery-parameter
Let me know if you have any other problems! Steve
right on, thanks for the explination, i already built my solution using @RamblingCookieMonster 's Invoke-MySqlQuery
script.
just trying to use the Invoke-MySqlQuery and it doesn't like the string for the query:
Error: