Reset Windows 10 devices to their factory settings
A factory reset reverts a device to the original settings it had when the device was purchased. All apps and data on the device that were installed after purchase are removed. You can use Microsoft 365 Business to factory reset Windows 10 devices you manage.
Sign in to the admin center with global admin credentials.
In the admin center, on the Device actions card, choose Factory reset.
On the Factory reset pane, check the checkbox next to the device you want to remove data from and then choose Select.
On the Are you sure you want to factory reset the devices below pane, choose Confirm > Close.