SCM "Fix-fim"

I run into the FIM driver failing to work often enough I got tired of manually logging in and fixing things as described in "" so I automated the process. 

You should be able to run this from any server without actually logging into the offending node.  (you may need admin permissions)

The script does not use the API (and sorry for lack of comments).  I have used the function inside another script which hits the API to look for all nodes with the problem using the query below then looping through the resulting list:

SELECT n.nodename, npe.NodeID, npe.Type, npe.Message
FROM Orion.SCM.Results.NodesPollingErrors npe,
             orion.nodes n
where n.NodeID = npe.NodeID
     and npe.message like '%FIM driver failed%'