View previous topic :: View next topic |
Author |
Message |
morphil
Joined: 17 Sep 2012 Posts: 5 Location: Österreich
|
Posted: Mon Sep 28, 2020 7:22 am Post subject: WMI Explorer: Provider Load Failure |
|
|
With this query Code: | select from MSFT_NetConnectionProfile | on Root\StandardCimv2 I get the error: Provider Load Failure
the same error when I execute it as a shellscript.
But it works when I try it on powershell like this: Code: | Get-WmiObject MSFT_NetConnectionProfile -Namespace root/StandardCimv2 | Select -ExpandProperty NetworkCategory |
I specialy wanna know the Networkcategory. All tested on the same machine with adminstrativ rights. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Mon Sep 28, 2020 7:35 am Post subject: |
|
|
I think there is no 32bit provider for this class (necessary for HostMonitor).
You may try to perform test using 64bit version of RMA (Remote Monitoring Agent).
https://www.ks-soft.net/hostmon.eng/downpage.htm
RMA/x86 is 32-bit application, however it works correctly on Windows Server 2003 x64 Edition and new 64-bit Windows systems (Windows 7, Windows 10, Windows Server 2008 - Windows Server 2019) running on x86-64 (AMD64) systems (not on Itanuim/IA-64) This 32-bit version included into Advanced Host Monitor package.
However in some cases you may need 64-bit version of the agent. RMA/x64 can be downloaded as separate package; you may replace x86 version of Passive and/or Active RMA agents using rma.exe and rma_active.exe modules from rmawin64.zip archive.
Drawback: Active Script test does not work in 64-bit mode because Microsoft does not offer 64-bit version of msscript.ocs. You may use Shell Script test method instead.
Regards
Alex |
|
Back to top |
|
|
morphil
Joined: 17 Sep 2012 Posts: 5 Location: Österreich
|
Posted: Mon Sep 28, 2020 7:49 am Post subject: |
|
|
thanks for the quick reply. I will try this, so far I didn't needed the rma agent before.
Will there ever be a 64bit Version of Hostmonitor? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Mon Sep 28, 2020 8:15 am Post subject: |
|
|
Quote: | Will there ever be a 64bit Version of Hostmonitor? |
Sure, but not in 2020
Another solution - use Shell Script test method and 64-bit version of powershell.exe
Regards
Alex |
|
Back to top |
|
|
morphil
Joined: 17 Sep 2012 Posts: 5 Location: Österreich
|
Posted: Mon Sep 28, 2020 8:53 am Post subject: |
|
|
It's a bit funky with 32/64bit in powershell, but this works for me
Start cmd: powershell.exe %script% %params%
Code: | $statusAlive = "ScriptRes:Host is alive:"
$statusDead = "ScriptRes:No answer:"
$statusUnknown = "ScriptRes:Unknown:"
$statusNotResolved = "ScriptRes:Unknown host:"
$statusOk = "ScriptRes:Ok:"
$statusBad = "ScriptRes:Bad:"
$statusBadContents = "ScriptRes:Bad contents:"
if (!$args[0]) {
echo $statusUnknown"Host parameter is not specified"
exit
}
$ComputerName = $args[0]
echo $ComputerName
#############################################################################
#If Powershell is running the 32-bit version on a 64-bit machine, we need to force powershell to run in 64-bit mode .
#############################################################################
if ($env:PROCESSOR_ARCHITEW6432 -eq "AMD64") {
if ($myInvocation.Line) {
&"$env:WINDIR\sysnative\windowspowershell\v1.0\powershell.exe" -NonInteractive -NoProfile $myInvocation.Line
}else{
&"$env:WINDIR\sysnative\windowspowershell\v1.0\powershell.exe" -NonInteractive -NoProfile -file "$($myInvocation.InvocationName)" $args
}
exit $lastexitcode
}
$result = Get-WmiObject -computer $ComputerName MSFT_NetConnectionProfile -Namespace root/StandardCimv2 | Select -ExpandProperty NetworkCategory
if ($result -match "2")
{
echo $statusOk$result
}
else
{
echo $statusBad$result
}
|
thanks very much for the perfect support.
regards, Phiilipp |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Mon Sep 28, 2020 9:12 am Post subject: |
|
|
You are welcome
Regards
Alex |
|
Back to top |
|
|
|