SCCM 2012 R2 auto shutdown computer at specific time

wolf77
wolf77 used Ask the Experts™
on
i want to make the SCCM 2012 R2 shutdown computers that stay power on in the night, but i wat to have a report to view what computers stay power on or what computers shutdown whit the task of SCCM.

i test multiples 3 party options but i need to use SCCM for a corporate requeriment.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike TLeading Engineer

Commented:
Hi,

The simplest way is to create a PowerShell script and deploy that, so it creates a scheduled task. You have to decide if you want to brute force power off if the machine is logged on still, but other than that it's fairly straight-forward.

As far as I know there's no native way, using Power Management although that would be very nice!

For even more control you can use the script together Compliance (DCM) which offers reports of machines that do no comply, but otherwise you can use deployment reporting to monitor delivery of the script.

As far reporting which machines actually power off, I think that would be best done as another function in the script.

Mike

Author

Commented:
Thks, i cant find a way to shutdown a Computer  Power Management, but im going to try DCM
Leading Engineer
Commented:
Yes - I'm not sure why MS have no option using Power Management, but in the absence of that there's PowerShell as I said. The Stop-computer cmdlet is one option, as discussed here: https://blogs.technet.microsoft.com/heyscriptingguy/2011/04/01/scripting-wife-uses-powershell-to-shut-down-computers.
I know shutdown.exe exists but it's easy to abort it and is external.

I did find a script to do this but I can't see to find it again! Here's how to create a schedule task anyway:

schtasks /CREATE /TN Shutdown /RU "SYSTEM" /TR "Powershell \"C:\Scripts\Shutdown.ps1\"" /SC ONSTART

Mike
Mike TLeading Engineer

Commented:
There were no other answers and that is the only way that I know of; others require 3rd party tools which is not a good step if you can do something natively.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial