I am trying to query a MS sql server via powershell and I had the command work once, but now it doesn't anymore. Similarly I can run a very simple select statement but when I call a function or do a slightly more complicated select statement it fails with the following error:
"format-default : the member "item" is already present."
This is the powershell code and sql statement:
invoke-sqlcmd -query "select * from trackitrpt_1.library where getutcdate() > duedate"