Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Data from simple query not passing to temp variable

$
0
0

I have been working on a script to gather info about a bunch of PCs and while I wrote very little of it originally, I've been tweaking it to make it run faster and to make the code less complex. This issue has to do with gathering info about monitors attached to a PC and I commented out a big snippet of code, in favor of a more simpler approach. I will post the code below but basically my new snippet works but the object data is not being passed to the Debugger - I have it write out the monitor info it found, but it is empty. I can see the variables in the Debugger and the monitor data is there. I just can't figure out why it's missing.


EDIT by Mike Laughlin: I've removed the posted script due to incorrect formatting. The code can be found in another post below.


I know it might be hard to read but hopefully someone can figure it out. The commented out section is what it had before. It worked but it is very complicated to follow, so I found an easier way to do it with less code. Any help would be greatly appreciated.

Brian Embree

Legacy Health System

Portland, OR



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>