# Sharepoint 2010 Remote Admin

**URL:** <https://forums.powershell.org/t/sharepoint-2010-remote-admin/2820>\
**Category:** PowerShell Help\
**Created:** [July 14, 2014, 7:37am UTC](https://forums.powershell.org/t/sharepoint-2010-remote-admin/2820 "2014-07-14T07:37:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim-evans](https://avatars.discourse-cdn.com/v4/letter/t/779978/32.png) [@tim-evans](https://forums.powershell.org/u/tim-evans)\
**Post date:** [July 14, 2014, 7:37am UTC](https://forums.powershell.org/t/sharepoint-2010-remote-admin/2820/1 "2014-07-14T07:37:39Z")

</div>

This may be a sharepoint problem, but it seems like a powershell issue so I’m starting here.

I want to use powershell to administer a remote sharepoint 2010 server running on Windows Server 2008R2 (WMF2.0) from my Windows 7 workstation (WMF3.0). If I run these commands on my workstation:

```
$s = New-PSSession servername.domain.com
Invoke-Command –Session $s –ScriptBlock {Add-PSSnapin Microsoft.SharePoint.PowerShell}
Import-PSSession $s -CommandName Get-SP*
get-spsite -identity "http://projects.domain.com/sites/b01411"
```

I get the error:

```
Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have
 the appropriate permissions to access the database before trying again.
```

If I log on to the server using RDP and the same user account, start the Sharepoin Management Shell and run the same get-spsite command, it works just fine. Does anyone have any idea what I’m doing wrong?

Thanks

---

<div class="post-metadata">

**Author:** ![daniel-krebs](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/daniel-krebs/32/484_2.png) [@daniel-krebs](https://forums.powershell.org/u/daniel-krebs)\
**Post date:** [July 15, 2014, 6:11pm UTC](https://forums.powershell.org/t/sharepoint-2010-remote-admin/2820/2 "2014-07-15T18:11:38Z")

</div>

Hello Tim,

I think you’re experiencing a double/second-hop problem. You’re credentials are not being delegated to a remote server like SQL while using the SharePoint cmdlet. You’ll need to look into enabling Kerberos delegation to get this to work in a secure manner. If you search for SharePoint and double-hop you’ll get a lot articles recommending to enable CredSSP but please don’t follow that advise because you’re sacrificing security for convenience. Learn how to get credential delegation via Kerberos working and you’ll have learned something for future jobs or assignments.

I hope below article will get you started. Depending on your rights in Active Directory you might need a Domain Admin to setup Kerberos delegation for you.

[http://dna-tech.blogspot.co.uk/2013/07/remote-powershell-with-sharepoint-2010.html](http://dna-tech.blogspot.co.uk/2013/07/remote-powershell-with-sharepoint-2010.html)

Regards,  
Daniel

---

<div class="post-metadata">

**Author:** ![daniel-krebs](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/daniel-krebs/32/484_2.png) [@daniel-krebs](https://forums.powershell.org/u/daniel-krebs)\
**Post date:** [July 15, 2014, 6:13pm UTC](https://forums.powershell.org/t/sharepoint-2010-remote-admin/2820/3 "2014-07-15T18:13:20Z")

</div>

One more article which might help:  
[http://preview.tinyurl.com/o7klsas](http://preview.tinyurl.com/o7klsas)

---

<div class="post-metadata">

**Author:** ![tim-evans](https://avatars.discourse-cdn.com/v4/letter/t/779978/32.png) [@tim-evans](https://forums.powershell.org/u/tim-evans)\
**Post date:** [July 16, 2014, 4:38am UTC](https://forums.powershell.org/t/sharepoint-2010-remote-admin/2820/4 "2014-07-16T04:38:51Z")

</div>

Thank for the response. I will check out those links. I’m curious why you think it is a double hop problem. I am remoting directly into the SharePoint server. Is the second hop the database server?

---

<div class="post-metadata">

**Author:** ![daniel-krebs](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/daniel-krebs/32/484_2.png) [@daniel-krebs](https://forums.powershell.org/u/daniel-krebs)\
**Post date:** [July 16, 2014, 5:27am UTC](https://forums.powershell.org/t/sharepoint-2010-remote-admin/2820/5 "2014-07-16T05:27:22Z")

</div>

The second hop could be your database server. I don’t know your environment of course.

---

<div class="post-metadata">

**Author:** ![tim-evans](https://avatars.discourse-cdn.com/v4/letter/t/779978/32.png) [@tim-evans](https://forums.powershell.org/u/tim-evans)\
**Post date:** [July 28, 2014, 3:05pm UTC](https://forums.powershell.org/t/sharepoint-2010-remote-admin/2820/6 "2014-07-28T15:05:21Z")

</div>

Thanks for the input. I’ve confirmed that I’m getting logged in with Kerberos credentials and that the SharePoint server is authorized for delegation. It seems the PowerShell part is right. I’ll look into the SharePoint side of things.

…Tim

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:47pm UTC](https://forums.powershell.org/t/sharepoint-2010-remote-admin/2820/7 "2024-05-16T20:47:42Z")

</div>


