PowerShell – Automate Cleanmgr.exe

/sagerun:1 ‘ Active Setup Temp Folders ‘ Content Indexer Cleaner ‘ Downloaded Program Files ‘ GameNewsFiles ‘ GameStatisticsFiles ‘ GameUpdateFiles ‘ Internet Cache Files ‘ Memory Dump Files ‘ Microsoft Office Temp Files ‘ Offline Pages Files ‘ Old ChkDsk Files ‘ Previous Installations ‘ Recycle Bin ‘ Service Pack Cleanup ‘ Setup Log Files Read More …

Batch – Return Major Build Version

Command Line FOR /f “tokens=1,2,3,4 delims=[.]” %a IN (‘ver’) DO ECHO %d In Script FOR /f “tokens=1,2,3,4 delims=[.]” %%a IN (‘ver’) DO SET wBuild=%%d ECHO %wBuild%   Notes for if %wBuild% LSS 19041 exit if %wBuild% LEQ 18362 exit if %wBuild% EQU 18362 exit :: 1903 if %wBuild% EQU 17763 exit :: 1809 if %wBuild% Read More …