View Source

h2. Using Hyper-V VHD Console

*R1Soft Hyper-V VHD Console* is a command-line utility used for scripting and automating actions on VHD files. For example, for scripting the attach and detach of VHD files.

You can run command line utilities and scripts on the contents of VHD files. You can call *R1Soft Hyper-V VHD Console* from the scripts to attach VHD files, list their contents, etc.

*The R1Soft Hyper-V VHD Console* allows you to perform the following actions:
* *Attach VHD*
* *Detach VHD*
* *Explore the Volumes on VHD*
* *Display help*
* *List all attached virtual VHD files*
* *Shell integration executed command*
* *Register shell integration registry settings*

Follow the instructions below to access the *Hyper-V VHD Console*.

1. Click "Start" and select the "Run..." menu.
!run1.png!

2. Type "*cmd*" without quotes and press <Enter>.
!cmd.png!

3. Run the {color:blue}"R1Soft Hyper-V VHD Console.exe"{color} command with one of the following arguments.

h4. CLI Arguments

Here is a list of console arguments with their descriptions.
* *\-a (attach)* \- Attaches the VHD file.
* *\-d (detach)* \- Detach the VHD file.
* *\-e (explore)* \- Explore the volumes on the VHD file.
* *\-f (file)* \- VHD file to attach or detach.
* *\-h (help)* \- Display help information.
* *\-l (list)* \- List all attached virtual VHD files.
* *\-s (shell)* \- Shell integration executed command.
* *\-r (register)* \- Register shell integration registry settings. It means, *\-r* option is used to add three additional items to {color:blue}.vhd{color} file context menu if for some reason these items have not been created during the installation.
{info:title=Note}At least one of these arguments must be used in a console command. Arguments *\-a*, *\-d*, *\-e* can't be used together with arguments *\-l*, *\-h*, *\-v*.
{info} {excerpt:hidden=true}Instructions on how to use Hyper-V VHD console.{excerpt}