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.



1 Comment   [ - ] Hide Comment


  • We use the custom inventory tip. Works like a charm.
Please log in to comment

Answer this question or Comment on this question for clarity



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


Answered 10/24/2013 by: SMal.tmcc
Red Belt

Please log in to comment