It checks a file, matches names within that file to folders and adds permissions. Nice and easy. BUT, if the name is listed in the file users2.txt and there isnt a matching folder in D:\test then I get an error in cmd prompt like so, in this case BOB:
for /f "tokens=*" %%i (users2.txt) do icacls.exe D:\test\%%i /grant %%i:F Administrator:F
BOB: No mapping between account names and security IDs was done.What do I need to output an error log that says something along the lines: CHECK Bob's profile path, his account isnt configured properly.
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
18 Experts available now in Live!