Restore SharePoint managed accounts

Sometimes you get an error when you’re working with managed accounts or while creating a new SharePoint WebApplication:

The given key was not present in the dictionary

The easiest way to restore this:

Try to delete the managed account. If this does not work, then you’ll have a problematic managed account. First create a new managed account and move the service applicationts to the managed account you just created.

Then remove the problematic managed account. You can change a service account as follow:

$Farm = Get-SPFarm
$Service = $Farm.Services | where {$_.TypeName -eq “Microsoft SharePoint Foundation Web Application”}
$Password = Read-Host -Prompt “Please enter your password” -AsSecureString
$NewAppPool = New-Object Microsoft.SharePoint.Administration.SPApplicationPool($NewAppPoolName,$Service)
$NewAppPool.CurrentIdentityType = “SpecificUser”
$NewAppPool.Username = $NewAppPoolUserName
$NewAppPool.SetPassword($Password)
$NewAppPool.Provision()
$NewAppPool.Update($true)

When completed, change the service applications back.

Move SharePoint 2013 search temp folder

How to change SharePoint 2013 temp folder for search gatherer
Create a temp folder on a specific location. Example: D:\TempSearch
Log into sharepoint search server and open powershell as administrator
Run the following, where [GUID] is the guid of your search component, which you can find under the regedit location, “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0\Search\Components”

$newtemppath = “D:\TempSearch”

$GatheringManagerPath = “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0\Search\Global\Gathering Manager”

$AdminComponentPath = “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0\Search\Components\[GUID]”

$CrawlComponentPath = “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0\Search\Components\[GUID]-crawl-0”

Set-ItemProperty -Path $GatheringManagerPath -name DefaultApplicationsPath -Value $newtemppath

Set-ItemProperty -Path $AdminComponentPath -name LocalStoragePath -Value $newtemppath

Set-ItemProperty -Path $CrawlComponentPath -name LocalStoragePath -Value $newtemppath

Restart-Service OSearch15

Do this for all servers that use Search
Remove/Rename the original components at “C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server\Applications\{both admin and crawl components}”
Run a Full Crawl and you’re done!

Difference between site administrators, site collection administrators and site collection owners

I know.. it is confusing to understand the different permissions in SharePoint for admins and owners. below the permissions for each role:

Site Administrators

Can control site collection and subsites and can:

  • add and remove users
  • delete the site
  • add or delete subsites
  • change the settings
  • add, delete, edit content of site and subsites
  • send invitations

Continue reading “Difference between site administrators, site collection administrators and site collection owners”