Всем привет. При выполнении команды:
Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorBrightness
Возвращает вывод:
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
Кто-нибудь знает почему так происходит и как это исправить? C PowerShell только знакомлюсь.
В 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 :