Sure here it is:
Code:
Dim objFSO, ObjTextFile
Dim CurLine, arrCurRecord
Dim strCompName
Dim WshShell
on error resume next
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("d:\shutdown\complist.csv", 1)
While objTextFile.atendofstream <> True 'Keep going until the end of the file
CurLine=objTextFile.readline 'Read the current line
arrCurRecord=split(CurLine,",") 'Split the line into records at every ","
strCompName=arrCurRecord(0)
'send shutdown command
wshShell.run "c:\windows\system32\shutdown.exe -s -f -m \\" & strCompName
Wend 'do while objTextFile.atendofstream <> true
'clean up
Set objTextFile = Nothing
Set objFSO = Nothing
Set WshShell = Nothing Ok having looked at my current one, i decided to make a few changes and this is what it looks like now. The csv file only contains a list of computer names but you could have other info in there if you wish so long as the first column is the computer name this should still work.