Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer 1

  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)
share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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