title: How can I know which HDMI port is plugged in?
body: <p>I have a computer with a dual hdmi output. I would like to detect which one is plugged in when I connect a monitor to either to one of them.</p>
  
  <p>It can be either with the help of registry, powershell or C# code, or anything. As long as it's not C++.</p>
  
  <p>I've tried various wmi methods. Searched the registry for anything that would specify a hdmi port. But found nothing so far.</p>
  
  <p>This stackoverflow answer (<a href="https://stackoverflow.com/questions/31712915/detect-identify-the-port-hdmi-other-the-monitor-is-connected-to-in-windows-7">Detect/identify the port (HDMI, other) the monitor is connected to in Windows 7/8/10 Win32 C++</a>) is the only one I found regarding my need, but I can't handle c++ so from now on I'm stuck.</p>
  
  <p>Thanks everyone</p>