chkdsk script for servers

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
jarmar
Posts: 19
Joined: Thu Nov 15, 2007 1:01 am

chkdsk script for servers

Post by jarmar » Fri Nov 30, 2007 7:59 am

Hello. I am back for some more help. I have tried to use the chkdsk script that you have in the scriptvault but it errors everytime on line 36 char 5 which is

for /F "eol= tokens=1 delims=( " %%i in (DrvLtr.txt) do set DrvLtr=%%i & call :dsKchk

If this is able to be fixed is there a way to add a function to allow me to schedule this to multiple servers. just the same as the help you gave me on the central event log backups that is working great after all of your help?

thanks in advance.
jarred

User avatar
jarmar
Posts: 19
Joined: Thu Nov 15, 2007 1:01 am

chkdsk script for servers

Post by jarmar » Fri Nov 30, 2007 7:59 am

Hello. I am back for some more help. I have tried to use the chkdsk script that you have in the scriptvault but it errors everytime on line 36 char 5 which is

for /F "eol= tokens=1 delims=( " %%i in (DrvLtr.txt) do set DrvLtr=%%i & call :dsKchk

If this is able to be fixed is there a way to add a function to allow me to schedule this to multiple servers. just the same as the help you gave me on the central event log backups that is working great after all of your help?

thanks in advance.
jarred

User avatar
jarmar
Posts: 19
Joined: Thu Nov 15, 2007 1:01 am

chkdsk script for servers

Post by jarmar » Fri Nov 30, 2007 8:16 am

can i also add in that it does it to all local disks? thanks

User avatar
jvierra
Posts: 13717
Joined: Tue May 22, 2007 9:57 am
Contact:

chkdsk script for servers

Post by jvierra » Mon Dec 03, 2007 3:40 am

It is far easier to just create a single BAT file for each server with teh ChkDsk commands. Remember that volumes with open files will cause you to have to do a restart to get the chkdsk to run. Each server will end up having it's own particular set of rules. Some volumes will not require a restart if they can be checked out-of-hours as teh "F" option should force all files to be closed. Most programs will allow this without complaint but you will need to test it to be sure. If you choose this path then use task scheduler to schedule a single "chkdsk" command for each volume with the necessary switches. Drive that need restarting can be scheduled at any time and then schedule the restart as a separate task after setting the chkdsk scan on boot flag.


Jeff suggestion to use PowerShell is best if you need to do anything that is more sophisticated as PoSH makes this all much easier. jvierra2007-12-03 10:43:27

User avatar
jarmar
Posts: 19
Joined: Thu Nov 15, 2007 1:01 am

chkdsk script for servers

Post by jarmar » Mon Dec 03, 2007 3:54 am

Thank you for the advice. I appreciate it and will look into it.

Locked