Powershell output file format RRS feed

  • Question

  • Hey guys,

    I'm running a script to get a list of all subsites under a site collection, and output that to a text file. Script below:

    Get-SpSite 'urltositecollection' | Get-SpWeb -Limit All | format-table > c:\sites.txt

    This works fine short of one problem: the longer URLs in the output are cut off like so:


    How do I get rid of the ellipses and get a full path? Thanks!

    Tuesday, March 27, 2012 3:38 PM


  • Hello there,

    Try Export-CSV

    Get-SpSite 'urltositecollection' | Get-SpWeb -Limit All | export-csv c:\sites.txt


    Tuesday, March 27, 2012 4:13 PM