  We provide a general B\"ochner type formula which enables us to prove some
rigidity results for $V$-static spaces. In particular, we show that an
$n$-dimensional positive static triple with connected boundary and positive
scalar curvature must be isometric to the standard hemisphere, provided that
the metric has zero radial Weyl curvature and satisfies a suitable pinching
condition. Moreover, we classify $V$-static spaces with non-negative sectional
curvature.
