In 1917, after enduring a harsh winter, the 17th Battalion was involved in most of the major battles as the German Army shortened their lines and withdrew back towards the Hindenburg Line, seeing action at Bullecourt in May, Menin Road in September and Poelcappelle in October. At Lagnicourt, on 15 April, the 17th took part in a defensive action along with four other battalions from the 5th Brigade, defeating a counter-attack by a numerically superior German force, and recapturing the village that had been lost along with a number of guns that the German force had taken off the Australians earlier. In early 1918, the battalion was involved in repelling the German Spring Offensive, undertaking defensive actions in the Somme Valley, before taking part in the final Allied offensive that eventually brought about an end to the war. During this time they were involved in the battles at Amiens and Mont St Quentin in August, before participating in the attack on the "Beaurevoir Line" at Montbrehain in October. This would be the battalion's last contribution to the war, as it was out of the line reorganising when the Armistice was declared in November 1918. It was disbanded in April 1919, whilst at Montigny-le-Tilluel, Belgium, when most of its personnel were transferred to the 20th Battalion.