r/PowerShell • u/adrianrodriguez • Apr 11 '15
[Power Shell] Inventory Monitors with PowerShell - Pastebin.com
http://pastebin.com/Exqgj2Nh
23
Upvotes
2
u/Already__Taken Apr 12 '15
Plugging my function to generate computer names as I don't bother making CSVs.
there's also piping the adcomputer cmdlet with a specific searchbase.
1
u/xandora Apr 12 '15
Neat, can you pass it multiple computers to check?
2
u/Already__Taken Apr 12 '15
Yes because the Param for computers is
[string[]]specifically the extra[]being an array of strings
1
u/jfractal Apr 12 '15
I made a similar script recently, and have a question. How does one take a foreach loop going to a custom object and create an array of the foreach values? In other words, say I want a single XML file that contains objects for each of the servers that I've scanned? Furthermore, how can I reference specific objects in that array by name later?