Home » PowerShell » PowerShell – Get Printer IP address and Port, Model information

PowerShell – Get Printer IP address and Port, Model information

In this article, I will explain how to get printer IP address and other printer properties like Portname, model, drivername, and printer status in PowerShell.

Using PowerShell, Get-Printer cmdlet, printer ip address, printer status can be easily retrieved.

Let’s understand using Get-Printer cmdlet with different examples to get printer ip address, printer status, printer location.

Get Printer IP address and name

To get printer ip address, name using PowerShell, use below command

Get-Printer | select Name,PortName,DriverName | Export-Csv D:\Printers.csv -NoTypeInformation

In the above example, PowerShell Get-Printer command gets printer name, printer portname or printer IP address and driver name available on computer and using Export-Csv, export information to printers.csv file on D drive.

Do you know: How to get printer properties in PowerShell!

Get Printer Location and status

To get printer location and status using PowerShell, use the below command

Get-Printer | Select Name,Location,PrinterStatus | Out-GridView

In the above example, using Get-Printer, it retrieved printer name, printer location and get printer status, and display printer information in the format list.

Using Get-WmiObject to get Printer PortName,Status

Using PowerShell Get-WmiObject cmdlet with class win32-printer, it gets printer status, printer location, and printer portname.

Get-WmiObject -class win32_printer -ComputerName CORP-IN-18 | Select Caption,Location,PortName,DriverName,PrinterStatus | Out-GridView

In the above example, Get-WmiObject cmdlet gets printers list installed on specified computername (local machine or remote machine) and get printer ip address, printer location in grid view format.

Do you know: How to use erroraction or errorvariable parameters in PowerShell!

Conclusion

I hope the above article to get printer IP address and printer status, other printer information can be easily retrieved using Get-Printer cmdlet in PowerShell.

You can find more topics about PowerShell Active Directory commands and PowerShell basics on ShellGeek home page.

Leave a Comment