You can get all the available web applications in a given sharepoint server by using the powershell cmdlet Get-SPWebApplication. Before proceed you need to run the following command to load SharePoint management cmdlets.
Add-PSSnapin Microsoft.SharePoint.PowerShell
The below powershell command list all the web applications in SharePoint Farm server.
Get-SPWebApplication | Select-Object -Property Name, Url, Status, @{n="Farm";e={$_.Farm.Name}}
You can export all the webapplications to csv file by using the powershell cmdlet Export-CSV.
Get-SPWebApplication | Select-Object -Property Name, Url, Status, @{n="Farm";e={$_.Farm.Name}} | Export-CSV "C:\All-WebApplications.csv" -NoTypeInformation -Encoding UTF8
Advertisement