Hello,
First of all, thanks a lot for the module!
I'm having an issue trying to run it in non-interactive mode (as SYSTEM user) though. I get the following error:
Failed to get the number of physical monitors attached to 'WinDisc'.
+ CategoryInfo : NotSpecified: (WinDisc:LogicalDisplay) [Get-Monitor], ApiException
+ FullyQualifiedErrorId : GetPhysicalMonitors,MartinGC94.MonitorConfig.Commands.GetMonitorCommand
+ PSComputerName : localhost
I'm trying to use this module in a scheduled task and can reproduce this error by using Invoke-CommandAs module:
Invoke-CommandAs -ScriptBlock { Get-Monitor } -AsSystem
I've also tried fetching specific monitor, but to no avail -- in this case there is no error, but no return as well:
Invoke-CommandAs -ScriptBlock { Get-Monitor -DeviceName "\\.\DISPLAY1" } -AsSystem
I understand that there is a high chance it's not possible to get monitor information in non-interactive mode, since there is no window/display handle available. However, perhaps there is some way?
Thanks in advance!
Hello,
First of all, thanks a lot for the module!
I'm having an issue trying to run it in non-interactive mode (as SYSTEM user) though. I get the following error:
I'm trying to use this module in a scheduled task and can reproduce this error by using Invoke-CommandAs module:
I've also tried fetching specific monitor, but to no avail -- in this case there is no error, but no return as well:
I understand that there is a high chance it's not possible to get monitor information in non-interactive mode, since there is no window/display handle available. However, perhaps there is some way?
Thanks in advance!