How to schedule PC shutdown via Intune


If your organisation isn’t already encouraging a more eco-conscious environment, this article might just be the first step in the right direction.

In this post, I’ll walk you through how to schedule PC shutdown via Intune by deploying a PowerShell script that creates a scheduled task on each device. The task will automatically shut down the PC at 10pm every Friday.

Realistically, most organisations roll out updates on a Friday after 5pm. This gives devices sufficient time to download and install updates before shutting down later that evening—reducing energy consumption and ensuring devices are not left on unnecessarily.

Before deploying across your entire estate, I highly recommend running this in a test environment. Once you're happy with the results, you can expand the rollout to all devices.


Benefits of Scheduled Shutdown:

  • Reduces power usage across your estate
  • Promotes greener, more sustainable working practices
  • Helps enforce consistent shutdown routines
  • Supports patch management hygiene
  • Reduces unnecessary wear on hardware


Prerequisites:

  • Microsoft 365 with Intune
  • Intune Administrator Role (at minimum)
  • Shutdown PowerShell Script


How to Schedule PC Shutdown via Intune



1. Obtain the PowerShell Script

First, get a copy of the shutdown script. You can either:

  • Download it directly from our GitHub repository, or
  • Copy the script from below and save it locally as a .ps1 file





2. Sign in to Microsoft Intune

  • Open the Intune Admin Portal
  • Sign in with your administrative account
  • Go to: DevicesManage DevicesScripts and Remediations
  • Select: Platform Scripts → +AddWindows 10 and later





4. Configure the Script Details

  • Give your script a meaningful name and description
  • (e.g. "Friday Shutdown Script" or "Weekly PC Power Down")
  • Click Next





5. Upload the PowerShell Script

  • Upload your .ps1 file
  • Adjust the following settings: 

    Run this script using the logged on credentials: No
  • Enforce script signature check: No
  • Run script in 64-bit PowerShell Host: Yes
  • Click Next

 



6. Assign the Script to Devices

To keep your deployment clean and organised, I recommend targeting via Security GroupsHow to Create Security Groups in Microsoft Entra ID?

  • Click Add Groups
  • Search for your existing device group
  • Tick the checkbox beside the group name
  • Press Select
  • Click Next





7. Review and Deploy

  • Review all your settings
  • If everything looks correct, click Create





What Happens Next?

There’s no further action required at this stage. Simply ensure the target devices are powered on and connected to the network.

Allow up to 24 hours for the script to propagate and deploy.

To check the status:

  • Open the script in Intune
  • Go to the Device Status tab to see which devices have completed the deployment
  • You can also manually check the Task Scheduler on any device to confirm that the scheduled shutdown task was created successfully





Final Thoughts

By following this process, you’re not only creating a more energy-efficient environment, you’re also learning how to schedule PC shutdown via Intune in a scalable, repeatable way.

Stay tuned for a follow-up article where I’ll walk through how to create and manage Security Groups in Intune, and how to assign devices to them effectively.

If you'd like help implementing this in your environment—or want tailored guidance, feel free to get in touch.