Both sets of answers are correct as well. Treating the ITB with foam rolling and flexibility is actually treating the symptoms. It will give you some relief (but in the case of most runners with ITB stuff, not much). You have to treat the cause which is a weak core and weak gluts. Planks are great, as well as anything done in a weight bearing position on the affected leg.
I would stay away from one leg squats. Think about it: You have a sore ITB and you're now going to put full weight on it while you lower yourself into flexion. Most friction of the ITB on the knee occurs at about 30 degrees or so of flexion. So you're going to put an inflammed tendon in the position that stresses it most and then contract your muscles and put all of your weight onto it? Its just going to inflame it more. Instead, try just standing on the affected side while not letting the pelvis on the other side droop. Trust me, stand there for a minute in good posture and you will feel that glut starting to fatigue.
Best exercises IMO are planks (front and side), plenty of hamstring strengthening and four way hip (straight leg raises in all 4 positions: flexion, extension, abduction and adduction all against gravity.
Someone mentioned stretching the adductors. Definitely do this as well. Most cases involve imbalances which in this case would be weak abductors (TFL and glut medius) and overpowering/tight adductors. Add in some adductor stretches.
Remember this though: It takes roughly 6 to 8 weaks to improve strength of a muscle by one "grade". That means that you most likely aren't going to do these exercises for 2 weeks and be suddently fit. Instead, you should feel like when you're doing them that you are getting more strong and stable standing on that affected side. At this point you should be able to start running lightly. I would start with 5 minutes and go from there. If you are truly correcting the problem, your knee should get better while you're increasing the mileage, not worse. If you corrected the problem, then the tissue just needs to keep healing, but you are no longer irritating it. Its a process, not something that improves in one week.