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.
In 'Computer Management' window, click» » »
Double-clickand open 'Hyper-V Administrators Properties' window
Clickand open 'Select Users' window
Intext-box, enter your user account name, and then click to return to the properties window
Click, and then click to return to the main 'Computer Management' window
Close 'Computer Management' window and restart Windows OS