Home Community Uploads
image

Cireson Partners, Customers and Community members share your customizations and examples here to help benefit the community as a whole to earn Kudos and badges.

DISCLAIMER

All files and projects located here are provided and come "as-is" and without any warranty or support. Use at your own risk. Your use of Community Uploads is subject to our Terms of Use.

Cireson does not and will not support or maintain these enhancements, extensions, and scripts.

For Team Cireson uploads click here.
Options

Full SCSM and Cireson Cache Flush PowerShell Script

Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
Though I share a Power Shell script that we have created for our new SCSM 2016 farm. Our 2012R2 farm we have all the scripts in separate files. This new script does a full cache clean for SCSM and the SMP. Update the arguments to your environments configuration. 
The script has logic is you are running a load balanced SMP solution. It will only start/stop the cache builder service on the server running the cache builder. It looks for the server where the cache builder is set to Automatic. Since in a NLB configuration only the cache builder server is Automatic while the remaining should be disabled. 

What the script does. 
Stops IIS an all SMP servers
Stops the SCSM Services on all Management servers
Stops the Cache Builder Service
Deletes the SCSM Cache on all Management servers
Renames the SMP CacheBuilder log
Renames the Webconsole log on all SMP servers
In the SMP Database Clears the WI and LastModified tables
Starts the SCSM Services
Starts the Cache Builder Service
Starts IIS

This script should only be run off business hours as it will kick all web and console users. Then takes a few minutes depending on your environment to repopulate the WI table. 

Make sure to run as an admin who has access to all the farm servers and the database.

To note we have this scheduled to run weekly off hours after the connectors complete to flush the system to start each new week. It also addresses the lack of WI grooming on the SMP database. 

Enjoy
Sign In or Register to comment.