This is another example on how to use AudioDeviceCmdlets
This one cycles through the list of all audio devices, that way it works out of the box without having to specify the IDs of the devices you want to toggle.
I like the idea of adding more example scripts. I opened some conversations to resolve in the code. Since this script cycle through Playback devices specifically , I would also suggest adding that to the filename.
This is another example on how to use AudioDeviceCmdlets
This one cycles through the list of all audio devices, that way it works out of the box without having to specify the IDs of the devices you want to toggle.