How to find the IP of a network printer from command line
How can I ping (from command prompt) a printer without knowing it's IP.
How can I find the printer IP in the command prompt?
windows ip printer
add a comment |
How can I ping (from command prompt) a printer without knowing it's IP.
How can I find the printer IP in the command prompt?
windows ip printer
There is no native feature to find the IP address of a printer on the network. Your going to have to do some type of network scan. Even if you do it manually you’re going to have to check every IP on the network until you find it. If the printer is installed on the computer then you can certainly get details about it. Typically if you’re looking for a printer’s IP address you’ll go to the DHCP server, the printer’s control panel, or another computer on the network that has it installed.
– Appleoddity
Feb 9 at 6:58
Also, if you have control of your network, assign the printer an IP address in the DHCP control panel (typically on your router) - then you get to know its IP. (Also you may want to advise your OS, as the answer may be different between OS types)
– davidgo
Feb 9 at 8:37
If you know the MAC address of the printer you can runarp -a
and match the MAC address to the IP address
– DavidPostill♦
Feb 10 at 9:45
@DavidPostil that will only work, I believe, if the MAC address is in the ARP table, and if the printer has not been used for a while it won't exist there.
– davidgo
Feb 11 at 8:36
add a comment |
How can I ping (from command prompt) a printer without knowing it's IP.
How can I find the printer IP in the command prompt?
windows ip printer
How can I ping (from command prompt) a printer without knowing it's IP.
How can I find the printer IP in the command prompt?
windows ip printer
windows ip printer
edited Feb 11 at 7:44
Remus Rigo
asked Feb 9 at 6:45
Remus RigoRemus Rigo
1,78053753
1,78053753
There is no native feature to find the IP address of a printer on the network. Your going to have to do some type of network scan. Even if you do it manually you’re going to have to check every IP on the network until you find it. If the printer is installed on the computer then you can certainly get details about it. Typically if you’re looking for a printer’s IP address you’ll go to the DHCP server, the printer’s control panel, or another computer on the network that has it installed.
– Appleoddity
Feb 9 at 6:58
Also, if you have control of your network, assign the printer an IP address in the DHCP control panel (typically on your router) - then you get to know its IP. (Also you may want to advise your OS, as the answer may be different between OS types)
– davidgo
Feb 9 at 8:37
If you know the MAC address of the printer you can runarp -a
and match the MAC address to the IP address
– DavidPostill♦
Feb 10 at 9:45
@DavidPostil that will only work, I believe, if the MAC address is in the ARP table, and if the printer has not been used for a while it won't exist there.
– davidgo
Feb 11 at 8:36
add a comment |
There is no native feature to find the IP address of a printer on the network. Your going to have to do some type of network scan. Even if you do it manually you’re going to have to check every IP on the network until you find it. If the printer is installed on the computer then you can certainly get details about it. Typically if you’re looking for a printer’s IP address you’ll go to the DHCP server, the printer’s control panel, or another computer on the network that has it installed.
– Appleoddity
Feb 9 at 6:58
Also, if you have control of your network, assign the printer an IP address in the DHCP control panel (typically on your router) - then you get to know its IP. (Also you may want to advise your OS, as the answer may be different between OS types)
– davidgo
Feb 9 at 8:37
If you know the MAC address of the printer you can runarp -a
and match the MAC address to the IP address
– DavidPostill♦
Feb 10 at 9:45
@DavidPostil that will only work, I believe, if the MAC address is in the ARP table, and if the printer has not been used for a while it won't exist there.
– davidgo
Feb 11 at 8:36
There is no native feature to find the IP address of a printer on the network. Your going to have to do some type of network scan. Even if you do it manually you’re going to have to check every IP on the network until you find it. If the printer is installed on the computer then you can certainly get details about it. Typically if you’re looking for a printer’s IP address you’ll go to the DHCP server, the printer’s control panel, or another computer on the network that has it installed.
– Appleoddity
Feb 9 at 6:58
There is no native feature to find the IP address of a printer on the network. Your going to have to do some type of network scan. Even if you do it manually you’re going to have to check every IP on the network until you find it. If the printer is installed on the computer then you can certainly get details about it. Typically if you’re looking for a printer’s IP address you’ll go to the DHCP server, the printer’s control panel, or another computer on the network that has it installed.
– Appleoddity
Feb 9 at 6:58
Also, if you have control of your network, assign the printer an IP address in the DHCP control panel (typically on your router) - then you get to know its IP. (Also you may want to advise your OS, as the answer may be different between OS types)
– davidgo
Feb 9 at 8:37
Also, if you have control of your network, assign the printer an IP address in the DHCP control panel (typically on your router) - then you get to know its IP. (Also you may want to advise your OS, as the answer may be different between OS types)
– davidgo
Feb 9 at 8:37
If you know the MAC address of the printer you can run
arp -a
and match the MAC address to the IP address– DavidPostill♦
Feb 10 at 9:45
If you know the MAC address of the printer you can run
arp -a
and match the MAC address to the IP address– DavidPostill♦
Feb 10 at 9:45
@DavidPostil that will only work, I believe, if the MAC address is in the ARP table, and if the printer has not been used for a while it won't exist there.
– davidgo
Feb 11 at 8:36
@DavidPostil that will only work, I believe, if the MAC address is in the ARP table, and if the printer has not been used for a while it won't exist there.
– davidgo
Feb 11 at 8:36
add a comment |
2 Answers
2
active
oldest
votes
If you have the printer mapped on the Windows PC, there are various powershell or WMI commands to run:
https://social.technet.microsoft.com/Forums/ie/en-US/77344a1d-4d0a-40bb-a8d8-75516ba12b0a/get-printer-names-ip-addresses-and-drivers-from-a-computer-using-wmi?forum=ITCG
get-wmiobject win32_printer | select name
get-wmiobject win32_tcpipprinterport | select hostaddress
Depending on your printer and drivers, this may not have the IP address and you'll have to query WMI.
wmic printer get DriverName, Name, Portname
If it's an HP laser network printer, you may be connecting to port 9100, and netstat will show active network connections from powershell:
netstat -an | grep 9100
add a comment |
You could run a batch file to loop through the addresses, ping each for half a second and move on. That should work fine as long as you only have one or a couple of subnets. If your network is very complicated it may take a very long time. Here's a sample script:
setlocal enabledelayedexpansion
set /a counter=0
:start
set /a counter+=1
ping -n 1 192.168.0.!counter! > devices.txt
if %counter%=255 goto finish
goto start
:finish
ping is a bad solution because we dont know that icmp is enabled, nor dies tbe printer "jump out". You would be better off ysing a tool like nmap and scan for port tcp 630 and/or 631 and/or 9100 - all of these represent different protocols most printers listen on.
– davidgo
Feb 9 at 10:33
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403776%2fhow-to-find-the-ip-of-a-network-printer-from-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you have the printer mapped on the Windows PC, there are various powershell or WMI commands to run:
https://social.technet.microsoft.com/Forums/ie/en-US/77344a1d-4d0a-40bb-a8d8-75516ba12b0a/get-printer-names-ip-addresses-and-drivers-from-a-computer-using-wmi?forum=ITCG
get-wmiobject win32_printer | select name
get-wmiobject win32_tcpipprinterport | select hostaddress
Depending on your printer and drivers, this may not have the IP address and you'll have to query WMI.
wmic printer get DriverName, Name, Portname
If it's an HP laser network printer, you may be connecting to port 9100, and netstat will show active network connections from powershell:
netstat -an | grep 9100
add a comment |
If you have the printer mapped on the Windows PC, there are various powershell or WMI commands to run:
https://social.technet.microsoft.com/Forums/ie/en-US/77344a1d-4d0a-40bb-a8d8-75516ba12b0a/get-printer-names-ip-addresses-and-drivers-from-a-computer-using-wmi?forum=ITCG
get-wmiobject win32_printer | select name
get-wmiobject win32_tcpipprinterport | select hostaddress
Depending on your printer and drivers, this may not have the IP address and you'll have to query WMI.
wmic printer get DriverName, Name, Portname
If it's an HP laser network printer, you may be connecting to port 9100, and netstat will show active network connections from powershell:
netstat -an | grep 9100
add a comment |
If you have the printer mapped on the Windows PC, there are various powershell or WMI commands to run:
https://social.technet.microsoft.com/Forums/ie/en-US/77344a1d-4d0a-40bb-a8d8-75516ba12b0a/get-printer-names-ip-addresses-and-drivers-from-a-computer-using-wmi?forum=ITCG
get-wmiobject win32_printer | select name
get-wmiobject win32_tcpipprinterport | select hostaddress
Depending on your printer and drivers, this may not have the IP address and you'll have to query WMI.
wmic printer get DriverName, Name, Portname
If it's an HP laser network printer, you may be connecting to port 9100, and netstat will show active network connections from powershell:
netstat -an | grep 9100
If you have the printer mapped on the Windows PC, there are various powershell or WMI commands to run:
https://social.technet.microsoft.com/Forums/ie/en-US/77344a1d-4d0a-40bb-a8d8-75516ba12b0a/get-printer-names-ip-addresses-and-drivers-from-a-computer-using-wmi?forum=ITCG
get-wmiobject win32_printer | select name
get-wmiobject win32_tcpipprinterport | select hostaddress
Depending on your printer and drivers, this may not have the IP address and you'll have to query WMI.
wmic printer get DriverName, Name, Portname
If it's an HP laser network printer, you may be connecting to port 9100, and netstat will show active network connections from powershell:
netstat -an | grep 9100
answered Feb 9 at 8:50
Ian McGowanIan McGowan
1835
1835
add a comment |
add a comment |
You could run a batch file to loop through the addresses, ping each for half a second and move on. That should work fine as long as you only have one or a couple of subnets. If your network is very complicated it may take a very long time. Here's a sample script:
setlocal enabledelayedexpansion
set /a counter=0
:start
set /a counter+=1
ping -n 1 192.168.0.!counter! > devices.txt
if %counter%=255 goto finish
goto start
:finish
ping is a bad solution because we dont know that icmp is enabled, nor dies tbe printer "jump out". You would be better off ysing a tool like nmap and scan for port tcp 630 and/or 631 and/or 9100 - all of these represent different protocols most printers listen on.
– davidgo
Feb 9 at 10:33
add a comment |
You could run a batch file to loop through the addresses, ping each for half a second and move on. That should work fine as long as you only have one or a couple of subnets. If your network is very complicated it may take a very long time. Here's a sample script:
setlocal enabledelayedexpansion
set /a counter=0
:start
set /a counter+=1
ping -n 1 192.168.0.!counter! > devices.txt
if %counter%=255 goto finish
goto start
:finish
ping is a bad solution because we dont know that icmp is enabled, nor dies tbe printer "jump out". You would be better off ysing a tool like nmap and scan for port tcp 630 and/or 631 and/or 9100 - all of these represent different protocols most printers listen on.
– davidgo
Feb 9 at 10:33
add a comment |
You could run a batch file to loop through the addresses, ping each for half a second and move on. That should work fine as long as you only have one or a couple of subnets. If your network is very complicated it may take a very long time. Here's a sample script:
setlocal enabledelayedexpansion
set /a counter=0
:start
set /a counter+=1
ping -n 1 192.168.0.!counter! > devices.txt
if %counter%=255 goto finish
goto start
:finish
You could run a batch file to loop through the addresses, ping each for half a second and move on. That should work fine as long as you only have one or a couple of subnets. If your network is very complicated it may take a very long time. Here's a sample script:
setlocal enabledelayedexpansion
set /a counter=0
:start
set /a counter+=1
ping -n 1 192.168.0.!counter! > devices.txt
if %counter%=255 goto finish
goto start
:finish
answered Feb 9 at 9:27
hdhondthdhondt
2,7952910
2,7952910
ping is a bad solution because we dont know that icmp is enabled, nor dies tbe printer "jump out". You would be better off ysing a tool like nmap and scan for port tcp 630 and/or 631 and/or 9100 - all of these represent different protocols most printers listen on.
– davidgo
Feb 9 at 10:33
add a comment |
ping is a bad solution because we dont know that icmp is enabled, nor dies tbe printer "jump out". You would be better off ysing a tool like nmap and scan for port tcp 630 and/or 631 and/or 9100 - all of these represent different protocols most printers listen on.
– davidgo
Feb 9 at 10:33
ping is a bad solution because we dont know that icmp is enabled, nor dies tbe printer "jump out". You would be better off ysing a tool like nmap and scan for port tcp 630 and/or 631 and/or 9100 - all of these represent different protocols most printers listen on.
– davidgo
Feb 9 at 10:33
ping is a bad solution because we dont know that icmp is enabled, nor dies tbe printer "jump out". You would be better off ysing a tool like nmap and scan for port tcp 630 and/or 631 and/or 9100 - all of these represent different protocols most printers listen on.
– davidgo
Feb 9 at 10:33
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403776%2fhow-to-find-the-ip-of-a-network-printer-from-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
There is no native feature to find the IP address of a printer on the network. Your going to have to do some type of network scan. Even if you do it manually you’re going to have to check every IP on the network until you find it. If the printer is installed on the computer then you can certainly get details about it. Typically if you’re looking for a printer’s IP address you’ll go to the DHCP server, the printer’s control panel, or another computer on the network that has it installed.
– Appleoddity
Feb 9 at 6:58
Also, if you have control of your network, assign the printer an IP address in the DHCP control panel (typically on your router) - then you get to know its IP. (Also you may want to advise your OS, as the answer may be different between OS types)
– davidgo
Feb 9 at 8:37
If you know the MAC address of the printer you can run
arp -a
and match the MAC address to the IP address– DavidPostill♦
Feb 10 at 9:45
@DavidPostil that will only work, I believe, if the MAC address is in the ARP table, and if the printer has not been used for a while it won't exist there.
– davidgo
Feb 11 at 8:36