The power over demonic spirits does not come from knowing the names of the spirits, but in the power of the name of Jesus. Demons are subject to the name and authority of Jesus. Knowing the names of demons does not give you power over them.
17 The seventy-two returned with joy, saying, “Lord, even the demons
are subject to us in your name!” 18 And he said to them, “I saw
Satan fall like lightning from heaven. 19 Behold, I have given you
authority to tread on serpents and scorpions, and over all the power
of the enemy, and nothing shall hurt you. 20 Nevertheless, do not
rejoice in this, that the spirits are subject to you, but rejoice that
your names are written in heaven.” Luke 10:17-20 ESV
Indeed, it is quite dangerous to deal with the demonic world for those who are not followers of Jesus. In the book of Acts, Luke relates a story where someone attempted to use the name of Jesus and suffered greatly for it.
And God was doing extraordinary miracles by the hands of Paul, 12 so
that even handkerchiefs or aprons that had touched his skin were
carried away to the sick, and their diseases left them and the evil
spirits came out of them. 13 Then some of the itinerant Jewish
exorcists undertook to invoke the name of the Lord Jesus over those
who had evil spirits, saying, “I adjure you by the Jesus whom Paul
proclaims.” 14 Seven sons of a Jewish high priest named Sceva were
doing this. 15 But the evil spirit answered them, “Jesus I know, and
Paul I recognize, but who are you?” 16 And the man in whom was the
evil spirit leaped on them, mastered all of them and overpowered
them, so that they fled out of that house naked and wounded. 17 And
this became known to all the residents of Ephesus, both Jews and
Greeks. And fear fell upon them all, and the name of the Lord Jesus
was extolled. 18 Also many of those who were now believers came,
confessing and divulging their practices. 19 And a number of those who
had practiced magic arts brought their books together and burned them
in the sight of all. And they counted the value of them and found it
came to fifty thousand pieces of silver. 20 So the word of the Lord
continued to increase and prevail mightily. Acts 19:11-20 ESV