locked
Remote Registry PowerShell RRS feed

  • Question

  • I've found a solution that lets me view the remote registry for installed applications

    I have two problems
    First, it list every version of software ie:

    Google Chrome 50.0
    Google Chrome 64.0

    How do I just select The most current one?

    Second,

    It also list applications that all enterprise PCs have included ie
    Mozilla Firefox 52.3.0 ESR

    How can I get it so that those are removed out.  So for example, if a PC has Adobe Acrobat 2015, Adobe Acrobat 2017, Mozilla Firefox 52.3.0 ESR, and both version of Chrome installed, I'd like my results to just be:

    Adobe Acrobat 2017
    Google Chrome 64.0

    $key = "SOFTWARE\Wow6432Node\CompanyName\InstalledSoftware"
    $type = [Microsoft.Win32.RegistryHive]::LocalMachine
    $regKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($type, $computer)
    $regKey = $regKey.OpenSubKey($key)
    $results = Foreach($sub in $regKey.GetSubKeyNames()){$sub}
    
    $results
    Thursday, March 1, 2018 10:29 PM

Answers

  • I used the Get-RemotePrograms script in the library.  ( I still can't post links or upload pictures)

    Just added this 
    $applications = Get-RemoteProgram -ExcludeSimilar -SimilarWord 3 -Property DisplayVersion | Select-Object ProgramName, DisplayVersion | Sort-Object ProgramName
    $applications | ForEach-Object {New-Item "C:\Windows\Temp\testtest\$($_.ProgramName)" -ItemType File -Force -ErrorAction SilentlyContinue | Out-Null}

    $EnterpriseApps = Get-Content "\\Server1\projects\Scripts\EnterpriseApps.txt"
    (Get-ChildItem C:\Windows\temp\testtest -Exclude $EnterpriseApps)

    It's exactly like my old script, just better!

    Now onto working it into my DGV




    Tuesday, March 6, 2018 4:54 AM

All replies

  • There is no specific way to do that.


    \_(ツ)_/

    Thursday, March 1, 2018 10:36 PM
  • Well that is unfortunate.  Would have cut down a tremendous amount of time on a project.  I'll have to see if I can googlefu some items.

    I was thinking of putting my results in an array and maybe using an -exclude from my $enterpriseapps array ( $enterpriseapps would house all known softwares that every PC gets)
    Thursday, March 1, 2018 10:41 PM
  • Rethinking this. What if I export it out to a txt file and parse that?
    Thursday, March 1, 2018 11:09 PM
  • Doesn't  matter.  The information is not arranged such that you can do that.  You would need tables of all matching software that could tell you which names are really the same programs.


    \_(ツ)_/

    Thursday, March 1, 2018 11:11 PM
  • Let me check the regkey and structure. Will post an update
    Thursday, March 1, 2018 11:28 PM
  • Hello, me again...

    Checked my registry.  Would this info be helpful?

    Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Deployments\Installed\JAM Software TreeSize Professional 6.3.7.1230'
    
    ProductManufacturer : JAM Software
    ProductName         : TreeSize Professional
    ProductVersion      : 6.3.7.1230

    Figure if I can get it running Get-ItemProperty, I should be able to capture these values using remote registry...
    Friday, March 2, 2018 2:20 AM
  • What is the exact question?  What is it you are trying to get from the registry.


    \_(ツ)_/

    Friday, March 2, 2018 2:31 AM
  • I'd prefer we not return multiple values ( Adobe Acrobat 15, Adobe Acrobat 17 )
    I'd prefer we not return the values that are installed on everyone's machines ( Mozilla Firefox, Office Products, etc... this equates to about 20 application that I do not want to display)

    I want to return these values into a DGV so the techs can verify with the customer the correct applications on their current PC so they can be installed on a new PC.

    For example.  You're my customer
    I put in your PC # into a text box, and click Go

    I call you up
    Hi JRV, we're replacing your computer and need to verify the applications you have on your current PC need installed on the next pc.  I see you have Visio 2016, Chrome, and Adobe Acrobat installed

    Hey WindowsUser127, That's correct but what about Firefox, Word and Excel...?

    Those are all standard applications that everyone has so no need to verify them.

    Sounds great, go ahead and build my new PC!"

    Currently this one process takes 10 minutes, I'd like to reduce that dramatically.
    This project starts in a few weeks, so here's to hoping :D
    Friday, March 2, 2018 3:10 AM
  • You can get all of that information and much, much more using the Windows "systeminfo" utility.

    Try it:

    systeminfo /?

    This utility can be run remotely.


    \_(ツ)_/

    Friday, March 2, 2018 3:18 AM
  • Hello,

    I'm not sure I follow you.

    systeminfo display just that.

    I can't upload or share a link because my account isnt verified :/

    I just need values from a key, that's nested inside another key.

    These values contain:
    ProductManufacturer
    ProductName
    ProductVersion

    I don't know how to do this using remote registry and powershell.  I currently have a way that's not efficient as it shows duplicates or applications we don't need.

    If I just displayed everything in this registry key, there would be about 45 items (company scripted applications)for every computer.  In reality I average needing 5 - see what I'm trying to do now? I only want the latest customer specific applications

    This is the best place in my environment to get what applications are installed.  Sure I can fumble through add/remove programs while interrupting your day but I bet you’d be much happier with a 15 second phone call. I can't help they have scripters and engineers leaving their cache/crap all around the PC making the refresh process "fun". I’m trying to maximize PowerShell for routine tasks

    I'm trying to deploy 8,000 computers in 2 years with 15 techs:

    Survey - Gather REQUIRED information from PC for new PC
    Build - Use SCCM ( which SCCM client or WMI are hosed on 4% of these PCs)
    Deploy - Local and remote sites all across the states

    If I give them the tools to succeed and enjoy doing this making it easier for everyone, all is well and my company will be on Windows 10.

    This is the code I currently have

    $srv = 'PC1'
    $key = "SOFTWARE\WOW6432Node\Deployments\InstallHistory\"
    $type = [Microsoft.Win32.RegistryHive]::LocalMachine
    $regKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($type, $Srv)
    $regKey = $regKey.OpenSubKey($key)
    Foreach($sub in $regKey.GetSubKeyNames()){
    $sub
    }

    This companies last deployment was an absolute disaster that still rears its head daily. I’m trying to make the leap to Windows 10 much less of a burden. By obtaining these specific registry items to display in a form we’re already 33% more successful.




    Friday, March 2, 2018 4:58 AM
  • Look in the Gallery for scripts that do what you are asking.  There are dozens, perhaps more.

    http://gallery.technet.microsoft.com


    \_(ツ)_/

    Friday, March 2, 2018 2:34 PM
  • I used the Get-RemotePrograms script in the library.  ( I still can't post links or upload pictures)

    Just added this 
    $applications = Get-RemoteProgram -ExcludeSimilar -SimilarWord 3 -Property DisplayVersion | Select-Object ProgramName, DisplayVersion | Sort-Object ProgramName
    $applications | ForEach-Object {New-Item "C:\Windows\Temp\testtest\$($_.ProgramName)" -ItemType File -Force -ErrorAction SilentlyContinue | Out-Null}

    $EnterpriseApps = Get-Content "\\Server1\projects\Scripts\EnterpriseApps.txt"
    (Get-ChildItem C:\Windows\temp\testtest -Exclude $EnterpriseApps)

    It's exactly like my old script, just better!

    Now onto working it into my DGV




    Tuesday, March 6, 2018 4:54 AM
  • Hi,

    Good to hear that you have solved this issue by yourself. In addition, thanks for sharing your solution in the forum as it would be helpful to anyone who encounters similar issues.

    If there is anything else we can do for you, please feel free to post in the forum.

    Best Regards,
    Albert


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, March 7, 2018 8:43 AM
  • The dev of Get-RemoteProgram is actually going to add this feature

    https://github.com/jaapbrasser/SharedScripts/issues/18
    Wednesday, March 7, 2018 12:39 PM