Im attempting to run a cmd via Lansweeper deployment to clear the creds stored in credential manager. Lansweeper reports the CMD executed successfully but the creds dont get cleared.
Running the same cmds via a bat file locally works as expected.
This is the cmd im trying to run:
@echo off
cmdkey.exe /list > "%TEMP%\List.txt"
findstr.exe Target "%TEMP%\List.txt" > "%TEMP%\tokensonly.txt"
FOR /F "tokens=1,2 delims= " %%G IN (%TEMP%\tokensonly.txt) DO cmdkey.exe /delete:%%H
del "%TEMP%\List.txt" /s /f /q
del "%TEMP%\tokensonly.txt" /s /f /q
echo All done
Any ideas where im going wrong?