- 1 year ago
I need to get the IP, Name of the printer queue, and serial from the print management console on Windows Server 2016 and the same servers connected
You can use the Get-Printer
PowerShell cmdlet to retrieve information about printers installed on a Windows Server 2016 machine. Here's an example command that will return the IP address, name of the printer queue, and serial number for all printers installed on the local machine:
powershellGet-Printer | Select-Object PortName, Name, Comment, DriverName, Shared, DeviceID
This will output a table that includes the port name (which should contain the IP address), name of the printer queue, and serial number for each printer. You can also pipe the output to a CSV file for easier analysis, like so:
powershellGet-Printer | Select-Object PortName, Name, Comment, DriverName, Shared, DeviceID | Export-Csv -Path "C:\printers.csv" -NoTypeInformation
This will export the output to a CSV file located at "C:\printers.csv". You can then open the CSV file in a spreadsheet application to sort and filter the data as needed. If you want to run this command on a remote server, you can use the -ComputerName
parameter to specify the name or IP address of the remote server. For example:
powershellGet-Printer -ComputerName "SERVER_NAME" | Select-Object PortName, Name, Comment, DriverName, Shared, DeviceID
Replace "SERVER_NAME" with the name or IP address of the remote server. Note that you'll need to have appropriate permissions to access the print management console on the remote server.