This post shows how to configure Memory Dump by Windows command.
By default on Windows Server 2016 and 2019, settings are the following.
Parameter | Value |
Write debugging information | Automatic memory dump |
Dump file | %SystemRoot$\MEMORY.DMP |
Overwrite any existing file | Checked |
Configure the foregoing parameters by command.
I have checked the procedure in this post on Windows Server 2016 and 2019.
Command
Run the following commands in Administrator’s Command Prompt.
Write debugging information
(1) Run the following command to configure Write debugging information value.
DebugInfoType means the following.
0: none
1: Complete memory dump
2: Kernel memory dump
3: Small memory dump
7: Automatic memory dump
10: Active memory dump
wmic RECOVEROS set DebugInfoType=2
It shows the following.
Property(s) update successful.
(2) Run the following command to confirm the modification.
wmic RECOVEROS get DebugInfoType
It shows the following.
DebugInfoType
2
Debug file
(1) Run the following command to configure Debug file value.
i. If other than Small memory dump:
Output file is %SystemRoot%\MEMORY.DMP as an example.
wmic RECOVEROS set DebugFilePath="%SystemRoot\MEMORY.DMP"
It shows the following.
Property(s) update successful.
ii. If Small memory dump:
Output folder is %SystemRoot%\Minidump as an example.
wmic RECOVEROS set MiniDumpDirectory="%SystemRoot\Minidump"
It shows the following.
Property(s) update successful.
(2) Run the following command to confirm the modification.
i. If other than Small memory dump:
wmic RECOVEROS get DebugFilePath
It shows the following.
DebugFilePath
%SystemRoot%MEMORY.DMP
ii. If Small memory dump:
wmic RECOVEROS get MiniDumpDirectory
It shows the following.
MiniDumpDirectory
%SystemRoot%\Minidump
Overwrite any existing file
(1) Run the following command to configure Write Overwrite any existing file value.
OverwriteExistingDebugFile means the following.
True: Checked
False: Unchecked
wmic RECOVEROS set OverwriteExistingDebugFile=True
It shows the following.
Property(s) update successful.
(2) Run the following command to confirm the modification.
wmic RECOVEROS get OverwriteExistingDebugFile
It shows the following.
OverwriteExistingDebugFile
TRUE
That’s about it.