Hi,
I'd be happy to help you out with your question. Sorry for the inconvenience caused.
To change the default sign-in option for Shared PC mode in Windows 11, you can follow these simple steps. Firstly, go to the Settings option by clicking on the Start menu and then clicking on the gear icon. Then, click on Accounts and then Sign-in options. Scroll down to the "Privacy" section and click on "Manage how users sign in and sign out". After that, you can toggle off the "Use the sign-in screen" option and toggle on the "Use my sign-in info to automatically finish setting up my device" option. With these settings, the last user who signed in will be automatically signed out, and the Sign-in screen will display the last signed-out user as the default option. This way, the next user can sign in with their own Guest account.
Regarding the logoff or restart on 5 minutes of inactivity, you can use the Group Policy Editor to set this up. Firstly, press the Windows key + R to open the Run dialog box and then type "gpedit.msc" and press Enter to open the Group Policy Editor. Then, you can navigate to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits. Here, you can double-click on the "Set time limit for disconnected sessions" policy and select "Enabled". You can then set the time limit to "5 minutes" and click OK. This policy will force the user to log off when their session is disconnected for more than 5 minutes.
Lastly, if you're having issues with the scheduled task not working properly, you can modify the task's trigger by right-clicking on the task and selecting "Properties". In the "Triggers" tab, select the trigger and click on "Edit". From here, you can change the idle time to 5 minutes or any other duration you prefer. You can also check the "Enabled" checkbox to ensure that the task is active. Once you've made your changes, click OK to save them.
For more Information, please refer to following resource :-
Set up a shared or guest Windows device - https://learn.microsoft.com/windows/configuration/set-up-shared-or-guest-pc
If you have any other questions or need assistance with anything, please don't hesitate to let me know. I'm here to help.
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.