Windows Maintenance Script - Amendments

Hi,

Could the https://scripts.itarian.com/frontend…ws-maintenance script be amended to skip the defrag section if it is an SSD?

Also, could you add Edge and Opera to the browser section?

Hi @amcssit ,

We will forward this request to our Script Developers to possibly have these amendments included. We’ll also send you an email for any update or if we need more information to help you with this. Thank you.

Hi,

I had quite years ago posted on here https://forum.itarian.com/forum/script-library/11424-procedure-for-windows-maintenance an idea on how to let this script run in safemode+Networking+ITSM Agent service running and allow the script runs properly without leaving orphan files behind, so I think this could be implemented this way:

1- Create a Maintenance Mode on Company or computer(s) that are going to run this script.
2- Download all apps that are required to run on this script. (Create a temp file to log this task, OK or Error)
3- Set a flag on script to run in SafeMode+Networking. (Create a temp file to log this task, OK or Error)
4- Schedule a restart (while having the Safemode setting on) and let CHKDSK runs to check drive C: (This is really needed since it is not possbile to fix errors on disk properly while in use).
5- Let CHKDSK to finish its task and fixes issue. (Create a temp file to log this task, OK or Error)
6- Allow the computer boots up into SafeMode+NETWK+ITSM Agent Service running. (Create a temp file to log this task, OK or Error)
7- Run all the mentioned script this way: (Create a temp file to log this task, with details and error codes, 0=ok or 1=Error for ex.)

a- Clean all user’s temp folder files.
b- Clean Windows Temp Files.
c- Clean all browser history and Temp files from all users.
d- Disk Cleaning or CCleaner (Make sure to also clean all user’s Recycle Bin).
e- Run Registry Cleaner to optimize registry on Windows.
f- Run Defragmenting HDD.
g- Clear Printer Spool (Queuing Printer Jobs if available)
h- Clears DNS Cache (If needed)
i- Releases IP (If needed).
j- Performs S.M.A.R.T. Check (…and get results to a temp log file with details like actual bad sectors, Temp and HDD health)

8- Change setting in Windows Environment to restart computer in normal mode and log status.
9- Get temp log file and format it to ITSM comodo standards and then send it to Platform to be published on MSP user portal.
10- End script with success|warning|Error.

@axatech ,

Our Script Developers have explained Script Procedures cannot run in SafeMode+Networking. As soon as safemode initiates, script communication will be lost. Thus, it will continue after the restart. This is the current implementation on the EM Portal.

So these below tasks could not be combined in a single procedure.

3- Set a flag on script to run in SafeMode+Networking. (Create a temp file to log this task, OK or Error)

4- Schedule a restart (while having the Safemode setting on) and let CHKDSK runs to check drive C: (This is really needed since it is not possible to fix errors on disk properly while in use).

5- Let CHKDSK to finish its task and fixes issue. (Create a temp file to log this task, OK or Error)

6- Allow the computer boots up into SafeMode+NETWK+ITSM Agent Service running. (Create a temp file to log this task, OK or Error)

7- Run all the mentioned script this way: (Create a temp file to log this task, with details and error codes, 0=ok or 1=Error for ex.)

A Maintenance Window is a scheduled time-slot when your Endpoint Manager procedures will run. You can create them by adding a ‘Maintenance Window’ section to a Windows profile.

You have the option to pause all running monitors while the maintenance window runs, and to randomize task start times to avoid system congestion.