Iranian troops know how to fight, they will be leading the Shiite defense. ISIS may be battle hardened but they are not elite special forces, basically a band of desert cutthroats, even if experienced ones. Shiite will fight like Stalingrad, and will overwhelm with numbers of green recruits WWII Stalingrad style.
When was the last war Iran fought aside from terrorist stuff? Their mainline units haven’t fought in 3 decades.
Iran will bring in some Hezbollah fighters to train the Shiite militias.
From what I saw in Najaf and Karbala in 2004 the (Iranian) Mahdi are not very good fighters. Rather stupid with a high criminal element for motivation. The Sunni insurgents were far more proficient.