From here http://codebetter.com/jameskovacs/2010/04/12/psake-v4-00/
Support for Parameters and Properties
Invoke-psake has two new options, –parameters and –properties. Parameters is a hashtable passed into the current build script. These parameters are processed before any ‘Properties’ functions in your build scripts, which means you can use them from within your Properties.
invoke-psake Deploy.ps1 -parameters @{server=’Server01’}
# Deploy.ps1
properties {
$serverToDeployTo = $server
}
task default -depends All
Parameters are great when you have required information. Properties on the other hand are used to override default values.
invoke-psake Build.ps1 -properties @{config='Release'}
# Build.ps1
properties {
$config = 'Debug'
}
task default -depends All
So you could either take $Config out of the properties and pass it in as a parameter.
Or take the $DeployBaseDir out of the properties and create it inside the task block