Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I set service recovery options?

1,619 views
Skip to first unread message

PaulChavez

unread,
Dec 1, 2009, 4:10:01 PM12/1/09
to

I'm trying to figure out how to set service recovery options using Powershell
V2.

I've explored the *-service cmdlets and the win32_service class but haven't
found out how to do it yet.

Anyone know how to do this?

Marco Shaw [MVP]

unread,
Dec 1, 2009, 10:32:32 PM12/1/09
to
Not sure you can...

http://technet.microsoft.com/en-us/library/ee156571.aspx

"Every managed resource class definition consists of properties, methods,
and qualifiers. This definition is applied to all instances of a class and
determines what can and cannot be done to an instance. For example, with
services you can specify actions that will be taken should the service fail
(restart the service, restart the computer, run a program, or take no
action). These recovery options are not specified anywhere with the class
definition. That means that they cannot be managed by using a script."

That being said, I'm assuming there's a Win32 API that can hook into this...

I'll try to find time to search.

Marco

"PaulChavez" <PaulC...@discussions.microsoft.com> wrote in message
news:E0596FD1-9005-46D5...@microsoft.com...

Karl Mitschke

unread,
Dec 2, 2009, 1:36:39 PM12/2/09
to

PaulChavez

unread,
Dec 2, 2009, 4:26:05 PM12/2/09
to
Thanks, guys. I didn't think to look in the registry.

"Karl Mitschke" wrote:

> .
>

til...@gmail.com

unread,
Oct 31, 2013, 3:00:42 PM10/31/13
to
Hi,

did a mini script and use SC.exe inside a powershell see here:
http://gallery.technet.microsoft.com/scriptcenter/Set-Windows-Service-via-899f89f3
0 new messages