How to access TeamCity system properties within Powershell?

I can't find any documentation explaining how to access TeamCity system properties within Powershell scripts. I have tried printing out all the session variables and do not see any system properties passed from TeamCity. Can you describe how this is done in a ps1 script or point me to some documentation please?

0
2 comments
Official comment

Currently system properties are not provided to PowerShell script. Please watch/vote for https://youtrack.jetbrains.com/issue/TW-36360 

For now, you can use environmental variables instead of system properties and access them through [environment]::GetEnvironmentVariable("VAR_NAME") from PowerShell script

Avatar
Permanently deleted user

Thank you.

0

Please sign in to leave a comment.