Azure Devops pipeline agent in interactive mode with autoLogon does not unlock desktop

cslegna
Posts: 1
Joined: Fri Jun 26, 2020 9:04 pm

Azure Devops pipeline agent in interactive mode with autoLogon does not unlock desktop

Hello! I'm using Azure DevOps Pipelines to orchestrate Ranorex testing for a Windows desktop application.

Following the instructions in your user guide, webinar, and in the Microsoft docs, I was able to set up a self-hosted Windows agent on my work PC, and for the most part this is working very well.

My one issue is that I would like to leave the screen on the host machine locked, and have the agent to unlock it only when it receives a job, but so far I have not been able to do this. Based on my reading of the MS docs, I think this should be possible by configuring the agent to run in interactive mode with autoLogon enabled. I'm located in an open office, so obviously leaving the machine unlocked is not desirable.

Here's what I have tried:

1. I enter the following command in a PowerShell session with admin privileges.

Code: Select all

PS C:\path\to\agent> .\config.cmd 
>> --unattended
>> --url https://dev.azure.com/myOrganization/ 
>> --auth pat
>> --token {myPAT} 
>> --pool {myPool}
>> --runAsAutoLogon