By default when you execute a “Deploy Using PS/DSC” action in Release Management U4 you have access to these System variables in your PowerShell or DSC Scripts
- $applicationPathRoot - Application Path Root*
- $buildNumber - Build Number (for component in the release)
- $buildDefinition - Build Definition (for component)
- $tfsUrl - TFS URL (for component)
- $teamProject - Team Project (for component)
- $tag - Tag (for server which is running the action)
- $applicationPath - Application Path (destination path where component is copied)
- $environment - Environment (for stage)
- $stage - Stage (for release path)
- $packageLocation - Package Location (for component)
- $releaseName - Release Name (The ID of the release; this is assigned by Release Management)
- $releaseId - Release ID (The number of the release)
*The ApplicationPathRoot variable defaults to an empty string that instructs Release Management to copy the files to c:\windows\DtlDownload folder. However, if you set that value to a different location Release Management will copy the files to the provided location.
Don’t forget that U4 also has configuration variables at three other levels:
If you define the same configuration variable at multiple levels the value set closest to the Release Template is used. Think of Cascading Style Sheets, the configuration variables work the same way.
You can get more information from this MSDN article.