getmac ERROR: Invalid Class (Windows 8.1)

1.9k views Asked by At

When trying to run getmac from the Windows Command Prompt, I am getting "ERROR: Invalid class". As a Windows utility, I'm not entirely sure why it's broken or how to go about fixing it.

Can anyone point me in the right direction?

----- EDIT -----

The point of this exercise it to be able to programmatically acccess a user's MAC address from a Node.js application. I originally ran into the issue with the getmac node module, which uses getmac under the hood. Thus I can't use Powershell or some other suggested solutions -- and I need this to be able to work offline.

1

There are 1 answers

2
Dawesi On

use ipconfig and use the physical address or in powershell use Get-NetAdapter