Issue with Run Command usage of Batch script
I have a batch script I've written to use snmpset to control switches on a remote PDU we are testing. I was hoping that I could use OpManager to run this batch when it detects a certain device down for a specific time frame. However, I have run into two issues with doing this. The first involved how OpManager was passing its arguments. If I run the batch script from Powershell, it works correctly with the arguments. When I do a test run from OpManager, the arguments are being shifted to the left somehow. Since I didn't want to break the scripts ability to function via command line, I simply added a useless argument in the OpManager configuration.
The second issue, has to do directly with OpManager's acceptance of the snmpset command. After an extensive debugging process, I finally stripped the batch down to simply an snmpset command with set parameters instead of using arguments. When I tell OpManager to do a test run, it states the script has run but nothing happens. If I run the script from the command line, it works correctly. I then thought there might be an incompatibility with the Net-SNMP tool suite, so I checked here in the forums and blogs for anything mentioning use of Net-SNMP. Thats how I found this post regarding using Net-SNMP in OpManager for sending traps to another device.
So now my question specifically is why does OpManager not accept use of the snmpset command? I would think that there shouldn't be any compatibility issues since OpManager should be doing nothing more than telling the script to run same as if I ran the script from the command line. It should just tell the script to run, and the script runs the commands. However, since OpManager doesn't recognize the command this makes me think that OpManager is running the script in a different method. Can someone please clarify on how the Run Command feature works?
New to ADSelfService Plus?