Cleanmgr.exe is not installed by default on Windows 2008 or 20008 R2, desktop experience installation is required or manual installation of the binary (language specific)
Cleanmgr.exe must run before defrag and sdelete
Cleanmgr.exe deletes the superseded updates during the boot process so BISF should reboot after cleanmgr.exe execution and resume after the netx logon
Create dedicated script for CCleaner with advanced options
•Add search folder option in AMDX
•Prepopulate ccleaner.ini file with the appropriate settings for silent execution
•Automatically download/suggest winapp2.ini for deeper cleaning (http://www.winapp2.com/downloads.html)
•Merges your custom entries from custom.ini into winapp2.ini.
•Automatically trims the entries from the full Winapp2.ini to ones relevant to your computer
Cleanmgr.exe is not installed by default on Windows 2008 or 20008 R2, desktop experience installation is required or manual installation of the binary (language specific)
https://www.lisenet.com/2014/disk-cleanup-on-windows-server-2008-without-installing-desktop-experience https://technet.microsoft.com/en-us/library/ff630161(WS.10).aspx https://support.appliedi.net/kb/a110/how-to-enable-the-disk-cleanup-tool-on-windows-server-2008-r2.aspx https://msdn.microsoft.com/en-us/windows/hardware/commercialize/manufacture/desktop/clean-up-the-winsxs-folder
Cleanmgr.exe KB2852386 (not included in Convenience Update rollup) must be installed in order to delete supersded updates on windows 7 and 2008 R2
https://support.microsoft.com/en-us/help/2852386/disk-cleanup-wizard-addon-lets-users-delete-outdated-windows-updates-on-windows-7-sp1-or-windows-server-2008-r2-sp1
Cleanmgr.exe must run before defrag and sdelete Cleanmgr.exe deletes the superseded updates during the boot process so BISF should reboot after cleanmgr.exe execution and resume after the netx logon
Check this PoSH script out for inspiration https://gallery.technet.microsoft.com/scriptcenter/CleanMgrexeKB2852386-83d7a1ae
Create dedicated script for CCleaner with advanced options •Add search folder option in AMDX •Prepopulate ccleaner.ini file with the appropriate settings for silent execution •Automatically download/suggest winapp2.ini for deeper cleaning (http://www.winapp2.com/downloads.html) •Merges your custom entries from custom.ini into winapp2.ini. •Automatically trims the entries from the full Winapp2.ini to ones relevant to your computer