Question: Please create a PowerShell script to fetch the list of all the installed software through Registry keys. And create a Hash table to hold the
Please create a PowerShell script to fetch the list of all the installed software through Registry keys. And create a Hash table to hold the information (DisplayName & DisplayVersion).
I have created the script in PowerShell which is below:
# Created a Variable to hold all Information and will give output to user and Get-ChildItem = for getting child items like DisplayName and DisplayVersion $InstalledSoftware = Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall" # Foreach($obj in $InstalledSoftware) = Scanning each installed software in registry location foreach($obj in $InstalledSoftware){write-host $obj.GetValue('DisplayName') -NoNewline; write-host " - " -NoNewline; write-host $obj.GetValue('DisplayVersion')}
It is fetching fetch the list of all installed software through registry keys but I like to know how to create Hash Table?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
