Hi,
I'm using your Cmdlet in a script to determine if the monitors should be turned off or the screensaver should start.
While the terminal output is always correct, the script gets another return from the Cmdlet.
I tried running the script with Powershell, but generally I'm using Powershell Core. Same on both.
The "TV" sound device is an AVR, which is not always turned on (so it vanishes from the playback devices list in Windows). A guess is, that this is causing the issue.
Headset Opt (High Definition Audio Device) is most of the time the only other enabled playback device and it is not even the communication default. There are also no enabled recording devices (empty list, except for disabled devices).
Terminal:
> Get-AudioDevice -Playback | Select-Object -Property Name
Name
----
TV (NVIDIA High Definition Audio)
Script debug output:
IdleTarget: 360
HDMIAudioDevice: TV (NVIDIA High Definition Audio) <- The sound device to check for
Dynamic Values:
IdleSeconds: 364.7178016
DefaultSoundDevice: Headset Opt (High Definition Audio Device) <- Cmdlet output
LockedScreen:
ActiveDisplay: Keine.
Monitor off - No HDMI Audio
Hi, I'm using your Cmdlet in a script to determine if the monitors should be turned off or the screensaver should start.
While the terminal output is always correct, the script gets another return from the Cmdlet.
I tried running the script with Powershell, but generally I'm using Powershell Core. Same on both. The "TV" sound device is an AVR, which is not always turned on (so it vanishes from the playback devices list in Windows). A guess is, that this is causing the issue.
Headset Opt (High Definition Audio Device)
is most of the time the only other enabled playback device and it is not even the communication default. There are also no enabled recording devices (empty list, except for disabled devices).Terminal:
Script debug output: