![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Reporting on registry values I am working on a project where I have to grab registry settings from a bunch of clients and run a report based on those settings. So far, I've gotten PowerShell to dump the settings from all of my clients to a text file (one for each client). The files are formatted as: Key name Key Value Key name Key Value ..... What I want to do is look through all the files for a key name of ProductVersion, for example, and tell me the total number of files that contain that value. And then tell me of that total, what number have version 8.0, what number have 8.1, etc. And I don't want to have to tell the script what values to look for. In other words, I don't know all of the different versions that may exist out there, I'd like the script to tell me that. Is there an easy way to do this? Thanks, Tim |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | Re: Reporting on registry values Try this: dir *.txt | foreach { switch -regex -file $_ {'ProductVersion\s+(\d+\.\d+)' {$matches[1]; $total+=1}} } | group -noElement "`nTotal found: $total" Here a sample output. The Name column is the key (ProductVersion) value: Count Name ----- ---- 1 2.0 3 8.0 3 8.1 1 3.1 3 7.6 1 8.6 Total found: 12 --- Shay Levi $cript Fanatic http://scriptolog.blogspot.com
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #3 (permalink) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Guest | Re: Reporting on registry values Wow! That's fantastic. Thanks Shay. On May 23, 8:38*pm, Shay Levi <n...@xxxxxx> wrote:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remote HKU registry values | aukiman | PowerShell | 0 | 08-18-2008 09:11 PM |
| My documents messed up, need help finding registry values!! | Respawns | Vista file management | 3 | 05-15-2008 02:49 AM |
| need some registry values | Michael | Vista General | 5 | 03-12-2007 11:01 PM |
| reading/writing registry values | J.Marsch | PowerShell | 3 | 07-05-2006 01:51 PM |
| Access values y registry Keys | Javier Pierini | PowerShell | 2 | 06-27-2006 12:34 PM |