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

  1. Are you running the PowerShell commands elevated (run as administrator)?
  2. Do you have enough permissions to create the site collection? (farm admin or user with appropriate permissions, see Add-SPShellAdmin)
  • Yes, the current user is in local admin group. – PerlDev Jan 28 '11 at 14:11
  • When starting SP management shell cmdlet, I got the warning: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered. – PerlDev Jan 29 '11 at 21:44
  • Somehow easy setup couldn't create SharePoint Configuration/Content databases. After manually created them, easy setup runs without any issue. – PerlDev Feb 14 '11 at 4:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.