Although we typically think that the communists took power in Russia directly from the tsarist government, that is not true. There was a span of months in between the abdication of Tsar Nicholas II and the rise of the Bolsheviks to power. The Tsar abdicated his throne in March of 1917. The Bolsheviks did not take power until early November. In the intervening months, Russia was ruled by something called the provisional government. This government was supposed to hold power until the country could set up a permanent system to replace the monarchy.
With respect to World War I, the provisional government acted much like the monarchy had. The monarchy had been strongly behind the war, even as the war went badly and as public opposition to the war increased. The provisional government supported the war as well. It did so even in the face of massive public opposition. It even launched an offensive in the summer of 1917. By doing so, it sealed its fate. The offensive failed and its main effect was to weaken the provisional government and allow the Bolsheviks to come to power in November.
The stance of the provisional government toward the war, then, was one that supported the war in the face of public opposition.