How to determine why an agent pool is offline in Azure dev-ops
Login to powershell.Navigate to the agent folder where it contains run cmd prompt and config cmd prompt.
Execute the following command
.\run.cmd
Try logging into the VM, and run the run.cmd from an elevated powershell prompt in your agent directory. Source: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops