doskey
Calls Doskey.exe, which recalls previously entered command-line commands, edits command lines, and creates macros. Windows commands reference
On Windows 1 Sigma rule name it File doskey.exe
Windows
doskey [/reinstall] [/listsize=<size>] [/macros:[all | <exename>] [/history] [/insert | /overstrike] [/exename=<exename>] [/macrofile=<filename>] [<macroname>=[<text>]]doskey /macros > macinitdoskey /macrofile=macinitdoskey /history> tmp.batdoskey tx=cd temp$tdir/w $*doskey mc=md $1$tcd $1mc booksdoskey /exename=ftp.exe go=open 172.27.1.100$tmget *.TXT c:\reports$tbyegodoskey qf=format $1 /q /uqf a:doskey vlist =
/reinstallInstalls a new copy of Doskey.exe and clears the command history buffer./listsize=<size>Specifies the maximum number of commands in the history buffer./macrosDisplays a list of all doskey macros. You can use the redirection symbol (>) with /macros to redirect the list to a file. You can abbreviate /macros to /m./macros:allDisplays doskey macros for all executables./macros:<exename>Displays doskey macros for the executable specified by exename./historyDisplays all commands that are stored in memory. You can use the redirection symbol (>) with /history to redirect the list to a file. You can abbreviate /history as /h./insertSpecifies that new text you type is inserted in old text./overstrikeSpecifies that new text overwrites old text./exename=<exename>Specifies the program (that is, executable) in which the doskey macro runs./macrofile=<filename>Specifies a file that contains the macros that you want to install.<macroname>=[<text>]Creates a macro that carries out the commands specified by Text. MacroName specifies the name you want to assign to the macro. Text specifies the commands you want to record. If Text is left blank, MacroName is cleared of any assigned commands./?Displays help at the command prompt.Windows
Manage macros, windows commands, and command-lines.
List available macros
doskey /macrosIdentify/macrosDisplays a list of all doskey macros. Windows commands referenceCreate a new macro
doskey name = "command"IdentifyCreate a new macro for a specific executable
doskey /exename=executable name = "command"Identify/exenameSpecifies the program (that is, executable) in which the doskey macro runs. Windows commands referenceRemove a macro
doskey name =IdentifyDisplay all commands that are stored in memory
doskey /historyIdentify/historyDisplays all commands that are stored in memory. Windows commands referenceSave macros to a file for portability
doskey /macros >path\to\macinit_fileIdentify/macrosDisplays a list of all doskey macros. Windows commands referenceLoad macros from a file
doskey /macrofile = path\to\macinit_fileIdentify/macrofileSpecifies a file that contains the macros that you want to install. Windows commands reference