Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to? Logging Output from External Programs

I am evaluating Take Command for audit logging on a couple of servers where storage arrays are managed using commandline utilities.

Using the Log /A command, I get everything in the command window recorded to a text file except the output from these commandline utilities.

If I execute the commandline utility and add "| tee C:\test.txt" then I do get the output from the commandline utility on the screen and in the C:\test.txt file.

Unfortunately, it requires that the user add this to each command issued. Is there any way of turning this "tee" operation on permanently for all commands issued in the window?

Thanks!

-TimG
 
Rex:
Could the PRE_EXEC (or possibly the POST_EXEC) alias be used to force the output of every command to be redirected while the alias is active?
 
Unfortunately, it requires that the user add this to each command issued. Is there any way of turning this "tee" operation on permanently for all commands issued in the window?

If there aren't too many external commands, you could create an alias for each one....
 
Could someone give me an example for redirecting the output with PRE_EXEC? Thanks.
 

Similar threads

Back
Top