IWTL how to stand up straight and walk with confidence

I think I am usually slouching and walking on autopilot.

Are there any excercises I can do to fix my posture every few minutes?

I am a man, and I also heard somewhere that walking with your shoulders broadcasts confidence. Is there anything else I can do?