How to iterate all the sites and their subsites with owner

Aug 28, 2014 at 1:10 PM
I want to get the hierarchy of a web application -
To iterate all the sites and their subsites with their owner's name

Thanks in advance.