How To Get List Of Installed Software Windows
At that place are situations where y'all need to check whether you or your users accept certain software installed, and what is its version. You may want to cheque if the software is upwardly to date or if your GPO-deployed software has been installed for a certain user. I'll prove you several methods you can utilize to check that with PowerShell.
Quick navigation:
- Check installed software list locally
- Get-WmiObject
- Registry query
- Issue log
- Check installed software listing remotely
- Get-WmiObject
- Registry query
- Effect log
- Bank check if GPO-deployed software was applied successfully
Check what's installed on your computer
To check what software is installed, you tin ever use Programs and Features in your Control Panel or scan all deejay partitions in search of a specific app. You can even try and find an app in the Start menu in order to launch information technology and search for its version number manually. However, the problem with those methods is that they are as far from "quick and automatic" as they can be. Checking the installed software versions by using PowerShell allows you lot to gather data that yous need much quicker.
Get installed software list with Get-WmiObject
The first method is as simple every bit pasting a elementary query:
Get-WmiObject -Class Win32_Product
You lot tin also easily filter the data to notice specific applications from a single vendor, together with their versions, for example:
Go-WmiObject -Class Win32_Product | where vendor -eq CodeTwo | select Name, Version
Despite existence very like shooting fish in a barrel, this method has a major downside – it takes quite a while to return the results.
Query registry for installed software
Another method of getting a list of installed software is querying the registry. The following short script returns the list of applications together with their versions:
$InstalledSoftware = Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall" foreach($obj in $InstalledSoftware){write-host $obj.GetValue('DisplayName') -NoNewline; write-host " - " -NoNewline; write-host $obj.GetValue('DisplayVersion')}
Now, take a quick look at the HKLM element bolded above. It means that the list of software returned past the script is all the software installed on the LM – local machine. However, applications tin can be installed per user as well. To return a list of applications of the currently logged user, change HKLM to HKCU (CU stands for "current user"):
$InstalledSoftware = Become-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall"
foreach($obj in $InstalledSoftware){write-host $obj.GetValue('DisplayName') -NoNewline; write-host " - " -NoNewline; write-host $obj.GetValue('DisplayVersion')}
Getting the list of recently installed software from the Event Log
If you want to check only the recently installed software, you can employ the following cmdlet to search through the Event Log.
Become-WinEvent -ProviderName msiinstaller | where id -eq 1033 | select timecreated,message | FL *
This method of finding out installed software is most reliable for the recently added elements because, past default, event logs are set to overwrite the oldest records (circular logging).
Learn more about using PowerShell to check Windows Outcome Logs and filtering results
Get a list of installed software remotely
Each of the methods mentioned higher up tin likewise exist used to check software installed on other machines in the same network. If y'all create a listing of all the calculator names in your network, you can use the methods below inside a Foreach loop to return results from more a unmarried remote PC.
$pcname in each script stands for the name of the remote calculator on which you want to become a listing of installed software and their versions.
Become installed software list with remote Get-WmiObject command
The following cmdlet is, once again, the easiest in the bunch, but can have some time to terminate:
Go-WmiObject Win32_Product -ComputerName $pcname | select Name,Version
where $pcname is the name of the estimator you lot want to query.
Check installed software with remote registry query
Remote registry queries are slightly more complicated and require the Remote Registry service to be running. A sample query is equally follows:
[email protected]() $InstalledSoftwareKey="SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall" $InstalledSoftware=[microsoft.win32.registrykey]::OpenRemoteBaseKey('LocalMachine',$pcname) $RegistryKey=$InstalledSoftware.OpenSubKey($InstalledSoftwareKey) $SubKeys=$RegistryKey.GetSubKeyNames() Foreach ($key in $SubKeys){ $thisKey=$InstalledSoftwareKey+"\\"+$key $thisSubKey=$InstalledSoftware.OpenSubKey($thisKey) $obj = New-Object PSObject $obj | Add together-Member -MemberType NoteProperty -Proper name "ComputerName" -Value $pcname $obj | Add-Fellow member -MemberType NoteProperty -Proper name "DisplayName" -Value $($thisSubKey.GetValue("DisplayName")) $obj | Add together-Member -MemberType NoteProperty -Name "DisplayVersion" -Value $($thisSubKey.GetValue("DisplayVersion")) $list += $obj } $list | where { $_.DisplayName } | select ComputerName, DisplayName, DisplayVersion | FT
Check recently installed software list from the Consequence Log remotely
Checking a user's effect log remotely requires adding a single attribute (-ComputerName) to the cmdlet used before:
Go-WinEvent -ComputerName $pcname -ProviderName msiinstaller | where id -eq 1033 | select timecreated,bulletin | FL *
Check if a GPO-deployed software was applied successfully
If you lot practical a certain software version via GPO, you can easily check if this GPO was successfully practical to a user or not. All yous need is the GPResult tool and names of the target calculator and user:
gpresult /s "PCNAME" /USER "Username" /h "Target location of the HTML study"
Then, expect for your GPO name and check if it is listed nether Practical GPOs or Denied GPOs. The sample GPO beneath is in the Applied GPOs group.
Source: https://www.codetwo.com/admins-blog/how-to-check-installed-software-version/
Posted by: mcgonaglethemisside.blogspot.com
0 Response to "How To Get List Of Installed Software Windows"
Post a Comment