Look into recimg.exe:
Originally Posted by gaming
Configures the recovery image Windows uses to refresh your PC.
RECIMG.EXE <command> <arguments>
The recimg.exe command line tool lets you configure a custom recovery image
for Windows to use when you refresh your PC. When you create a custom
recovery image, it will contain the desktop apps you've installed, and the
Windows system files in their current state. Recovery images do not contain
your documents, personal settings, user profiles, or apps from Windows Store,
because that information is preserved at the time you refresh your PC.