Medicated dandruff shampoos work by stripping your hair and scalp of the oil and product buildup. They also have an anti-fungal ingredient that prevents any kind of fungal infection. So by stripping the oil and product buildup, the anti-dandruff shampoo deprives the fungus of its food source. The most common anti-dandruff shampoo ingredient is zinc pyrithione, which keeps the scalp fungus to a minimum. Although they work well on dandruff, the anti-dandruff shampoo can leave your scalp drier.