title: Get-SPContentDatabase export to CSV and include web application url
body: <p>I'm trying to get a powershell one liner to export the information of all my SharePoint content databases into a CSV file that could then be used as the input for a mounting script.</p>
  
  <p>If i run:</p>
  
  <p><code>Get-SPContentDatabase | Select Name, DatabaseServer, MaximumSiteCount, WarningSiteCount | Export-CSV DatabaseExport.CSV</code></p>
  
  <p>I get most of the information I need but I can't get the Web Application url. The WebApplication exports as "SPWebApplication Name=<em>webappname</em>", where I need the url or ID.</p>
  
  <p>I'm thinking I will need to come up with it in a script, that will add loop through and add the url to the exported CSV... but it would be nice to have this in a one liner.</p>