0

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.

  • There is at least one free third-party tool that will use WMI to audit all the software installed on all the computers in one or more IP ranges that you specify: Spiceworks. It is free and you get what you pay for, which means it has its quirks, but it does seem to do all right with software inventory. – Todd Wilcox Jun 27 '16 at 14:44
  • ServerFault is not a script writing service. Please make an attempt on your own or at the very least share what research attempt you've made. – Colyn1337 Jun 29 '16 at 14:29
3

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
  • So, do I just download that script and add your code at the end, or how does this work? – DSKyo Jun 29 '16 at 8:26
  • 1
    When you run the script, it loads function Get-RemoteProgram into your current powershell session. Try to run this function against some computername to see what it returns first. Once you understand how it works, add code below the script and replace ("Computer1","Computer2","Computer3") with your own list, for example (get-adcomputer -filter *).name ( this would create list of all AD computers) – Sergei Jun 29 '16 at 9:51
4

No, not as you asked the question. This info is not in Active Directory, sorry to say. You could however write some PowerShell, starting with Get-ADComputer likely with a filter to just get server operating systems, and then pipe or loop that into either WMI or Registry queries to get the list of installed software - and hopefully the version info you want was written in there by the vendor.

Easy enough - of course, you could also use add-on management tools like Microsoft's own SCCM, or third-party inventory tools that do it for you - some are even free. I particularly like SpiceWorks.

  • Thanks for that, do you know how can I obtain this info from SCCM? – DSKyo Jun 27 '16 at 13:55
  • 1
    I'd suggest doing some initial research on SCCM then ask another question about how to perform the query if it's still needed. – Jim B Jun 27 '16 at 14:33
  • Alright, cheers! – DSKyo Jun 27 '16 at 14:55
  • Related : if your firm has paid for SC suite, they better also have the internal or contract resources to manage it properly. – mfinni Jun 27 '16 at 16:10
2

You can try this put the list of servers on text file or filter from AD

#$computer="get-content computers.txt"
#computers=Get-ADComputer -Filter {OperatingSystem -Like “Windows Server*”}
foreach ($Computers in $computer)
{
Get-WmiObject -query 'select * from win32_product' | where {$_.name -like "Ccleaner*"} |ft Name, Version,PsComputername | export-csv "$env:userprofile\desktop\software.csv"
}
0

Try this put a list of server on a text file or get from ad

#$computer="get-content computers.txt"
#$computers=Get-ADComputer -Filter {OperatingSystem -Like “Windows Server*”}
foreach ($Computers in $computer)
{
Get-WmiObject -query 'select * from win32_product' | where {$_.name -like "Ccleaner*"} |ft Name, Version,PsComputername | export-csv "$env:userprofile\desktop\software.csv"
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.