http://blog.coretech.dk/kea/house-of-cardsthe-configmgr-software-update-point-and-wsus/
Increased the Private Memory Limit (KB) to 6291456 (6GB) on the WSUS Server
- Open IIS
- Select Application Pools
- Right click the WSUS app pool and select Advanced Settings
- Find the Private Memory Limit (KB) setting and adjust.
- Example: Your server has 8GB. You might want to provide a memory limit of 5GB on the WSUS App Pool.
- Open Powershell
- Type: 5GB / 1KB
- Copy the answer into the Private Memory Limit (KB) setting
- Right click the App Pool and select recycle
Ensure that the WSUS database is being indexed. See the foloowing post: https://emptygarden.info/2015/05/10/sql-maintenance-with-olas-script/
Create a new SQL Server Agent job to cleanup the WSUS server. This job will be a powershell script. So, we will need to create a SQL server credential to accomplish this.
- Create SQL Server Credntial
- Open SQL Server Management Studio
- Expand Security
- Right click on Credentials
- Enter in a credential that has rights to run the PowerShell command below
- Map the SQL Server Credential to a SQL Server Agent Proxy
- In SQL Server Management Studio expand SQL Server Agent
- Right click Proxies
- Select New Proxie
- use the credential you created above and map it to a PowerShell command
Create a new SQL Server Agent job that runs a PowerShell script using the above Proxie.
Enter the following as the PowerShell command
PowerShell.exe -command “invoke-command –computername [SCCM WSUS server] -scriptblock {Get-WsusServer | Invoke-WsusServerCleanup –CleanupObsoleteUpdates -CleanupUnneededContentFiles -CompressUpdates -DeclineExpiredUpdates -DeclineSupersededUpdates}”
Have the SQL Server Agent job save the results to a text file.
Runs Daily at 22:30