Redirect command line into its own output?

Posted by mfinni on Server Fault See other posts from Server Fault or by mfinni
Published on 2013-10-30T20:40:12Z Indexed on 2013/10/30 21:58 UTC
Read the original article Hit count: 104

Filed under:
|

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.

© Server Fault or respective owner

Related posts about windows-server-2003

Related posts about cmd