I need to run tests on system recoverability which includes suddenly crashing a system without warning (“hard crash”, no shutdown workaround).
I’m looking for something as close as possible to a serious hardware error that just fully crashes the system (blue screen HALT or worse, e.g .sudden reboot similar to non-recoverable memory/cpu errors).
How could I do something like this in C# (probably unmanaged code?)?
I always find flipping the power switch (on the wall socket) works perfectly for this solution – especially when I only meant to turn the monitor off.
If you need to do it from the keyboard, check here for a way to generate a BSOD.
EDIT: a quick google suggests there are 3 ways: