SharepointConfigCacheReset
1.19
https://www.sysadmin-diary.com/sharepoint-config-cache-reset/
Make sure to run the script with "-TestOnly" switch to test the script first without doing the actual reset.
The script performs the following main steps:
Searches for the configuration database GUID.
Searches for the config cache folder based on the Database
https://www.sysadmin-diary.com/sharepoint-config-cache-reset/
Make sure to run the script with "-TestOnly" switch to test the script first without doing the actual reset.
The script performs the following main steps:
Searches for the configuration database GUID.
Searches for the config cache folder based on the Database GUID.
Stops the timer service.
Removes XML files in the config cache folder.
Sets the cache.ini content to 1.
Starts the timer service.
By default each main step is executed on all servers before the script goes to the next step.
With "-ServerByServer" switch all main steps are executed on one server then another etc...
You can use "-ServerList" switch to run the script only on specific servers, not the whole farm.
Installation Options
Owners
Package Details
Author(s)
- jan.tkac.sk@gmail.com
Tags
Functions
Write-Section Load-SharePoint-Powershell Write-FarmInfo Test-RemoteWMIAccess Test-ConfigCacheFolders Check-Cache_iniContent Check-XMLFiles Stop-SPTimerService Start-SPTimerService Wait-TimerService Remove-XMLFiles Set-Cache_iniContent
Dependencies
This script has no dependencies.
Release Notes
1.0
Added foreach loop to to all funcions to be able to use it with multiple servers.
1.1
Added [string[]]$Servers parameter to be able to run the script for only one server.
Added Write-Section function to visibly separate sections using write-host commandlet.
1.2
Added [switch]TestOnly parameter to Start-SPTimerservice,Stop-SPTimerService,Remove-XMLFiles and Set-Cache_iniContnet functions.
1.4
Added [switch]$ServerByServer parameter to the script.
Changes in the main script block.
1.5
Added and removed some empty lines in the host output.
1.6
Added if($ServerByServer -and -not $TestOnly) condition.
1.7
Added Write-FarmInfo function.
1.8
Added a "-subsection" switch to the Write-Section function, removed Set-Content -Whatif line.
1.9
Added write-subsection lines, edite text of some write-host lines in (-not $TestOnly -and $ServerByServer) condition.
1.10
Script parameter "[string[]]$Servers" was changed to "$[string[]]$ServerList".
In each function "$Servers" was changed to "$ComputerList".
In each function "foreach ($Server in $Servers)" was changed to "foreach $(Computer in $ComputerList)".
Main script slock Was adusted according to the changes above.
Added Write-Host part in the Load-Sharepoint-Powershell function.
1.11
Edited PSSCriptInfo
1.12
Simplified versioning
1.13
Changed The color scheme
1.18
Metadata update
1.19
Added do-until with try-catch block in Check-Cache_iniContent. If the cache.ini file cannot be read, the script will wait.
FileList
- SharepointConfigCacheReset.nuspec
- SharepointConfigCacheReset.ps1
Version History
Version | Downloads | Last updated |
---|---|---|
1.19 (current version) | 18 | 6/23/2023 |
1.18 | 7 | 3/30/2023 |