Remote Software Inventory

So you want to check a server named firefly and see what’s installed on it and the version
This script querys the remote  computer’s uninstall keys and writes out the Display Name and Display version
of everything it finds.
 
 
#<—-Start PowerShell Script ——->
$computer = "firefly"
$uninstallkey="SoftwareMicrosoftWindowsCurrentVersionUninstall"
$keytype=[Microsoft.Win32.RegistryHive]::LocalMachine
$remotebase=[Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($keytype,$computer)
$regkey=$remotebase.OpenSubKey($uninstallkey)
 
$regkey.GetSubKeyNames() | foreach {
     $DisName = $remotebase.OpenSubKey("$uninstallkey$_").GetValue("DisplayName")
  $DisVer = $remotebase.OpenSubKey("$uninstallkey$_").GetValue("DisplayVersion")
  Write-Host $DisName "`t" $DisVer
}
 
#<—- End Script ———>
 
Looking for something more specific? Like Adobe Flash?
 
#<—-Start Script ——->

 

$computer = "firefly"
$uninstallkey="SoftwareMicrosoftWindowsCurrentVersionUninstall"
$keytype=[Microsoft.Win32.RegistryHive]::LocalMachine
$remotebase=[Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($keytype,$comp­uter)
$regkey=$remotebase.OpenSubKey($uninstallkey)
$regkey.GetSubKeyNames() | where {$_ -like "adobe flash*"} | foreach {
        $remotebase.OpenSubKey("$uninstallkey$_").GetValue("DisplayVersion")
}

#<—- End Script ———>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s