Answer the question
In order to leave comments, you need to log in
How to get mac address value from device via SNMP in powershell?
Can't get mac address value via snmp using powershell.
$SNMP = new-object -ComObject olePrn.OleSNMP
$SNMP.open($IP,"public",2,6000)
$mac = $SNMP.Get('.1.3.6.1.2.1.2.2.1.6.1')
$SNMP = new-object -ComObject olePrn.OleSNMP
$SNMP.open($IP,"public",2,6000)
$mac = [System.Text.Encoding]::Default.GetBytes($SNMP.GetTree('.1.3.6.1.2.1.2.2.1.6'))
[System.Text.Encoding]::Default.GetString($mac)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question