That will probably require some kind of Script to detect the Drive Letter plus trace back to the VHD file. The VHDMOUNT doesn't do that directly. Several "steps" would be necessary -
/q - Displays the disk name of the mounted virtual disk device for the specified VHDFileName.
VHDMOUNT /q VHDFileName | All
"All" then a loop-through of the List "compare to Drive Letter" since the VHDFileName is unknown.
Here is the source Article of your link above -http://technet.micro...5(v=ws.10).aspx
Returns the disk identifier of the mounted virtual disk device for the specified VHDFileName, or on all mounted virtual disk devices. VHDFileName is the fully qualified path of the .vhd file.
...and I guess you mean "Drive Letter
" and not "Drive Key
No time to Install, Build a Script, and Test the "Theory" right now. Maybe some other Script Experts here can help you out. One might "assume" that the information must be stored somewhere.
In which case, this Topic is in the wrong Sub-Forum and should be under the Scripting one...
Maybe here - http://www.msfn.org/...s-cmdbatch-etc/
Edited by submix8c, 18 May 2013 - 08:59 AM.