troubleshooting Question

Identify Shutdown in the GPO Logoff script

Avatar of germano
germano asked on
Active DirectoryMicrosoft Server OSVB Script
18 Comments1 Solution945 ViewsLast Modified:
Hello everyone!

I want to run a script in the shutdown of the computer to copy some files from the user's My Documents that was logged in. So, I set the script in the GPO Computer Configuration Shutdown Script. The problem is that this script runs with machine account, so I can not identify which user is shutting down the computer (%username% is blank). Realizing this, I removed the script from Computer Configuration Shutdown and I put it on User Configuration Logoff Script. Now the problem is that the script is executed whenever the user logs off, restarts or shuts down the computer, and what I want is that the script run (copy the files from User's My Documents) only when the user turns off its computer. So how can I achieve this?

Thanks!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 18 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 18 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros