Hi,
From your description, PowerShell is more in line with your requirements than .NET API. And PowerShell can be used in C#.
Blog: Learn How to Run PowerShell Scripts Against Multiple Computers
There is an exe systemreset.exe
in C:/Windows/System32 that can be called to factory reset device.
To block certain applications
The feature is located in Local Group Policy Editor-> Administrative Templates > System> Don't run specified Windows applications policy.
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/ee461027(v=technet.10)?redirectedfrom=MSDN
Best regards,
Minxin Yu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.