Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Connected Printers inventory

$
0
0

Hi all,

 

I am trying to get an inventory of a list of connected printers on all of my users computers.

 

I am using this:

Get-WMIObject -Class Win32_Printer -Computer localhost | Select Name,PortName,Shared,ShareName,Default | ft -property * -autosize | Out-String -width 4096

Currently, all the information is being sent to individual files with the username with this command in the login script:

echo %username% > \\fileserver\PR$\folder1\Printers\%username%.csv

powershell.exe -executionpolicy bypass -File \\domain.local\netlogon\printer-inv.ps1 >> \\fileserver\PR$\folder1\Printers\%username%.csv

 

Right now, I pump the username in the csv file, then add the printer information individually. Then I will merge the files, but this will be complicated.

 

Is there a simpler way to getting the information with the username, printers installed and default printer?

Thank you for your help!
Mike

Viewing all articles
Browse latest Browse all 10624

Trending Articles