I'm having issues listing all the printers on a computer using Powershell.
We have a batch script that will add/remove/list "per computer" printers using PrintUI.
I can use PrintUI to list the printers.
rundll32 printui.dll,PrintUIEntry /ge /c"%UNC-NAME%"
This will list just the per computer printers, while...
Get-WMIObject -Class Win32_Printer -ComputerName $ComputerName
will list the all printers in WMI.
In the above example I have a system that has 3 printers, when a user is logged in. WMI see's 2 of them, PrintUI see's 1.
I'm boggled how I can list them ALL! So that I can script auditing/adding/removing both "per computer" and "local" printers