Gary Varga (6/17/2013)
Almost, unless I am mistaken you have missed single quotes either side of the comma i.e.
$wmiObject.GetValue(0)["SystemName"] + "','" + $wmiObject.GetValue(0)["DeviceID"]+ "')"
I am sure that you will have come across the need for quotes within quotes before. Lovely. 😉
Heh... thanks, Gary. Lovely nested quotes indeed. 🙂
The outstanding question is will the code you posted do all of the rows or am I going to have to build 1 insert row for each row found in the $wmiObject?
--Jeff Moden
Change is inevitable... Change for the better is not.