How to close all Explorer windows from command-line

GUIPropView is a tool for Windows that allows you to do many things (Hide, show, disable, enable, and more...) from command-line on the desired windows, according to their properties (Class Name, Title, Process, and so on...)
In order to close all opened Explorer windows from command-line, simply run the following command:
GUIPropView.exe /Action Close Class:CabinetWClass Process:Explorer.exe Visible:Yes

The above command requests to find all visible windows (Visible:Yes) that their class name is CabinetWClass (Class:CabinetWClass) and their process is Explorer.exe (Process:Explorer.exe) and then close all found Windows.

If you want to minimize all Explorer windows instead of closing, simply replace the 'Close' command with the 'Minimize' command:
GUIPropView.exe /Action Minimize Class:CabinetWClass Process:Explorer.exe Visible:Yes

You can find out what is the class name and process of a window, by looking in the main window of GUIPropView :