Clear CBS Logs (Powershell)
Product Name: Clear CBS Logs (Powershell)
Description : There is a recurring issue with Windows 2008 and 2012 VM's where the Windows Modules Installer has issues and the CBS.log file continues to grow and consumes all available HDD space.
The Procedure is built for 64 Bit OS's and will notify you if a 32 bit OS is encountered. Next the AP will stop and disable the Windows Modules Installer, delete all files from the Windows\Logs\CBS directory and enable - restart the Windows Modules Installer service. During testing I found that the TrustedInstaller Service can sometimes stall when stopping the service hence I also disabled it in the PS. Your preferred restart AP can be inserted directly after via statement to reboot the system then continue the deletion.
Import the Procedure via either the Import Center or through the Import Folder\Procedure option in the Agent Procedure Module. Once available the procedure can be scheduled directly or alternatively called within another procedure via the executeProcedure statement or from a monitoring space alert.
The background to the issue can be found here and the details on the remediation steps which I have transferred to an AP.