Returnvalue: 2147786788 in wmi EnableStatic method
Successfully using the EnableStatic method for example in powershell always gives the Returnvalue 0. If that is not the case, something will most likely have gone wrong.
If you are returned the value 2147786788, this is a sign for a write lock of some sort, meaning you have to look for running processes that are already using your target object. Most likely you just need to close the network configuration windows if you still have them open.