Tag Archive for remote

Shutting down PC’s remotely with Powershell

powershell

Hello. Let’s say you have a large sum of computers in your organization that are connected to a domain and some of those computers could be turned off for the night (library, computer class, etc.), because after using them not everyone turns them off and they are kept powered on through the night. That bothers me because ~50 computers are wasting energy! and so I came up with a powershell script that powers off the selected computers at a schedule, in my case I set it to run at 19:00 every day.
After letting it run for a couple of weeks, I think it seems to be working pretty well… You have to configure it though, by adding computer names with their full domain name and their MAC addresses in the array and that’s it. Log file is created at the location you specify (C:\ now) with computers that were shut down.
Script can be found in my project folder here.