WMIC Custom Inventory on 5.5
Hey folks I've got a couple custom inventories that I've noticed have stopped working since we upgraded to 5.5
ShellCommandTextReturn(wmic netlogin get Name, NumberOfLogons)
ShellCommandTextReturn(wmic MemoryChip get banklabel) AND ShellCommandTextReturn(wmic memorychip get capacity)
The above ones all worked perfectly on 5.4.
And now the one from today which is how I noticed these weren't working any longer:
ShellCommandTextReturn(wmic DiskDrive Get Status)
I can see in the logs where the CI's are running, they just aren't running properly.
Any thoughts?
Answers (1)
ShellCommandTextReturn(cmd.exe /c wmic netlogin get Name, NumberOfLogons)
This may have been resolved with the latest path to 5.5.90546 (not tested).
Comments:
-
Where did you learn about this /c? I haven't tried it yet, but just wondering where in the documentation I missed it. - AFCUjstrick 10 years ago
-
Reading the logs. I think there was also a post somewhere about it. I'm also having to use it now on some of my scripts. - dugullett 10 years ago
-
How quickly I forget.... It looks like I've asked a similar question a while back. http://www.itninja.com/question/5-5-agent-custom-inventory-rule - dugullett 10 years ago
-
That worked like a champ. Thanks very much. - AFCUjstrick 10 years ago
how can i have with dates ? i mean last login date with above data - rahimpal 7 years ago