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

Ask general questions here.
cslegna
Posts: 1
Joined: Fri Jun 26, 2020 9:04 pm

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

Post by cslegna » Fri Jun 26, 2020 9:26 pm

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 `
>> --windowsLogonAccount {myDomain\myWindowsUserName} `
>> --windowsLogonPassword {myWindowsPassword}
2. The command succeeds and the machine restarts.
3. I log in and the pipeline agent starts automatically.
4. I lock Windows. From a different device, I kick off the pipeline.
5. The pipeline runs, but the host screen remains locked.
6. The Ranorex tests fail because the desktop is not visible.

Any help/advice would be greatly appreciated!