A .NET library to initiate a Windows shutdown or restart.
$ dotnet add package Cattv.ShutdownWindowsA .NET library to initiate a Windows shutdown or restart.
Essentially a P/Invoke wrapper for InitiateSystemShutdownEx() that also adds the required SeShutdownPrivilege to the process token.
See: How to Shut Down the System.