Your OCD should want your vassals to under their de jure lords though wouldn't it?
http://forum.paradoxplaza.com/forum/showthread.php?585658-Cheats&highlight=cheats
You could try that thread though, I do not think you can transfer with a command though. But you can just give the title to the other guy.
Yes, optimally all the vassals are under their de-jure liege, but this becomes impossible to do once the game has run more than say 120-200 years and de jure stuff begins to shift. E.G. in my current game as Emperor of Brittany, I pressed a claim for my half-sister for the Kindgdom of Denmark, which by that time was the de-jure Kingdom for Denmark/Sjaelland/Slesvig and also Pomeralia, Courland and Holstein. At the same time, the Golden Horde had come very far West and conquered Hungary, Poland and Pomerania. I decided the time had come to put an end to their conquest and declared Holy War on Pomerania. This war ended pretty quickly and I gave the Duchy of Pomerania to some Dynasty member of mine. Shortly after my half-sister became Queen of Denmark. Now since Pomerania was surrounded by territory that was by now de-facto AND de-jure Kingdom of Denmark, I wanted to transfer the Duke of Pomerania under to the Queen of Denmark, but I couldnt, since Pomerania itself was de-jure part of the Kingdom of Pomerania, which was impossible for me to create since it requires Pagan religion.
That was just one of the problems I encountered so far, and my solutions had to be exceedingly radical (in this case, I revoked the Kingdom title from my half-sister and gave it to the Duke of Pomerania since that resulted in Pomerania being de-facto in the Kingdom of Denmark.
There's no effective way to do it via console. The ineffective way is to use the console to give the duchies in question to the liege you want to have control over them*, then transfer the counts to the king you gave the duchy to (there are no restrictions on transferring counts IIRC). From there, use the "play" command to switch to the vassal king, give the duchy back to the count. The MUCH more effective way: save game editing.
I did the whole "transfer dutchy to king, use play to switch to king, give dutchy back" thing two times now (when any "legal" actions would have resulted in far too great of vassal outcry (more than 40 relations hit)). Since I strongly believe that it should be possible to transfer vassals to lieges outside their de-jure realm (especially if this de-jure realm has shifted) I don't really consider it cheating, but of course it is kinda tedious. Imo doing it with console commands is a lot faster though than save file editing.