/build/static/layout/Breadcrumb_cap_w.png

Assistance troublshooting a K1000 script to find local admins

I would like to run a command that finds domain PCs that have domain accounts (other than Domain Admins) as local administrators.  I found the command here: http://www.petri.co.il/find-local-admin-on-network.htm that creates a file for each PC that lists the local admins.  If there are no unwanted local admins, the fle is 0k and I can just delete it, and act upon all the others.  I ran it on my PC locally and it creates the file as expected.  When I set it up as a script on the Kace 1100, it shows that it ran successfully, but the output file is not created.  I've run it as the domain administrator to verify that it wasn't a rights issue anywhere, but to no avail.

Here's the command: net localgroup administrators | find "\" | find /v "Domain Admins" > "\\servername\Sharename\departments\network and computer services\localadmins\computers\%COMPUTERNAME%.txt"

and here's my K1100 setup:

I'm a scripting neophyte, so I'm sure that theres something very simple that I'm doing wrong.

 

Thanks.


1 Comment   [ + ] Show comment
  • We use the custom inventory tip. Works like a charm. - Jbr32 10 years ago

Answers (1)

Posted by: SMal.tmcc 10 years ago
Red Belt
2

look at this link for another way to do this with the k1000

http://www.itninja.com/question/i-need-to-list-all-accounts-with-local-admin-right-to-a-machine

 
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