KnarrStudio / ITPS-Tools

IT PowerShell Tools - Tools for the System Administrator
https://github.com/KnarrStudio/ITPS-Tools/wiki
MIT License
1 stars 1 forks source link

Problem with Get-PrinterStatus.ps1 - Not getting the Printer IP Address #10

Closed OgJAkFy8 closed 5 years ago

OgJAkFy8 commented 5 years ago

$PrinterIpAddress = Get-PrinterPort -ComputerName $PrintServer -Name $PrinterName | Select-Object -ExpandProperty PrinterHostAddress -ErrorAction SilentlyContinue

OgJAkFy8 commented 5 years ago

Added a "get printer port command" in front it and changed the line : $PortName = (get-printer -ComputerName $PrintServer -Name $PrinterName).PortName $PrinterIpAddress = Get-PrinterPort -ComputerName $PrintServer -Name $PortName

OgJAkFy8 commented 5 years ago

Added a "get printer port command" in front it and changed the line : $PortName = (get-printer -ComputerName $PrintServer -Name $PrinterName).PortName $PrinterIpAddress = Get-PrinterPort -ComputerName $PrintServer -Name $PortName