Powershell – Obtain a list of servers from AD on which a specific software is installed

active-directorypowershellscripting

Is it possible to obtain a list of servers from within Active Directory on which a specific software is installed? For example, get all servers that have wampserver version 5 installed on them.

Best Answer

You can peruse existing script https://gallery.technet.microsoft.com/scriptcenter/Get-RemoteProgram-Get-list-de9fd2b4

To get a list of computers that have Internet Explorer 11:

$result= @();
$programName = "Internet Explorer 11"
$computers = ("Computer1","Computer2","Computer3")
$computers | % { if ((Get-RemoteProgram -ComputerName $_).programname -contains $programName) { $result += $_}}
$result