You can use the Get-Printer cmdlet to display a list of the installed printers on a print server. For example, the following command shows that there are four printers installed on a remote print server named HOST7:
PS C:\> Get-Printer -ComputerName HOST7 | Format-List Name,DriverName
Name : Samsung CLP-410 Series PCL6
DriverName : Samsung CLP-410 Series PCL6
Name : HP LaserJet 4200L PCL6
DriverName : HP LaserJet 4200L PCL6 Class Driver
Name : Microsoft XPS Document Writer
DriverName : Microsoft XPS Document Writer v4
Name : HP LaserJet 5200 PCL6
DriverName : HP LaserJet 5200 PCL6 Class Driver
You can pipe the output from the preceding command into the Where-Object cmdlet to determine which of these printers are shared:
PS C:\> Get-Printer -ComputerName HOST7 | where Shared -eq $true | fl Name
Name : Samsung CLP-410 Series PCL6
Name : HP LaserJet 4200L PCL6
Name : HP LaserJet 5200 PCL6
The above tip was excerpted from Mitch Tulloch’s book Training Guide: Installing and Configuring Windows Server 2012 from Microsoft Press.
Mitch is a nine-time recipient of the Microsoft Most Valuable Professional (MVP) award and a widely recognized expert on Windows administration, deployment and virtualization. For more information see http://www.mtit.com.