Invoke-DbaQuery "Cannot convert value to type System.String" error #9444
Replies: 1 comment
-
Never mind, looks like this error is related to new SMO library behavior. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am getting the error trying to execute query similar to the one from Example 5 (dbatools docs).
This one works:
Invoke-DbaQuery -SqlInstance instance_name -Database master -Query 'select name from sys.databases d where d.name = ''model'';'
This one fails:
Invoke-DbaQuery -SqlInstance instance_name -Database master -Query 'select name from sys.databases d where d.name = @name;', -SqlParameter @{ name = "model" }
What am I doing wrong?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions