Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Scripting gathering and inventorying info

$
0
0

I am relatively new to powershell and this might be a bit of running before walking but working through this will help crystallize a lot of concepts. There are two scenarios I am trying to address. I will try to walk through them and how I would approach it and any tips/suggestions would be appreciated.

Scenario 1 – I would like to go out to a bunch of machines and get a list of files and their attributes in the system and system32 folder. Specifically DLLs. Then I would like to create a table that list the file name in the first column and the various hosts across the top. I would like to then fill in the version numbers found.

I assume i could create a file with the list of host names. I could then do a dir (Get-Childitem) in those specific directories. I would then pipe that output somewhere. This is where I am getting lost as to how to format it the way I want or if that is possible.

Here is the second scneario

Below is a set of PS code that goes out and output the update to a log file (that I assume is local to each machine) I also understand that this will process sequentially.

What I would like to do is run these simultaneously (or at least as many as the default PS configuration allows) and pipe the information back to the client where I am running Powershell from to be output or sorted through by machine name, policy name etc. Is that possible?

Thanks,
David

icm -cm accounting-pc { gpupdate /force/wait:120) > accounting-pc.log
icm -cm adtest { gpupdate /force/wait:120) > adtest.log
icm -cm issexpo { gpupdate /force/wait:120) > issexpo.log
icm -cm issline1 { gpupdate /force/wait:120) > issline1.log
icm -cm issline2 { gpupdate /force/wait:120) > issline2.log
icm -cm issline3 { gpupdate /force/wait:120) > issline3.log
icm -cm issoffice { gpupdate /force/wait:120) > issoffice.log
icm -cm isspos1 { gpupdate /force/wait:120) > isspos1.log


Viewing all articles
Browse latest Browse all 13067

Trending Articles