How to automatically shutdown personal desktop with no active session

%3CLINGO-SUB%20id%3D%22lingo-sub-2856607%22%20slang%3D%22en-US%22%3EHow%20to%20automatically%20shutdown%20personal%20desktop%20with%20no%20active%20session%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2856607%22%20slang%3D%22en-US%22%3E%3CP%3EHow%20to%20automatically%20shutdown%20personal%20desktop%20with%20no%20active%20session%20after%20hours%20%3F%3F%20Pls%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2856623%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20automatically%20shutdown%20personal%20desktop%20with%20no%20active%20session%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2856623%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1145667%22%20target%3D%22_blank%22%3E%40Harsh1730%3C%2FA%3E%26nbsp%3B%20you%20need%20to%20configure%20the%20following%20scheduled%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3ESet%20auto%20startup%20schedules%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3ESet%20auto%20shutdown%20schedules%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EAutomatically%20disconnect%20when%20a%20machine%20is%20idle%20for%20X%20minutes%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EShut%20down%20X%20minutes%20after%20a%20user%20disconnects%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EShut%20down%20X%20minutes%20if%20a%20user%20does%20not%20connect%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EYou%20can%20find%20details%20on%20how%20to%20configure%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3EOverview%3A%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevtest-labs%2Fdevtest-lab-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevtest-labs%2Fdevtest-lab-overview%3C%2FA%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EAuto%20startup%3A%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevtest-labs%2Fdevtest-lab-auto-startup-vm%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevtest-labs%2Fdevtest-lab-auto-startup-vm%3C%2FA%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EAuto%20shutdown%3A%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevtest-labs%2Fdevtest-lab-auto-shutdown%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevtest-labs%2Fdevtest-lab-auto-shutdown%3C%2FA%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EShutdown%20after%20X%20minutes%3A%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flab-services%2Fhow-to-enable-shutdown-disconnect%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flab-services%2Fhow-to-enable-shutdown-disconnect%3C%2FA%3E%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2856687%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20automatically%20shutdown%20personal%20desktop%20with%20no%20active%20session%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2856687%22%20slang%3D%22en-US%22%3EThanks.%20I%20already%20have%20VM%20start%20on%20connect%2C%20configured%20gpo%20to%20log%20off%20disconnected%20session%20after%20two%20hours.%20just%20need%20script%20or%20something%20similar%20to%20deallocate%20vm%20after%20hours%20when%20no%20user%20session%20is%20connected%3C%2FLINGO-BODY%3E
Occasional Contributor

How to automatically shutdown personal desktop with no active session after hours ?? Pls help

3 Replies

@Harsh1730  you need to configure the following scheduled 

  • Set auto startup schedules

  • Set auto shutdown schedules

  • Automatically disconnect when a machine is idle for X minutes

  • Shut down X minutes after a user disconnects

  • Shut down X minutes if a user does not connect

You can find details on how to configure 

Thanks. I already have VM start on connect, configured gpo to log off disconnected session after two hours. just need script or something similar to deallocate vm after hours when no user session is connected