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.
Go to the admin center at https://admin.microsoft.com..
In the left nav, choose Devices > Manage.
On the Manage page, check the checkbox next to the device you want to remove data from and then, in the Manage drop-down choose Factory reset.
On the Are you sure you want to factory reset the devices below pane, choose Confirm > Close.