I have a SharePoint 2013 farm that I am running remote commands from a domain joined machine to the SP App server. One particular site collection does not return the same results as when running the commands locally in SP powershell.
I am running the following:
$Session = New-PSSession -ComputerName "app01.domain.local" -Authentication CredSSP -Credential $Cred Invoke-Command -Session $Session -ScriptBlock { Add-PSSnapin Microsoft.SharePoint.PowerShell } Invoke-Command -Session $Session -ScriptBlock {Get-SPSiteAdministration "https://test1.com"}
The results from Test1.com are (expected):
PSComputerName : app01.domain.localRunspaceId : 6b23de3e-e217-4d90-8e4b-f3a367f09f20
OwnerLoginName : i:0#.w|domain\test
OwnerEmail : test@test1.com
OwnerDisplayName : test@test1.com
SecondaryContactLoginName :
SecondaryContactEmail :
SecondaryContactDisplayName :
Url : https://test1.com
Title : Team Site
Description :
DiskUsed : 3164161
CurrentResourceUsage : 0
AverageResourceUsage : 0
ReadLocked : False
WriteLocked : False
ReadOnly : False
LockIssue :
Quota : Microsoft.SharePoint.Administration.SPQuota
SiteSubscription : SPSiteSubscription Id=50dcc2ed-3f9b-49d6-b3d0-c541efa7f125
UsersCount : 9
AdministrationSiteType : None
AllowSelfServiceUpgrade : True
InheritAllowSelfServiceUpgradeSetting : True
RootWebProvisioned : True
RootWebTemplate : STS
When I run the same command to test2.com I get (not expected):
PSComputerName : app01.domain.localRunspaceId : 6b23de3e-e217-4d90-8e4b-f3a367f09f20
CurrentResourceUsage : 0
AverageResourceUsage : 0
ReadLocked : True
Quota : Microsoft.SharePoint.Administration.SPQuota
SiteSubscription : SPSiteSubscription Id=50dcc2ed-3f9b-49d6-b3d0-c541efa7f125
AllowSelfServiceUpgrade : True
InheritAllowSelfServiceUpgradeSetting : True
As you can see I get partial results back when using remote powershell. I have tested from multiple machines and multiple accounts. Everything looks to be normal on the site collection side of things. One thing that I noticed is in the partial results it list the site collection as ReadLocked being True when its not and running the command locally shows False. Any ideas?
DJ Grijalva | MCITP: EMA 2007/2010 SPA 2010 | www.persistentcerebro.com