So here is what i got so far,
I have tried taking out the -u and -p switches, and just running it on a administrator profile(which i was originally). i am testing on two machines; one is joined to domain and one is not.
the one that is not, it changes the password and i can use that password to log into the local admin just fine.
the one that is joined to domain the script will change the password and exit with error code 0, BUT when i try to login with the new password it doesnt work and the old one doesnt work either..
does that make sense? lol
@echo off
setlocal enabledelayedexpansion
for /f %%F in (C:\PCLIST.txt) do (
pstools\psexec.exe \\%%F net user Administrator NewPassword123!
if !errorlevel! NEQ 0 echo %%F >> Failed.log
)
echo complete
pause
any ideas? thanks.
PS. no im not using pspasswd its the worst creation since trump k thx.