Force mode along axis

I need some guidance on how I can use force mode.

I have two poses, and I want to force the robot along the axis passing through both poses. How can I do this?

Thanks.