No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

This repository contains a PowerShell module with a DSC resource that can be used to install TeamCity Agent


First, ensure the TeamCityAgentDSC module is on your $env:PSModulePath. Then you can create and apply configuration like this.

Configuration SampleConfig
    Import-DscResource -Module TeamCityAgentDSC
    Node "localhost"
        cTeamCityAgent TeamCityAgent 
            Ensure = "Present" 
            State = "Started"         
            AgentName = "TeamCity Build Agent"             
            ServerHostname = "the public hostname or ip of your teamcity server;
            ServerPort = 80;
            AgentHostname = "agent_hostname_or_ip";
            AgentPort = 9090;            
            AgentHomeDirectory = "C:\TeamCity\Agent";
            AgentWorkDirectory = "F:\TeamCity\Agent\work";    

Start-DscConfiguration .\SampleConfig -Verbose -wait



When Ensure is set to Present, the resource will:

  1. Download the TeamCity Agent Zip from the TeamCity Server
  2. Install and configure TeamCity Agent
  3. Setup TeamCity Agent as a Windows Service

When Ensure is set to Absent, the resource will throw an error as uninstall of TeamCity Agent is not supported by module yet.

When State is Started, the resource will ensure that the TeamCity Agent windows service 'TeamCityAgent' is running. When Stopped, it will ensure the service is st opped.