fireburn11
asked on
batch script to full use's last name based on sam id
Hi All,
I have this script to read in text file that contains list of user's logon name, then I want it to give me user's firstname and lastname based on it. But it keeps telling me"%%L" is unexpected at this time.
Could someone look at this and tell me what is wrong? Thanks
Cfor /f %%L in (c:\test.txt) do dsquery user -samid %%L | dsget user -ln
I have this script to read in text file that contains list of user's logon name, then I want it to give me user's firstname and lastname based on it. But it keeps telling me"%%L" is unexpected at this time.
Could someone look at this and tell me what is wrong? Thanks
Cfor /f %%L in (c:\test.txt) do dsquery user -samid %%L | dsget user -ln
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No problem, yup just one of those gotchas!
ASKER
Thanks for the help!