Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Windows Small Business Server > Script help needed

Reply
Thread Tools Display Modes

Script help needed

 
 
Adam S.
Guest
Posts: n/a

 
      11-22-2009
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?

TIA
--

Adam S.
 
Reply With Quote
 
 
 
 
Martin
Guest
Posts: n/a

 
      11-22-2009

"Adam S." <> wrote in message
news:...
> 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?
>
> TIA
> --
>
> Adam S.


something like:

copy d:\firewall\logs\pfirewall.log \\server\fwlogs\%COMPUTERNAME%.log



 
Reply With Quote
 
Adam S.
Guest
Posts: n/a

 
      11-23-2009
Martin wrote:
> "Adam S." <> wrote in message
> news:...
>> 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?
>>
>> TIA
>> --
>>
>> Adam S.

>
> something like:
>
> copy d:\firewall\logs\pfirewall.log \\server\fwlogs\%COMPUTERNAME%.log
>
>
>

That would actually name the script after the machine running the script.

--

Adam S.
 
Reply With Quote
 
Steve Foster
Guest
Posts: n/a

 
      11-23-2009
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script help needed Adam S. Windows Small Business Server 1 11-23-2009 09:54 PM
GP Logon Script works first time at second user logon Roland Schoen Active Directory 2 11-09-2009 12:19 PM
Trivial startup script won't run in Vista Jeff Vandervoort Windows Vista Administration 1 10-07-2008 08:23 PM
Vista Startup Script problem (loading registry hive issue) ejmichaud@hotmail.com Windows Vista Administration 5 03-11-2008 11:27 AM
Slipstream with an interview xml script jtpryan Windows Vista Installation 0 12-27-2007 05:22 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59