PowerShell Error - Variable capacity 4096 is exceeded for this scope

Octopus Server -

I have a project with roughly 80 nuget deployment steps, then a powershell step which manages IIS etc for all 80 steps. This script now errors with ‘Variable capacity 4096 is exceeded for this scope.’, the exact same project works without error on Octopus version

Octopus Error -

Cannot create variable OctopusActionDeployWebsiteSCApplicationWebAdministrationOutputPackageInstallationDirectoryPath because variable capacity 4096 is exceeded for this scope.

Any ideas?

Hi Graham,

This sounds like it may be a PowerShell behavior change, though we haven’t encountered it before. Raised a bug to investigate:


Okay, this is the last issue stopping us from moving from 1.6 - 2 (hopefully!).