Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
change root directory for AWS CodeDeploy service to fix issue with long paths
$logrand = Get-Random -minimum 0 -maximum 99
Start-Transcript -path "$PSCommandPath$logrand.log" -Force
Stop-Service -Name codedeployagent
$codedeployconfig = "C:\ProgramData\Amazon\CodeDeploy\conf.yml"
(Get-Content $codedeployconfig) -replace "'Amazon/CodeDeploy'", 'c:\codedeploy' | Set-Content $codedeployconfig
Start-Service -Name codedeployagent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment