Windows CMD shell - any easy way of redirecting the command itself into the output? If I do net localgroup administrators > %computername%-admins.txt, I'd like the output file to contain the net statement as well.
No powershell available to me; pure CMD/COMMAND only.
This is for an audit; the auditors want to see what command generated the output. I'm trying to avoid screenshots or enormous copy-paste from CMD windows.
Maybe kinda lame, but put the command in a batch file and redirect the output of the batch file to your txt file.
Contents of %computername%-admins.txt (member names cleansed):