Quick Command Line Tip – Preserving Your History…

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.



About Geoff Varosky
Geoff Varosky is a Senior Architect for Insight, based out of Watertown, MA. He has been architecting and developing web based applications his entire career, and has been working with SharePoint for the past 15 years. Geoff is an active member of the SharePoint community, Co-Founder and Co-Organizer of the Boston Area SharePoint Users Group, co-founder for the Boston Office 365 Users Group, co-organizer for SharePoint Saturday Boston and speaks regularly at SharePoint events and user groups.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: