SharePoint Powershell management tools can be used to do lot of administrative task.
Type below command in SharePoint Powershell mangement. First command will check if the web application exists or not
1. Get-SPwebapplication http://sp.mycompany.com
2. In my case the web application doesn’t not exists.
3. Now check what the Application pool that exists Type Get-SPServiceApplicationPool.
Note: this will give name of the application pool that belongs to SharePoint only.
4. Now use the New-SPwebapplication command to create web application