I'm doing a lot of testing with Windows autopilot. Is there a method to reset the machine solely from the command line using the systemreset.exe tool? I cannot find any documentation for the switches it supports. My goal it to do a full reset of the device but via a script rather than clicking through the UI options. I ran the sysinternals tools 'strings' against it and I see some options like -factoryreset which do work but I'd like to get a full listing/reference.
The systemreset.exe command-line tool is primarily designed to launch the Windows 10 Reset this PC feature through the user interface. To my knowledge, Microsoft does not provide official documentation or a comprehensive list of command-line options for systemreset.exe.
To explore the available options further, you could try using the systemreset.exe tool with additional common command-line switches like /help, /h, /?, or -?. These switches are often used to display help information or command-line options for many Windows tools and utilities.
It's important to note that undocumented options might not be officially supported and could behave unexpectedly or change in future Windows updates. Therefore, it's recommended to exercise caution and thoroughly test any commands or options before deploying them in production environments.
One possible approach is to search for Windows forums or communities where users share their experiences and findings related to Windows deployment and automation. Websites like Stack Overflow, Reddit, or Microsoft TechNet forums might have threads discussing the systemreset.exe command-line options or alternative methods for achieving similar results.
I've looked for this answer online and have come across the "systemreset -factoryreset" command which works, but it comes up with the prompt asking if I want to keep my files or remove everything, I want to remove everything, but without the prompt.
We are not doing this from any pre-exiting images, and our laptops are running the pre-loaded Windows 10 Pro install, we are just using the in-built Windows 10 "reset this PC" feature as we have no MDM configured. We just want the laptops to be totally reset so they don't contain any company information, we're not bothered about completing the OOBE once they are wiped.
We are trying to accomplish this remotely as our users are all at home, so I need to automate it and have no user involvement in the process, I just want it to factory reset, and bring the laptop up to the off-the-shelf state configuration. We have the facility to push commands and scripts to the laptops so was hoping to do this via powershell.
The systemreset command will show interface to user and it is behavior by design , however if you are able to manage devices using Configuration Manager, you could do it using Full Wipe, take a look at:
-us/mem/configmgr/mdm/deploy-use/wipe-lock-reset-devices
From what I know there is no script to run it in silence mode and wipe system and it is behavior by design, so let say if there is possibility to do so, cybercriminals might run that script and user will lose Windows but it is available in Configuration Manager or Intune, it means PC is being managed by trusted administrator.
$methodname can bei either "doWipeMethod" or "doWipeProtectedMethod". The later one will also wipe all data from the disks, especially if you want to refurbish the devices. The downside is that "doWipeProtectedMethod" can leave some clients (depending on configuration and hardware) in an unbootable state.
Additionally "doWipeMethod" can be canceled by the user (power cycle for example), "doWipeProtectedMethod" cannot be canceled. It automatically resumes after a reboot until done. The higher risk ist worth it most of the time. If you want to be sure that the devices will be in a usable state after the wipe, use "doWipeMethod" instead.
If it is important to fully wipe the data from the disks (i.e. non-recoverable) you should make sure that all disks are bitlocker encrypted. Only with encryption you can be sure that no data is recoverable with this method.
Another way, which you can do remotely and without psexec (group policy for example), would be to create a scheduled task running as SYSTEM and executing the script. You can then execute the task on demand or with a time/date schedule.
The "OEM stuff" is found in C:\Recovery\*. If you remove all contents in this folder before you initiate the device reset, it should restore a clean windows installation without any "OEM stuff". Keep in mind though, that certain driver packages will be migrated to the new installation. Sometimes these can contain additional software packages included in the device driver package (for example audio control panels from the audio driver).
@dretzer I realized the computer I was running it on didn't have a recovery partition so even running the "systemreset -cleanpc" command wasn't working.
Kaseya allows you to run scripts as System - so even though I was running locally in picture - I was trying as System most of the time.
Thanks for the help either way.
yes. thanks. I get less HP stuff restored after a reset if I delete C:\Recevery before, but still some bits I do not want. where is it getting these last bits from that performing a fresh start from intune seems to ignore? I want omit these too
Might have to look into manual cloud reinstall at shift-f10 on first boot on each machine or a bootable USB with an unattended xml to just blow the hard drive away and start again without user interaction.
I want to reset my PC, but when I click the "Get started" button in the settings under the "Reset this PC", nothing happens... I've found that this button activates the C:\Windows\System32\systemreset.exe file, so I've tested the file directly, as administrator, and still nothing happended. I tried restarting in the advanced startup to reset my PC from there, and when I click on the button (in the advanced startup menu), still nothing happended, my PC just started normally...
For future reference if it wasn't solved. Open powershell or cmd with admin and simply type systemreset.exe and press enter. This forces the OS to run the file whereas simply clicking on it, even a right click and run as admin, won't necessarily do that, especially with AV (though AV rarely effects system files, its not unheard of.)
For ASUS Transformer T100 TA Win 10: While holding down F9 key, Press & Hold down the Power key until "Wait a minute" shows up: This Boots into Windowsrecovery mode with options to completely Reset to factory or Refresh. Donot need Password (I had forgotten mine).
Reset Windows is a feature of Windows 10 which allows you to choose whether to keep your files or remove them, and then reinstall Windows. In this article, we will see how to access it quickly without browsing through the Settings app pages.
Features like Reset & Refresh in Windows 10 are located in Settings -> Update & Recovery -> Recovery.
The executable file "systemreset.exe" is located in the folder C:\Windows\System32, so that's why you can access it directly. You can create a shortcut to that file and access it faster with one click later.
Tip: Winaero Twеaker is essential software for every Windows 10, Windows 8 and Windows 7 user. It allows you to customize the appearance and behavior of the operating system in a flexible way.
Try Winaero Twеaker now!