Hi All.
I am tryin to save a value from the database into a Ps variable, however its not working.
$result = invoke-Sqlcmd2 -ServerInstance "xxxx" -Database database_name -Query "select request_active from requests where active_request = 1 "
My column request_active is a bit column and I have tried different methods to get it to work to no avail. Lastly, I am only using invoke-sqlcmd2 because the server is SQL 2008 R2 on windows 2008 R2, and it does not have invoke-sqlcmd installed by default.
Thanks in advance.