![]() ![]() Although you can spoof your MAC address with software, the real MAC address of your network interface will never change. ![]() Unlike IP addresses, which can change frequently and easily, MAC addresses are permanently tied to the hardware. (Get-ItemProperty -Path $key -Name $value). 6 April 2022 by Korbin Brown Every network interface, on any device, has its own MAC address. You can then use that $portname to get the actual IP: $basekey = "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\" ![]() Or if you know the exact name of the printer in Windows, you can do it programmatically: $portname = (get-printer "EPSON ET-16650 Series" | select portname).portname Microsoft XPS Document Writer PORTPROMPT: with PowerShell manually: get-printer | select name, portname So at least in our case, the command line approach would be to find the port name, e.g. (The IPAddress String value there is empty.) Which has a String value with the current IP: HostName: 192.168.101.11 Now that the address has changed, the actual IP seems only to be found under the registry key for the port: HKLM:\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\IP_192.168.0.11 For our IPP printer (EPSON ET_16650 Series), WMIC and PowerShell don't know the hostname, just the portname - which has the original IP address baked in. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |