-
Execute WMI at different namespace
Hello,
I’m trying to set up a wmi module that returns the name of the Antivirus-Product. Therefore, I use this query from unix wmic-CLI:
wmic -U [domain]/Administrator%password //192.168.xx.xx "select displayname FROM AntiVirusProduct" --namespace=root\SecurityCenter2
This query executes successfully and returns the name of the av-product of the given remote-host.
CLASS: AntiVirusProduct displayName|instanceGuid Windows Defender|{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}
When I create a new WMI-module via pandora_console, I enter all fields (query, namespace, login) corresponding to the query above. Note: the length of the namepace-field in html-form is only 20 chars long, need to update this value via DOM-Feature of firefox/chrome. But when done, I can enter more than 20 chars. This also needs to be fixed.
Anyway. After creating that module, the variable is still at “not initialized” state. I don’t know what to do. I tried \rootSecurityCenter2 and rootSecurityCenter2 and other combinations. It seems, that “namespace” isn’t respected at all. So I checked the “functions_wmi.php” at the “include” folder (just quickly overflew it), but couldn’t find an error.
Can you help me please…? Thanks in advance!
Ok – got it working. In the “namespace”-field of the html input form, you have to use a “/” instead of “”, so that the namespace-string looks like this: “root/SecurityCenter2”.
So, there is only one problem left: the maxlength-value of the namespace-field in the html input form. It can be temporarily modified via dev-console (ff/chrome), but that’s not a long-term solution. But this fix should be last less than a minute for the pandora-dev-team