Solved

How to redirect script results to a computer name on the network.

Posted on 2008-06-26
6
151 Views
Last Modified: 2010-04-21
Hello,

Situation:
I have a batch file I'm running on a lot of computers at times when no users are logged on to the machines.  The computers are on a Server2003 domain.  The batch file collects information from the machine that it's ran on and redirects or pipes the information to a Log file saved on the local C: drive.  I need the Log file to be more accessible so I don't have to go to each individual machine.

Here is my script:

*********below*************

REM Create a new log file
set logname=C:\log %date:/=-% %time::=-%.txt
echo Log of Results > "%logname%"
echo ------------------------- >> "%logname%"
echo.  >> "%logname%"

*********above*************

The problem I am working to resolve:
I can't figure out how to set the Logname to be redirected to my personal PC, that I work from, instead of being saved on the local HDD of every machine its ran on.

Thanks for comments and ideas,
zbox
0
Comment
Question by:zbox
  • 3
  • 2
6 Comments
 
LVL 15

Accepted Solution

by:
sr75 earned 500 total points
ID: 21874358
send it to a share on your laptop.  


echo -------------------------->>  \\YourMachine\YourShare
0
 
LVL 25

Expert Comment

by:slam69
ID: 21874372
what happens if your machien is not on teh network when the script runs? it will bomb teh script out, far better to redircet to a network share
0
 

Author Comment

by:zbox
ID: 21874378
that's too funny.  i use that command all the time and didn't think of that.  let me see what happens, be right back.

zbox
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:zbox
ID: 21874912
man that worked! and as soon as you posted your comment I hit myself in the head.  well that was an easy 500 lol.  thanks a lot sr75 for quick response.  This stuff is real important to me.

Thanks EE,

zbox
0
 

Author Closing Comment

by:zbox
ID: 31470943
perfect and on time.
0
 
LVL 15

Expert Comment

by:sr75
ID: 21878562
No problem.   I have had many of those moments myself.  Thanks for the grade.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to dynamically set the form action using jQuery.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now