I need to be able to store all the Users on a remote PC in the file Users.txt; afterwards, I need to remove some users from that file, or create a new file, NwUsers.txt, with some of the names removed.
The usernames that would be removed from the file are All Users, Default, Public, and WindowsHelp.
I am not quite sure what command would allow me to do that, can someone please help me to complete this script;
TYPE con >> PcList.txt
For /F %%A in (PcList.txt) do dir /ad /b \\%%A\C$\Users > Users.txt