If powder comes out of a mushroom does that mean it can hurt you?

Not necessarily.

The powder that comes out of a mushroom is called a spore print. Spore prints are used by mycologists to identify different species of mushrooms. The color and shape of the spore print can be diagnostic for a particular species.

Some mushrooms have edible spores, while others have poisonous spores. If you are not sure whether a mushroom is edible or poisonous, do not eat it. It is always best to consult with an expert or a field guide before consuming wild mushrooms.