Hi,
I am reading the book Powershell Toolmaking in a month of lunches. Which I really like!
But I am running into an issue at chapter 14, Adding database access. It seems when I am querying the database, I get next to the results, also some kind of row count.
Which is then also used as a value and is then causing an error.
When I query the database, which contains three computernames, it first displays a 3 and then the three computernames. When I pipe this into the Get-MOLSystemInfo, it is trying to connect to computer 3, before it continues with the actual machines from the database, as you can see in file1.
I have pinned it down to the Get-MOLDatabaseData function. I have paste into ISE, made some adjustments so that it works as a standalone script, and I get the same behavior. As you can see in file2.
So my question is, how do I get rid of this total count value?
Did I miss something somewhere?
Thanks,
Ramon Bruin