Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have properties in my SharePoint web application, and I'd like to save them to text file. After calling $webApplication.Properties, I can see something like this:

Name                           Value
----                           -----
SchoolSiteUrlFormat            https://www.blablablablablablabl/sites/{school}
ApplicationDatabaseListsLoc... https://blablablablablablablabla/sites/zasobys...

How can I direct output from that command to file, where item name and value wouldn't contain those "..." at the and full value would be saved?

share|improve this question

Try piping your output to Out-File with the Width parameter specified.

Do-Command | Out-File -width 300 -filepath "C:\temp\myoutput.log"

If not that, you could try piping it to Format-List and then Out-File.

share|improve this answer

I would export it as a comma separated text file (csv). If you need to see it nicely formatted, you can then use a spreadsheet reading program (e.g. excel).

Since the property looks like it is a dictionary, you would use the GetEnumerator() member function to extract the values and pipe it to the Export-Csv commandlet. Something like this:

$webApplication.Properties.GetEnumerator() | select name,value | export-csv -path "properties.csv" -NoTypeInformation
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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