Adam S. wrote:
>Looking for help creating the following script:
>SBS 2003 network. I need to copy the firewall log from all workstations
>(71 total) on the network into on folder, and name the script the same
>name as the workstation it came from. All logs are under the
>D:\firewall\logs\. If possible, I also want to generate the result if a
>copy error occurred in tot he text file
>what is the best way to do it?
Something like this:
http://gallery.technet.microsoft.com...2-9cbd93cdb59b
Would let you step through all the computers in AD.
Calling a batch file to do the copy is simple:
strArgument = "CopyFirewallLog.cmd " & sOutputText
Set objShell = CreateObject("WScript.Shell")
objShell.Run strArgument
(this would go in the computer loop of the above script, though you'd
likely move the creation of the WScript.Shell object to outside the loop
for efficiency).
And here's a basic CopyFirewallLog.cmd:
@echo off
echo Copying pfirewall.log from machine %1
copy \\%1\d$\firewall\logs\pfirewall.log \\server\logs\%1.log
2>\\server\logs\%1.err
--
Steve Foster
------------
Please reply only to the newsgroups.
For SSL Certificates, Domains, etc, visit.:
https://netshop.virtual-isp.net