PowerShell script to list installed printers on a list of computers


I need a PS script that can list all installed printers using a list of computers. Something like what this script does but for more than 1 computer:
Get-WmiObject -class Win32_printer| ft name, systemName, shareName >> C:\result.txt

No Data
  • You don't actually need much of a script for that, since the Get-WmiObject cmdlet supports the -ComputerName parameter you could iterate through a list of computer names stored in a text file using something along these lines:

    Get-Content -Path ListOfComputers.txt | ForEach-Object {
    Get-WmiObject -class Win32_printer -computername $_ | ft name, systemName, shareName >> C:\result.txt