Compare printers on 3 servers, export to csv side by side

Hi all,

I am trying to create a print server check, basically i want the script to run grab all printers and export them side by side in a csv file. Right now i just have it create 3 seperate csv files for each server and then i manually create 1 file that looks like this

Server1                            Server2                              Server3

Printers       Ports             Printers           Ports           Printers            Ports

prt1                                  prt1                                    prt1

prt2                                  prt2                                    prt2

etc

Any way i can have it format my data in the code?

I have this as of now

$servers= "server1","server2","server3"
foreach($server in $servers){
gwmi -class Win32_printer -comp $server |select name, portname | Export-Csv "$($server)-printerslist.csv" -NoTypeInformation
}

Thanks
  • Edited by ImMax 17 hours 59 minutes ago
January 17th, 2014 12:19pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics