I am trying to access the web-application that is hosted on the another SharePoint 2010 Farm using SharePoint 2010 Management Shell cmdlets but it is failing with the below error message

$spsite = Get-SPSite http://demoserver:8080<br/>
Get-SPSite : Cannot find an SPSite object with Id or Url: http://demoserver:8080.
At line:1 char:21
+ $spsite = Get-SPSite <<<<  http://demoserver:8080
    + CategoryInfo          : InvalidData: (Microsoft.Share...SPCmdletGetSite:SPCmdletGetSite) [Get-SPSite], SPCm
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletGetSite

same account is used as a FARM account in both the Farms.

Even, I tried with the below powershell script also failed.



Is that mean that we can't access the web-application hosted on another Farm?


First you need to enable PowerShell remoting: Enable-PSRemoting

You'll want to use these commands as well:




Here's a blog post that describes the steps.


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.