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

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.

[void][reflection.assembly]::Loadwithpartialname("Microsoft.SharePoint")

$spsite=[Microsoft.SharePoint.SPSite]("http://demoserver:8080")

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

share|improve this question
    
This seems to be something to do with double-hobbing..Ref:technet.microsoft.com/en-us/library/gg550867.aspx –  Karthikeyan Jun 30 '11 at 9:34
add comment

1 Answer 1

up vote 0 down vote accepted

First you need to enable PowerShell remoting: Enable-PSRemoting

You'll want to use these commands as well:

Get-Credential

Enable-WSManCredSSP

Invoke-Command

Here's a blog post that describes the steps.

share|improve this answer
    
great article, thank you. –  Karthikeyan Jul 3 '11 at 12:45
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.