/build/static/layout/Breadcrumb_cap_w.png

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;

Attachment


1 Comment   [ + ] Show comment
  • 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)

Answer Summary:
Posted by: RichB 13 years ago
Second Degree Brown Belt
0
Thanks for this. It's working great!
Posted by: GillySpy 13 years ago
7th Degree Black Belt
0
What version(s) does this work for?
Posted by: RichB 13 years ago
Second Degree Brown Belt
0
Works with KACE server 5.1.31237 with 5.1 clients on Windows XP Pro, Windows 7 32 bit and 64 bit.
Posted by: afzal 13 years ago
Fourth Degree Green Belt
0
Thanks, It is working on version 5.2 as well.
Posted by: TexasRose 12 years ago
Orange Senior Belt
0
I am still new to kbox, so please bear with me....
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?
Posted by: TexasRose 12 years ago
Orange Senior Belt
0
never mind---I worked with KACE support and found what i needed.
Posted by: pcbhelpdesk 12 years ago
Senior Yellow Belt
0
FREAKING GREAT!!!
Works PERFECT!!!

Thank you for this program!!!!![:)][:D][:)][:D][:)][:D][:D][8|]
Posted by: HonestlyImNotBatman 12 years ago
Yellow Belt
0
Thanks for this. With agent version 5.3.47173 I had to prepend "[font="Courier New"]cmd /c " to the type command. Once I added that, the info flowed with no problems.
Posted by: steelc 12 years ago
Senior Yellow Belt
0
Is there an advantage to this script over using a custom inventory rule with ShellCommandTextReturn(net localgroup Administrators)?
Posted by: GillySpy 12 years ago
7th Degree Black Belt
0
From a reporting perspective the original script gives an output that is easier to parse. Also it clearly specifies what you are looking at when you come back a month later.

But to someone just casually looking at inventory and who knows the output they should be equivalent.
Posted by: awenzel@kace.com 12 years ago
Senior Purple Belt
0

ITninja migration stripped the attachement so please email me if you want the script. Thanks! -Tony

Posted by: diana_achim 11 years ago
Second Degree Blue Belt
0

Where is the zip file "localadmins.zip" ?

Posted by: brucegoose03 9 years ago
5th Degree Black Belt
0

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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ