I'm not a strong programmer so I'm not sure if I'm just doing this wrong or there is a difference in Windows Server 2008 R2 vs Win7 but I can't get an add-type to work.
The type is from
http://sharpsnmplib.codeplex.com where I'm trying to make use of the snmpget function using code like this:
Add-Type -Path "C:\SNMP\sharpsnmplib.dll"
Add-Type -Path "C:\SNMP\SharpSnmpLib.Controls.dll"
snmpget -v 1 -c public $hostname $oidstring
It works fine on my windows 7 64 bit workstation but on a windows server 2008 R2 server it throws an error stating it doesn't know what "snmpget" is, meaning it didn't add the type properly.
I set execution policy and tried it on 64bit and 32bit powershell and no joy.
Any ideas?
thanks
Pete