Windows has the setx command:
Description: Creates or modifies environment variables in the user or system environment.
So you can
The command in DougWare's answer did not work, but this did:
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v FOOBAR /f
The shortcut HKLM can be used for HKEY_LOCAL_MACHINE.
HKLM
HKEY_LOCAL_MACHINE