Quick Command Line Tip – Preserving Your History…
April 20, 2010 Leave a comment
A lot of administration work can be done from the command line using STSADM. Adding and retracting solutions, resetting IIS, interfacing with GACUTIL, adding users, creating sites and webs, and the list goes on and on and on… after a while, you may want to keep a record of the operations that you had performed. This is very helpful in keeping a server log together, so you can always go back and trace what has been done.
By using the following command: DOSKEY /history, you can do just that. Looking to find out what DOSKEY is? Check Wikipedia of course 🙂 But, if you don’t want to go elsewhere to find out, we’ll just quote Wikipedia, they say it better than I can.
“DOSKey is a utility for MS-DOS and Microsoft Windows that adds command history, macro functionality, and improved editing features to the command line interpreters COMMAND.COM and cmd.exe. It was included as a TSR program with MS-DOS and PC-DOS versions 5 and later, and with Microsoft’s Windows 95/98/Me.”
If you’d like to save that off to a file? Also not a problem, just run: DOSKEY /history c:\STSADM.042010.txt and you’re ready to go. Your command history will be backed up in C:\STSADM.042010.txt.