How to identify the default audio device in Powershell?
问题 I am looking for a solution to get the default audio device via Powershell. In best case, it could work via embedded C#-code to directly use IMMDeviceEnumerator::GetDefaultAudioEndpoint (see here IMMDeviceEnumertor). But if it is easier to get this via RegKeys, then this is also OK. I have seen a couple of code-snippets reading the keys from HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render or \Capture, but I still struggle to identify the DEFAULT device. It seems, when I