This creates a new web application using PowerShell for SharePoint 2010 or SharePoint 2013. But wait! You are not yet done. You got to create the root site collection for the web application. If you try to browse to the web application without creating top-level site collection, you'll get "HTTP 404" error!