What is HVDX?
HVDX is a lightweight cross-platform module for accessing Hyper-V Data Exchange data. There is a very good explanation of how Hyper-V Data Exchange works by Eric Siron on the Altaro blog. DISCLAIMER: The PowerShell code contained in Part 2 and 3 of that blog has not been used in this module in any way. I literally just discovered that blog while looking for a decent resource to link to from this page for explanation. And while there is no real magic to accessing this information (WMI from the host, registry on Windows and fixed-size data structures in binary files on Linux), incorporating this functionality into your own scripts usually proves quite cumbersome and does not contribute to code readability.
Data Exchange is all about Key-Value-Pairs (KVPs) that you can transmit from the host to the guest and vice versa. Therefore, all Read cmdlets will return PSCustomObjects sporting two string properties: Key and Value.
You can find HVDX on the PowerShell Gallery: https://www.powershellgallery.com/packages/HVDX or just
What’s in the module?
I chose not to split the module into host-side and guest-side parts, but of course there are different cmdlets for host and guest access. I also chose, at least for the time being, to not create separate cmdlets for Adding, Setting or Removing of Data Exchange KVPs so it’s just Read and Write, with Remove being a Write operation. You will find four cmdlets in the module:
0.1.0 | 2022-05-27
Add the “auto” area to the Read cmdlets.