none
Get-SPWebApplication RRS feed

  • Question

  • Get-SPWebApplication : Cannot access the local farm. Verify that the local farm is properly configured, currently avai

    lable, and that you have the appropriate permissions to access the database before trying again.

    At line:3 char:3

    +   Get-SPWebApplication "Enter webapplication name"| Get-SPSite -Limit ALL | Get- ...

    +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : InvalidData: (Microsoft.Share...tWebApplication:SpCmdletGetWebApplication) [Get-SPWebAp

       plication], SPCmdletException

        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SpCmdletGetWebApplication

    https://www.tree-felling-pretoria.co.za/
    Wednesday, May 29, 2019 11:56 AM

All replies

  • You must execute PowerShell command on SharePoint server (unless you have setup remoting)

    and make sure SharePoint Addins are there

    Set-ExecutionPolicy "Unrestricted" -confirm:$false -Force
    Add-PSSnapin Microsoft.SharePoint.PowerShell

    And check if have permissions to use PowerShell and add yourself with PowerShell

    Add-SPShellAdmin 

    check if all is working with 

    Get-SPFARM and make sure you can access SharePoint thru PowerShell


    Michael Wharton, Project MVP, MBA, PMP and a Great Guy <br/> Website http://www.WhartonComputer.com <br/> Blog http://MyProjectExpert.com contains my field notes and SQL queries

    Thursday, May 30, 2019 1:11 PM
    Moderator