Jesus revealed the secret to driving out evil spirits in the Gospel of Mark. While Jesus was away his disciples tried and failed to drive a demon out of a boy.
Mar 9:25 And when Jesus saw that a crowd came running together, he rebuked the unclean spirit, saying to it, “You mute and deaf spirit, I command you, come out of him and never enter him again.” 26 And after crying out and convulsing him terribly, it came out, and the boy was like a corpse, so that most of them said, “He is dead.” 27 But Jesus took him by the hand and lifted him up, and he arose.
28 And when he had entered the house, his disciples asked him privately, “Why could we not cast it out?” 29 And he said to them, “This kind cannot be driven out by anything but prayer.”
Notice that Jesus did no praying when driving out the demon. He meant his disciples needed to build a stronger relationship with God.
The devil and his angels can’t stand up to the power that is in the name of Jesus, but that power comes from the faith built up by developing a relationship with God.
Jas 4:7 Submit yourselves therefore to God. Resist the devil, and he will flee from you.