I am looking for help on how to automate the process of checking the contents of certain directories on all machines on my network.
I have tried doing this with a bat file but know that with VB script I have many more options, I just need to be pointed in the the right direction.
Lets start with an example of what I would like to try to do. I have 3 computers all on the same domain, I am using Machine 1 and want to check these certain directory on Machine 2 and Machine 3. I am logged into Machine 1 as a Domain Admin so I would have access to Machines 2 and 3. Understood that a firewall might be active to prevent access on 2 and 3.
I want to capture the list (dir) of "c:\windows\a\" and "c:\windows\b\" with logic to check for "winnt" if that exists instead of windows.
Currently, if I use the dos command "dir \\machine2\c$\windows\a \\machine2\c$\windows\b \\machine3\c$\windows\a > c:\capture.csv" I get what I want.
1) If a machine3 has a firewall it stops and I get nothing in my file. Would like the script to keep running and give a message of "not able to access"
2) For a whole network of machines my command gets too long.
3) I have to type in every machine, would be much easier to import a machine list or have them querried.
4) I need to specify the windows vs winnt directory, would like to have it check first and use the correct directory.
Why? I had a malware outbreak and am pretty sure I have things cleaned up. My virus scanners don't pickup all of the exe files as "bad" so if I could run a script that automates the above I could just check my csv, or txt dump and would know what work I have left to do if any.
I have written basic scripts to install programs through login.bat but would like to grow a bit and try building a tool rather than going the manual route.
Any help / pointers / links to get me moving in the right direction would be appreciated.
Thanks in Advance