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?