Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SCCM 2012 R2 auto shutdown computer at specific time

Posted on 2016-09-01
4
Medium Priority
?
650 Views
Last Modified: 2016-09-26
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.
0
Comment
Question by:wolf77
  • 3
4 Comments
 
LVL 19

Expert Comment

by:Mike T
ID: 41781420
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
0
 

Author Comment

by:wolf77
ID: 41788613
Thks, i cant find a way to shutdown a Computer  Power Management, but im going to try DCM
0
 
LVL 19

Accepted Solution

by:
Mike T earned 2000 total points (awarded by participants)
ID: 41788683
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
0
 
LVL 19

Expert Comment

by:Mike T
ID: 41815717
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.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Resolve DNS query failed errors for Exchange
Determining the an SCCM package name from the Package ID
In this Micro Tutorial viewers will learn how they can get their files copied out from their unbootable system without need to use recovery services. As an example non-bootable Windows 2012R2 installation is used which has boot problems.
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question