I'm trying to get a list of site collection URLs (SP 2010):

"http://is-sp2010portal:1234" | Get-SPSite -Limit ALL > "C:\Desktop\New folder\1.txt"

It works fine for short URLs, but there is problem with long - they are not returning properly (I got them shortened with "..."):

http://is-sp2010portal:1234/sites/English Courses an...   
http://is-sp2010portal:1234/sites/English Levels Ada...   

Is it possible to fix it? If not - will be gratefull for advising an alternative solution.


Try this:

"http://is-sp2010portal:1234" | Get-SPSite -Limit ALL | Format-Table -Wrap -AutoSize | Out-File -FilePath "C:\Desktop\New folder\1.txt"

it should make sure that the output is not truncated

  • No problem, please mark as answer :) – Robert Lindgren May 28 '13 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.