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.
-
We use the custom inventory tip. Works like a charm. - Jbr32 11 years ago