Germany sent Lenin back to Russia hoping that he would foment further revolutionary activity in Russia so that Russia would withdraw from fighting Germany in World War I. The February Revolution of 1917 had already taken place while Lenin was in Switzerland. Despite this revolution overthrowing the Tsar, the Provisional Government acting in place of the Tsar was still committed to fighting Germany in the war. The Germans knew that most Russians wanted to end their involvement in the war, so the German High Command sent Lenin back to Russia hoping he would destabilize the government and disrupt the army and perhaps even lead another rebellion. Germany even funded Lenin and his Bolshevik Party to some degree. Lenin led the October Bolshevik Revolution, ousted the pro-war Provisional Government and entered into the Treaty of Brest-Litovsk with the Central Powers ending Russia's involvement in the war. Germany got what it wanted: an end to the war on the Russian front and the ability to move many divisions of soldiers to fight the French, British and Americans on the western front.
Germany saw a chance to weaken their enemy.
Lenin was never exiled from Germany. He had been living in exile in Switzerland but it was from Russia not Germany. After the February Russian Revolution, Germany helped Lenin return to Russia from Switzerland through Germany and Finland. Lenin wasn't being exiled from Switzerland or Germany. He was being returned to Russia to foment revolution so as to get Russia out of World War 1.
Germany sent him there in the hope of destabilizing the country.
Germany!
It was smart for Germany to sneak Lenin back into Russia because they were currently at war with Russia. Germany wanted Lenin to take Russia out from the inside, creating a rebellion that would collapse the government and lead to German victory.
It was a diplomatically-sealed train originating in Switzerland and bound for Russia, traversing Germany and Sweden. The Germans allowed the transit, not taking any chances that Lenin would disembark in Germany to spread his Communist propaganda, but fully welcoming the idea of him inciting revolt in Russia, which was at war with Germany. For this, Lenin's foes in Russia had denounced him as a "German spy". While he most likely was not anybody's spy, the revolution he eventually led certainly played into Germans' hands.
Lenin did not have to cross battle lines. He was allowed through Germany and travelled on to Russia by way of Finland, where there was no fighting at the time.
Lenin was provided passage to return to Russia in 1917 by the German government, who saw him as a disruptive force that could weaken Russia's war effort during World War I.
Vladimir Lenin was not in Russia during the March 1917 Revolution. With the help of Germany he returned to Russia in April of 1917. At this time with the Czar no longer in power, Lenin announced that Russia was the freest of all the belligerent nations in World War One. The center Bolshevik newspaper, Pravda was now published openly.
If you mean during WW1, while the Provisional Government was in control of Russia, Lenin returned to Petrograd on the 16th April with the help of theGerman government (because the Germans figured that if the Bolsheviks were in power of Russia, they'd withdraw from the war and even if they failed to seize power, the turmoil in Russia could only help Germany's war aims).
The German government allowed Lenin to travel through Germany to Russia.
Russia's army would prepare to defeat Germany