File creation on GPO login script

I want to run a GPO Results on open and really want it to rewrite the file each time, but currently its just tring to write the file and gets an error.  I dont see the need to keep copies so what would be the best way to write that line?

gpresult /h \\server\Users\GPResults\%Username%.html
Jeremy PierceAGMAsked:
Who is Participating?
Add the /f switch to force overwrite. Also, I'd wrap the path\filename in quote to avoid potential SPACE character issues:
gpresult /f /h "\\server\Users\GPResults\%Username%.html"

Open in new window

Jeremy PierceAGMAuthor Commented:
Thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.