B
B
Boris the Animal2021-03-23 00:46:39
PowerShell
Boris the Animal, 2021-03-23 00:46:39

Get-CimInstance ... WmiMonitorBrightness is not supported. How to fix?

Hello. When running the command:

Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorBrightness


Returns output:
Get-CimInstance : Not supported
At line:1 char:1
+ Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorBrightness
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotImplemented: (root\wmi:WmiMonitorBrightness:String) [Get-CimInstance], CimException
    + FullyQualifiedErrorId : HRESULT 0x8004100c,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand


Does anyone know why this is happening and how to fix it? I am new to PowerShell.

In PowerShell 7 :
PS C:\Users\Xxxx> Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorBrightness
Get-CimInstance: Not supported
PS C:\Users\Xxxx> Get-Error

OriginInfo            :
Exception             :
    Type            : Microsoft.Management.Infrastructure.CimException
    NativeErrorCode : NotSupported
    ErrorData       : MSFT_ExtendedStatus
    MessageId       : HRESULT 0x8004100c
    StatusCode      : 7
    TargetSite      :
        Name          : ProcessNativeCallback
        DeclaringType : Microsoft.Management.Infrastructure.Internal.Operations.CimAsyncObserverProxyBase`1[T]
        MemberType    : Method
        Module        : Microsoft.Management.Infrastructure.dll
    StackTrace      :
   at Microsoft.Management.Infrastructure.Internal.Operations.CimAsyncObserverProxyBase`1.ProcessNativeCallback(Operati
onCallbackProcessingContext callbackProcessingContext, T currentItem, Boolean moreResults, MiResult operationResult, St
ring errorMessage, InstanceHandle errorDetailsHandle)
    Message         : Not supported
    Source          : Microsoft.Management.Infrastructure
    HResult         : -2146233088
TargetObject          : root\wmi:WmiMonitorBrightness
CategoryInfo          : NotImplemented: (root\wmi:WmiMonitorBrightness:String) [Get-CimInstance], CimException
FullyQualifiedErrorId : HRESULT 0x8004100c,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand
InvocationInfo        :
    MyCommand        : Get-CimInstance
    ScriptLineNumber : 1
    OffsetInLine     : 1
    HistoryId        : 4
    Line             : Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorBrightness
    PositionMessage  : At line:1 char:1
                       + Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorBrightness
                       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    InvocationName   : Get-CimInstance
    CommandOrigin    : Internal
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
azarij, 2021-03-23
@azarij

There are some nuances there. It seems to work only on laptops and all-in-vans. For external monitors, you need to dig in the direction of setmonitorbrightness or use an external utility to steer it all.
I use this https://www.nirsoft.net/utils/control_my_monitor.html to switch video inputs on monitors. does not work the first time, so the loop repeats 20 times and in the end, after 20 repetitions, it is guaranteed to work. =) brightness it also knows how.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question