In Windows 8 Open Power Options by right clicking on the start menu and clicking on Power Options.In case of local desktop Set all options in Sleep to 'Never' and in case Agent is Windows 10 VM then Set all options in Power & Sleep to 'Never'.In Windows 10 Open Power Options by right clicking on the start menu and clicking on Power Options.
Note: Due to security policy requirements some organizations doesn't allow switching off 'Power and Sleep' mode settings on development/test machines, in that case host your Agent on virtual machine and perform below Power and Sleep mode changes there. Turn off Power and Sleep mode settings will ensure that your agent machine doesn't get locked or goes to sleep mode automatically. To make sure that agent machine is not locked due to power and sleep mode settings user must perform below two steps: By default windows Powers and Sleep settings are configured in way that screen get locked after specific interval of time.