The way you do this is good - although it is possible to use the lowercase /p: Our team also does this. TeamCity does not throw an error, just trying to provide some useful information.
JetBrains provides some documentation for its preferred method at the bottom of the page under Using System Properties in Build Scripts .
source share