Not only was the Rebbe categorically opposed to religious boys enlisting in the IDF. There's no evidence that he ever advised ANYONE to enlist.
Institutional Chabad deceptively claims otherwise, flaunting a single letter in which the Rebbe encouraged a Jew not to leave the position in the IDF, but that was a completely different story. That person was a married man working as a military rabbi, putting on tefillin with and teaching Torah to hundreds of soldiers daily. There's another letter they sometimes cite as well, a letter that the Rebbe had never signed but was written by his secretary allegedly with his permission, in which he responded to the accusation that "Chabad doesn't serve in the IDF" by stating, "To my knowledge, there are numerous Chabad adherents who have served and currently serving," or something to that effect.
It's true that the Rebbe expressed gratitude to injured IDF servicemen for their selflessness, but that does not mean that he had ever encouraged or even approved of anyone joining in the first place.
Quite the contrary. When the Knesset was about to pass a bill for the conscription of girls, the Rebbe was adamantly opposed. He reportedly declared that once the IDF starts enlisting women, it will be forbidden for anyone to serve. Not because of impropriety, sacrilege, or immodesty, but because the military will be compromised and weakened.
Moreover, as I have noted many times in the recent past, the Rebbe significantly changed his attitude toward the Israeli government in 1992 when the supposedly right-wing government of Itshak Shamir capitulated to land concession and mercilessly jeopardized the security of millions of Jews. It was at that time that the Rebbe realized the Zionist establishment's dark democidal intentions. He lamented that it would have been preferable that a Jewish government wouldn't exist at all. The transcript of these harsh words can be found in the back of Sefer Hasichoth 5752 volume two.
There's no question that the Rebbe would not approve of any Jew enlisting to serve such a regime. It's unspeakable that Chabad youth are enlisting in current times. Hashem yeracheim.