SCCM 2012 - Package/Script to restart workstations,

Hi Experts,
Can you please assist me with creating a package/script that I can use in SCCM 2012 to restart my fleet of workstations on a schedule, the script itself is pretty straight forward, however when creating the application in SCCM, I need to setup a detection rule for this, and not sure what I will do around this, can you please advise of direct me to a article that details the exact steps please?
Craig PaulsenSenior Systems EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michael PfisterCommented:
Not sure if I understand your problem, but if you create an SCCM package, there is no detection rule. Detection rules are only required for SCCM applications.
So in case you tried to create an application, use a package instead. An application wouldn't help because you can't rerun it.
You package even doesn't need to contain source files since I'd recommend you run the locally installed shutdown.exe. So deploy  a command like

shutdown -r -t 0

When deploying it a second time, make sure to select "always rerun" in the deployment options.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Craig PaulsenSenior Systems EngineerAuthor Commented:
thanks mpfister, package is what I needed to create as opposed to an application...
Nagendra Pratap SinghDesktop Applications SpecialistCommented:
There are methods to create detection in batch files like

 if exist marker.fil then do this else do that.
Craig PaulsenSenior Systems EngineerAuthor Commented:
thanks Nagendra Pratap Singh, the detection rules I was referring to was specific to SCCM and application model I was led to believe I needed to create this reboot job in, since following MPFISTER advise, I've created a package which is restarting my dozen odd test machines daily, will productionize this once I've agreed to a schedule with the business,
thanks again for your input.
Craig PaulsenSenior Systems EngineerAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.