This Post is just a part of Brainstorming, and doing a research worth needed having out of the box thought that If Client just want to shutdown Machine directly from NAV. Though it will never be demanded but on the counterpart Client Expectation has no limits. 🙂
The interesting part is it’s just a single line of Code which will do the Job .
Process.Start(‘shutdown’,’/s /t 0′); – Shutdown
Process.Start(‘shutdown’,’/r /t 0′); – Restart
Process – DotNet – System.Diagnostics.Process.’System, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b77a5c561934e089′