Get all SiteCollections from a Web Application
Please use the below powershell script to get the list of sitecollections from a web application and store it in a text file. This will be run on Windows Powershell ISE Microsoft.SharePoint.PowerShell" Get - SPWebApplication http: //yourwebapp.com | Get-SPSite | Select ID, Url | Out-File -FilePath "D:\spSites.txt"