When a certain person is trying to harm you, a man who is an adept in the science of mantra can stop him from doing any harm by meditations on the turmeric-colored form of Ganesha with the mantra OM HARIDRAA GANAPATAYAE NAMAHA (108 times), sending that energy on that person to stop him from doing any harm.
When you want to attract people towards you or your work with good motive and for a noble purpose - without trying to take advantage of the person - then you could meditate on the dawn or crimson-colored Ganapati, saying OM VIJAYA GANAPATAYAE NAMAHA and send that radiant energy towards that person. This power should not be misused. If it is misused, great harm will come to the user.
Dark-colored Ganesha is meditated upon whenever you want to destroy negativity, hatred, demoniac ego, inner or outer enemies. The mantra is OM UCCHHISTA GANAPATAYAE NAMAHA.
To cast away the devils or evil spirits from a haunted home or from the body or mind of a person, you meditate on the brown color of Ganesha. The mantra is OM SHAKTI GANAPATAYAE NAMAHA.