Example usage for doskey.
doskey /historyCreate command macros or display the current command history.
doskey [/reinstall] [/listsize=<size>] [/macros:[all | <exename>] [/history] [/insert | /overstrike] [/exename=<exename>] [/macrofile=<filename>] [<macroname>=[<text>]]The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.
Example usage for doskey.
doskey /history| Option / clause | Description |
|---|---|
<name>=<macro> | Create or replace a command macro in the current session. |
/macros[:all] | Display defined macros. |
/history | Display the current command history. |
/macrofile=<file> | Load macros from a file. |
/reinstall | Reinstall Doskey in the current command session. |
/listsize=<size> | Microsoft documents this switch; use the linked reference for accepted values, effects and version limits. |
/macros:<exename> | Microsoft documents this switch; use the linked reference for accepted values, effects and version limits. |
/insert | Microsoft documents this switch; use the linked reference for accepted values, effects and version limits. |
/overstrike | Microsoft documents this switch; use the linked reference for accepted values, effects and version limits. |
/exename=<exename> | Microsoft documents this switch; use the linked reference for accepted values, effects and version limits. |
/macrofile=<filename> | Microsoft documents this switch; use the linked reference for accepted values, effects and version limits. |
<macroname>=[<text>] | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
/? | Display command help or the supported command-line usage. |
Key | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
UP ARROW | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
DOWN ARROW | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
PAGE UP | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
PAGE DOWN | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
Key or key combination | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
LEFT ARROW | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
RIGHT ARROW | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
CTRL+LEFT ARROW | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
CTRL+RIGHT ARROW | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
HOME | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
END | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
ESC | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
F1 | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
F2 | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
F3 | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
F4 | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
F5 | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
F6 | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
F7 | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
ALT+F7 | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
F8 | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
F9 | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
ALT+F10 | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
Character | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$G or $g | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$G$G or $g$g | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$L or $l | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$B or $b | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$T or $t | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$$ | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$1 through $9 | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
$* | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
<exename> | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
<macroname> | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
<text> | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.