Hi All,

I found this script but this need to input list of computers in domain

Get-Content 'c:\computerlist.txt' | ForEach-Object { Get-WMIObject -ComputerName $_ -Query "SELECT * FROM win32_product WHERE name LIKE '%firefox%'" | Select-Object -Property $_,Name,InstallLocation,InstallDate | Export-CSV 'c:\computerqueryresults.csv'

But I found this half command  connect to domain so need a help to get the report ?

Get-ADComputer -Filter * -SearchBase "OU=Computers,OU=myour,DC=domain,DC=com,DC=au" | ForEach-Object {$strComputerName = $_.Name;.....


0 Comments   [ + ] Show Comments


Please log in to comment



here is the script to get all the computers:

$strCategory = "computer"

$objDomain = New-Object System.DirectoryServices.DirectoryEntry

$objSearcher = New-Object System.DirectoryServices.DirectorySearcher

$objSearcher.SearchRoot = $objDomain

$objSearcher.Filter = ("(objectCategory=$strCategory)")

$colProplist = "name"

foreach ($i in $colPropList){$objSearcher.PropertiesToLoad.Add($i)}

$colResults = $objSearcher.FindAll()


foreach ($objResult in $colResults){

$objComputer = $objResult.Properties ; $objComputer.name

$objComputer.name | Out-File -append C:\computer.csv


Answered 06/18/2014 by: mramsdell
Orange Senior Belt

  • HI Mramsdell,

    Is this PS script ? I can run it but nothing in the computer.csv ? I have replace "name" with my application name.

    • Yes this is a PS script. This is only to get the CSV of the computers. don't change the "name". That is a field that it is calling on the computer.
      • I only need the computer list that installed "Firefox" ?
Please log in to comment
Answer this question or Comment on this question for clarity