If you just mean "factory reset" instead of "format" (you format HDDs, not PCs) then Windows 10 has a built in factory reset function.
Results that may be inaccessible to you are currently showing.
Hide inaccessible resultsResults that may be inaccessible to you are currently showing.
Hide inaccessible results