I fixed this issue myself following these steps:
- Open Windows Security.
- Go to App & Browser Control.
- Go to Exploit protection settings.
- Go to Program settings.
- Set
C:\Windows\System32\vmcompute.exe
andC:\Windows\System32\vmwp.exe
to 0 system overrides. - Restart these processes.
Now I am able to run VMs in Hyper-V.