Boot into Recovery Mode (Cmd+R) or via a USB bootable install disk
Utilities > Terminal
If you have access to the existing macOS install, you can use the copy of screencapture located at /Volumes/Macintosh\ HD/usr/sbin/screencapture for the following. Otherwise, copy /usr/sbin/screencapture from another macOS install to a USB flash drive (e.g., SANDISK) and run from there.
Open desired application(s) from the Terminal, e.g.,
Disk Utility: /Applications/Utilities/Disk\ Utility.app/Contents/MacOS/Disk\ Utility
Safari: /Applications/Safari.app/Contents/MacOS/Safari
Open another tab in Terminal and run /Volumes/SANDISK/screencapture /Volumes/SANDISK/screenshot.png
References:
/mac | Oct 01, 2017