Created
July 20, 2017 15:53
-
-
Save josephkern/18ca113edb10450add90bca40b9ebec5 to your computer and use it in GitHub Desktop.
Map Windows Server Printers to Port Names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function GetPrintersAndPorts { | |
foreach ($printer in $(Get-Printer)) { | |
Get-PrinterPort -Name $printer.PortName | select @{name='Printer';expression={$printer.Name}}, PrinterHostAddress | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment