Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to write some .bat files for GPO. I would like a way to see the output of the script to help debug problems. For the life of me I can't get it to log anything.

I have tried the following...

I created two batch files. The first had one line "call startup.bat > c:/startup.log", and the 2nd one was real startup.bat file. It didn't create the log file when I rebooted the computer the GPO was applied to. I did a "gpresult /z" which showed the policy being applied to the computer in question.

Then I delete the first batch file and change the policy to have the Parameters of " > c:\startup.log" still not working.

The startup.bat file is just some commands to generate some output. dir ipconfig /all

Never mind it seems to be working now. Not sure what I did to get it working. ???

share|improve this question
Could you show us what you've tried? – Chris McKeown Nov 21 '12 at 23:03
Can you show us the actual .bat files? – MDMarra Nov 26 '12 at 15:24

It sounds like the user is not an administrator and/or the CMD prompt is not running with elevated privileges. Try piping your output to a safer folder like so:

call startup.bat >%temp%\startup.log
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.