Hi @Austin Hanna ,
Welcome to Microsoft Q&A!
UWP cannot use system
to execute the command. UWP contain BeginShutdown
method, but it only applicable to IOT device. And it will not work for Win 11, if you do want to shut down device, we suggest you use desktop bridge to make desktop extension for UWP app and shut down computer with command shutdown /s /t 0
.
Thank you.
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.