I’ve written a .bat script to automate a cleanup process for our loaner machines.
I need to remove all but 3 local administrators as admins as part of that script… but that part specifically keeps failing.
Was able to configure this in PowerShell but… Not able to use GPO… and it HAS to be in this specific .bat file…
Any ideas?
@echo off
set /p username= Enter the name of account which you want to delete :
net user /DELETE %username%
pause
New contributor
Jefferson Wilson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.