If you get the above failure, possibly intermittently, you may have an invalid adapter entry in the registry.
If this is the case, you should also experience problems when trying to display or remove it in Control Panel / Network. The adapter will appear to be unavailable, have no description or a number description, like (10).
You can remove this invalid adapter by browsing the registry at the following locations, locating and deleting the invalid <adapter name> and/or <number>:
HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\NetworkCards\<number>
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\Root\Legacy_<adapter name>
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<adapter name>
HKEY_LOCAL_MACHINE\SOFTWARE\<adapter name>
You will have to reboot for this fix to take effect.
In some cases, you may have to uninstall and re-install RAS, other adapters, or other protocols.