Remote shutdown servers in a LAB environment

I don’t want my Hyper-V server powered on all night, so this is my part to save our planet Smile

First of all I needed a service account, granted only the permissions needed.

Service account Name: svc-shutdown (enabled: password never expires)

Then, I created a Group Policy to grant this account shutdown permissions (locally and remote, probably only these remote permissions are needed) and to log on as a batch job.


After linking the GPO to the OU’s where needed, I created a Scheduled Task to run a batch file:


Let’s say run at 1AM:


And run this batch file:


The batch file does need some improvement, but that’s for later:

shutdown /m \\server1 /s /f

shutdown /m \\server3 /s /f

shutdown /m \\server242 /s /f

Windows 7 desktop wallpaper via GPO

My desktop wallpaper refused to load properly, I got a black desktop instead of the wallpaper-image I applied through group policy.


Here is my GPO:





After some reboots and gpupdates the double quote got my attention.

I like the Copy As Path feature from Windows 7 to copy the location of a file (driveletter:\directory\filename.ext). But Copy As Path puts the whole path between double quotes. I removed the quotes, rebooted and got my wallpaper applied! Pretty silly, but maybe I could help someone with this post.

Wallpaper applied successful:


BTW I also created a regkey WallPaper in the CurrentUser-hive (HKEY_CURRENT_USER\Control Panel\Desktop\WallPaper), got this info form the MS forums. But I’m not sure if the key needs to be created, will test this later.