Display all Local Admins as custom Inventory
localadmins.zip contains Software-2084.kpkg and Script-61.kpkg
Import these two files into your kbox by placing them on the KBOX samba share \\kboxip\clientdrop
Go to Settings > Resources > Import KBOX Resources and the two items should appear. Import them.
Then schedule the local admin script to run about once a week and hit the run it now button.
Make sure the custom software inventory item is applied to all windows machines.
Check the client in manually after the script is finished and it should be there under Custom Inventory Fields.
Custom field should look something like this;
-
This is great. I'm wondering if there is a way to get the CIR to exclude the username Administrator. We would only like to see domain users that have been added to the local administrators group. - CEads 9 years ago
Answers (13)
I have a network drive mapped to my kbox\clientdrop. I put the 2 files from the zip file into that clientdrop, however, when i then go to settings\resources\import, there is nothing there. When i go to settings\resources\resource manager queue, there is nothing there either.
What am I missing in my ability to import?
wmic useraccount where"LocalAccount=TRUE" get * /format:List
IF you want just specific columns, you could do:
wmic useraccount where"LocalAccount=TRUE" get Name,Disabled /format:List
Basically just replace * with a comma-seperated list of available columns to choose from.
Here’s a way to rule out some ofthe standard accounts too:
wmic useraccount where"LocalAccount=TRUE AND not Description like '%Guest%'" get */format:list
Comments:
-
hello, How do you use this command ? i have create a custom inventory rule : ShellCommandTextReturn(wmic useraccount where"LocalAccount=TRUE" get * /format:List)
But it do not works :( - gjoubert 9 years ago-
Try this:
ShellCommandTextReturn(cmd /c wmic useraccount where "LocalAccount=TRUE AND not Description like '%Guest%'" get * /format:list)
If that doesn't work, test the command in command prompt like this:
wmic useraccount where "LocalAccount=TRUE AND not Description like '%Guest%'" get * /format:list - brucegoose03 9 years ago-
It's ok, thanks - gjoubert 9 years ago
so that the conversation will remain readable.