Help Needed for PowerShell Script to Manage Computer Shutdowns

October 22, 2025 4 answers
Asked by 0.15 gram sample
I'm looking to create a PowerShell script that shuts down 800 computers in my company at 10:00 PM, 400 computers at 2:00 AM, and ensures that 100 specific computers never shut down. The list of computers that need to be shut down is provided in an Excel file located at O:StrategyUsers. It's important that this task is accomplished without using a task or program scheduler.

Answers

the other endpoint
What PowerShell code have you tried so far? Just a heads up, asking for complete scripts isn't really what this place is for. Maybe start with an AI model to help brainstorm ideas?

!15 bulbs planted: Could you send me a DM to help me out?

look both ways: Yeah, I'd love to see what you've got!

Reply to this answer
PLUMAGE.winter
Make sure to download the Excel module! It's fantastic for reading from and writing to Excel files, which will be super helpful for your script.
Reply to this answer
!field of rye
You might want to consider using a group policy for this instead of a script. Otherwise, you could just set up a 'for each' loop to shut down each machine indirectly.

_73 folding chairs: Setting a task on each machine to execute locally might be a better option.

Reply to this answer
grain-silo-roof
While PowerShell can technically handle this, it's not the most suitable tool for the job. Just sharing a thought, but can you show us your code? People here are generally willing to help if you have something to work with.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions