When deploying a custom timer job in our UAT enviornment I came across the following error message:
Farm Config: SP2010 SP1, June 2011 CU
"The SPPersistedObject, CustomTimerJob Name=Sync User Details List, could not be updated because the current user is not a Farm Administrator."
Farm Config: SP2010 SP1, June 2011 CU
A few things that I checked:
- OWSTIMER service account"SVC_XXXXXXX" was in the "Farm Administrator's Group"
- Added the App Pool as the Farm Admin group (not sure if this the right way of doing it)
- Set the "RemoteAdministratorAccessDenied" to false
- Retracted the soltuion and redeployed it
Powershell command to set the RemoteAdministratorAccessDenied to False:
//PowerShell code
function Set-RemoteAdministratorAccessDenied-False()
{
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration") > $null
# get content web service
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
# turn off remote administration security
$contentService.RemoteAdministratorAccessDenied = $false
$contentService.Update()
}
Set-RemoteAdministratorAccessDenied-False
function Set-RemoteAdministratorAccessDenied-False()
{
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration") > $null
# get content web service
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
# turn off remote administration security
$contentService.RemoteAdministratorAccessDenied = $false
$contentService.Update()
}
Set-RemoteAdministratorAccessDenied-False
References:
No comments:
Post a Comment