When I ran SharePoint2010 EasySetup, it failed with error: New-SPSite : Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that y ou have the appropriate permissions to access the database before trying again. At C:\SharePoint2010EasySetup\Labs\EasySetup\Source\SpEasy-PostInstall.ps1:132 char:11
The reason is that $wApp as follow is empty. How to fix this? any suggestion?
$hostName = "www.contoso.com"
$siteName = "Contoso"
$wApp = Get-SPWebApplication
# create new site
Append-SpEasyLog ("`tCreating site: " + $hostName)
New-SPSite ("http://" + $hostName) -OwnerAlias $curUser.Name -HostHeaderWebApplication $wApp.Url -Name "Contoso" -Template $siteTemplate | Out-Null
