When you want to use Hyper-V related built-in tools or commands in Windows (ex. hcsdiag, hvc etc.), you need additional user privileges. You can open a Windows console as an administrator and carry out those commands. But it can be annoying or problematic when you're using those commands in batch files or scripts.
The following steps show how you can add your user account to the 'Hyper-V Administrators' group in Windows and allow just enough user privileges to execute those Hyper-V related commands and tools; you can use them just like any other regular built-in commands.
Right-click on
»In 'Computer Management' window, click
» » »Double-click
and open 'Hyper-V Administrators Properties' windowClick
and open 'Select Users' windowIn
text-box, enter your user account name, and then click to return to the properties windowClick
, and then click to return to the main 'Computer Management' windowClose 'Computer Management' window and restart Windows OS