The posts are toe nailed to the upper structure and either glued or fastened with a lag bolt cemented into the floor area.
Removing a post is not that difficult. What you need to keep in the back of your mind is support when removing the existing post.
If replacing a post, by two posts, one for bracing when working and another for actual installation in area.
Cut one post about 1/4 to 1/2 inch too long and drive it in place about one foot from the post to remove. This will support the roof when you remove the rotten one.
When in place, knock out the old one making sure not to hit the bracing posts and not to do damange to the roof when you pull out the post.
When post out. Measure the distance from the floor to the ceiling and this will be your cut on the new post. I would cut the post alittle shorter than measurement since you have forced the temp post up heigher.
Buy a support for the floor post. These things are cheap and made from metal. You will need to drill a hole in the porch and fasten an anchor to hold the metal to the flooring. I would use some liquid nails for concrete on this area too. Now, slip the posts into the metal holder and screw it in on the sides. Now with a level, make sure the new post is level.
You may need to nudge the posts alittle with a hammer to get good placement.
When set, carefully knock out the support post and walla, you have a new post.
Now, toe nail some nails on each side to the roof.