/build/static/layout/Breadcrumb_cap_w.png

Script to Find installed software on a Domain

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;.....


AS


0 Comments   [ + ] Show comments

Answers (1)

Posted by: mramsdell 10 years ago
Orange Senior Belt
0

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




}






Comments:
  • HI Mramsdell,

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

    As - aussupport 10 years ago
    • 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. - mramsdell 10 years ago
      • I only need the computer list that installed "Firefox" ? - aussupport 10 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ