Powershell for the list of installed application in a domain

Sree 1 Reputation point
2020-10-26T06:10:54.943+00:00

Can any one help me with the script for the below scenario.

I have all my computers joined in domain with static IP address assigned. Using any script can I get the list of installed softwares in those computers?

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 34,116 Reputation points Microsoft Vendor
    2020-10-26T07:26:57.013+00:00

    Hi,

    This script can do that for you. Assume computer names in your domain are computername1, computername2 and computername3:

    $computernames = "computername1","computername2","computername3"  
     $array = @()  
     foreach($computername in $computernames){  
         #Define the variable to hold the location of Currently Installed Programs  
         $UninstallKey=”SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall”   
         #Create an instance of the Registry Object and open the HKLM base key  
         $reg=[microsoft.win32.registrykey]::OpenRemoteBaseKey(‘LocalMachine’,$computername)   
         #Drill down into the Uninstall key using the OpenSubKey Method  
         $regkey=$reg.OpenSubKey($UninstallKey)   
         #Retrieve an array of string that contain all the subkey names  
         $subkeys=$regkey.GetSubKeyNames()   
         #Open each Subkey and use GetValue Method to return the required values for each  
         foreach($key in $subkeys){  
             $thisKey=$UninstallKey+”\\”+$key   
             $thisSubKey=$reg.OpenSubKey($thisKey)   
             $obj = New-Object PSObject  
             $obj | Add-Member -MemberType NoteProperty -Name “ComputerName” -Value $computername  
             $obj | Add-Member -MemberType NoteProperty -Name “DisplayName” -Value $($thisSubKey.GetValue(“DisplayName”))  
             $obj | Add-Member -MemberType NoteProperty -Name “DisplayVersion” -Value $($thisSubKey.GetValue(“DisplayVersion”))  
             $obj | Add-Member -MemberType NoteProperty -Name “InstallLocation” -Value $($thisSubKey.GetValue(“InstallLocation”))  
             $obj | Add-Member -MemberType NoteProperty -Name “Publisher” -Value $($thisSubKey.GetValue(“Publisher”))  
             $array += $obj  
         }   
     }  
     $array | Where-Object { $_.DisplayName } | select ComputerName, DisplayName, DisplayVersion, Publisher | ft -auto  
    

    Use PowerShell to Quickly Find Installed Software
    https://devblogs.microsoft.com/scripting/use-powershell-to-quickly-find-installed-software/

    Best Regards,
    Ian

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments