Closed PavelPikat closed 4 years ago
Turns out the issue was in the name of the agent.
I have spaces, e.g. "Routing build 01", and when DSC resource lookup the agent by calling Get-VSTSAgent -AgentDirectory "C:\VSTSAgent" -NameFilter "Routing build 01"
it can't find it, because the actual name became "Routing" (the string before first space).
Changing the name to a string without spaces solved the issue.
When applying DSC second time, the resource will throw the following exception:
This is because
-Replace
switch inInstall-VSTSAgent
does not work. Could uninstalling and then installing the agent be a possible workaround here?