Skip to main content

Run Azure self hosted agent as service

Updated 1 min readMarkdown
Run Azure self hosted agent as service
  1. Open a Command Prompt as an administrator.

  2. Run the following sc create command to create the service:

sc create my-agent binPath= "C:\Windows\System32\cmd.exe /c C:\agent\run.cmd"
  1. If you want to configure the service to start automatically with Windows, you can run the following sc config command:
sc config my-agent start= auto
  1. Start the service using the sc start command:
sc start my-agent

Ensure that you're running these commands directly within the Command Prompt and not within a PowerShell session to avoid any issues with command interpretation.

If you continue to encounter any issues, please provide more details, and I'll be happy to assist further.

About the author

  • Hey there! I'm currently working as an Associate DevOps Engineer, and I'm diving into popular DevOps tools like Azure Devops,Linux, Docker, Kubernetes,Terraform and Ansible. I'm also on the learning track with AWS certifications to amp up my cloud game. If you're into tech collaborations and exploring new horizons, let's connect!

No comments yet. Be the first to comment.

More from this blog