The best way to acquire CM-based knowledge from a command line interface would be via BLCLI scripts. There are many BLCLI commands that are based around server-property interactions. You're probably looking for these two:
SERVER_ID=`blcli Server getServerIdByName myserver`
PROP_VAL=`blcli Server getPropertyValue MyProperty $SERVER_ID`
I would also add that you will need to figure out caching BLCLI user credentials so that the script runs silently.
Please see the BLCLI best practice KB document:
If you are using an SRP proxy for all your NSH CLI work already does this supply the needed cached credentials that blcli calls require?
Never mind, I answered my own question doing a little testing. It worked for me, but WOW is that slow! Each blcli call took about 10 to 12 seconds to return. Is that common or is it because I am using an SRP proxy?
Also, in your example the second call has its last 2 arguments out of order. It should be:
blcli Server getPropertyValue $SERVER_ID MyProperty