I am trying to get a list of shared printers running on the organization PCs
I am using the following with is working great when running it locally (Win10 or 2019):
Get-Printer
the results are:
PS H:\> Get-Printer |
fl Name
- Name : OneNote (Desktop)
- Name : OneNote for Windows 10
- Name : Xerox AltaLink C8045 PCL6 - A3 Color
- Name : WorkCentre 5330
- Name : Microsoft XPS Document Writer
- Name : Microsoft Print to PDF
- Name : IT-Printer
- Name : Fax
- Name : \printers\einat
when adding the variable -ComputerName ws-idanb
I am getting only local printers the one from \\printers
is missing....
- Name : OneNote (Desktop)
- Name : OneNote for Windows 10
- Name : Xerox AltaLink C8045 PCL6 - A3 Color
- Name : WorkCentre 5330
- Name : Microsoft XPS Document Writer
- Name : Microsoft Print to PDF
- Name : IT-Printer
- Name : Fax
due to this issue, I an unable run this on the AD server using a script on all computers on a specific OU and must run it locally on each PC...
will appreciate if someone will know if I am doing something wrong and how can I still find the printers which are installed using the printers server.
this should be the command I would like to run...
Get-Printer -ComputerName HOST-NAME |
where Shared -eq $true |
fl Name > \\PATH\$env:computername.txt
Thanks,
Idan