frgnca / AudioDeviceCmdlets

AudioDeviceCmdlets is a suite of PowerShell Cmdlets to control audio devices on Windows
MIT License
765 stars 92 forks source link

add -ShowDisabled parameter support to List parameter #24

Closed frgnca closed 6 years ago

frgnca commented 6 years ago
Get-AudioDevice -List

Outputs all enabled devices (playback, then recording)

Index Default Type      Name                                     ID                                                      Dev
                                                                                                                         ice
----- ------- ----      ----                                     --                                                      ---
    1   False Playback  SAMSUNG (NVIDIA High Definition Audio)   {0.0.0.00000000}.{8641fed6-45a1-4ae0-b776-9c98d8cba99e} Cor
    2    True Playback  Analogue (Realtek High Definition Audio) {0.0.0.00000000}.{a551ec85-9b70-4789-b39a-46c924d9d2fc} Cor
    3    True Recording Microphone (Blue Snowball)               {0.0.1.00000000}.{89162399-0caf-4136-8cfe-5830e4b6a381} Cor

########################

Get-AudioDevice -List -ShowDisabled

Outputs all enabled devices (playback, then recording) followed by all disabled devices (playback, then recording)

Index Default Type      Name                                                            ID                                  
----- ------- ----      ----                                                            --                                  
    1   False Playback  SAMSUNG (NVIDIA High Definition Audio)                          {0.0.0.00000000}.{8641fed6-45a1-4...
    2    True Playback  Analogue (Realtek High Definition Audio)                        {0.0.0.00000000}.{a551ec85-9b70-4...
    3    True Recording Microphone (Blue Snowball)                                      {0.0.1.00000000}.{89162399-0caf-4...
    4   False Playback  Haut-parleurs (Steam Streaming Speakers)                        {0.0.0.00000000}.{07d001b7-8595-4...
    5   False Playback  Haut-parleurs (Steam Streaming Microphone)                      {0.0.0.00000000}.{1a41d3e1-dc25-4...
    6   False Playback  Realtek Digital Output(Optical) (Realtek High Definition Audio) {0.0.0.00000000}.{78614282-221c-4...
    7   False Playback  Realtek Digital Output (Realtek High Definition Audio)          {0.0.0.00000000}.{910f533b-7fe8-4...
    8   False Playback  Casque (SAVFY BTD0153 Hands-Free)                               {0.0.0.00000000}.{916936f0-c1a6-4...
    9   False Recording Microphone (Steam Streaming Microphone)                         {0.0.1.00000000}.{29a46485-9a4f-4...
   10   False Recording Mixage stéréo (Realtek High Definition Audio)                   {0.0.1.00000000}.{7686392f-d5a9-4...
   11   False Recording Prise jack AUX interne (Steam Streaming Speakers)               {0.0.1.00000000}.{8b88b17d-cc50-4...

######################## This order prevents us from having to change the index of the enabled AudioDevices whether or not the -ShowDisabled parameter is called.