The MSBuild command line option -property allows to define property values. -property can be abbreviated with -p.
This can be demonstrated in the following simple project file that contains one only target. This target prints the values of the properties foo, bar and baz: