Stop File Server Service

Inside.Technologies.Detect.CryptoLocker.Monitor.Recovery (Recovery)

This task will stop these services:
Server: Manage file and printer sharing
DFS: Manage DFS Namespace
DFSR: Manage DFS Replica between other servers

Element properties:

TargetMicrosoft.Windows.Server.Computer
MonitorInside.Technologies.Detect.CryptoLocker.Monitor
Reset MonitorFalse
RemotableTrue
Timeout300
CategoryCustom
Enabledtrue
AccessibilityPublic

Member Modules:

ID Module Type TypeId RunAs 
Inside.Technologies.Detect.CryptoLocker.Monitor.Recovery.WriteAction WriteAction Microsoft.Windows.ScriptWriteAction Default

Source Code:

<Recovery ID="Inside.Technologies.Detect.CryptoLocker.Monitor.Recovery" Accessibility="Public" Enabled="true" Target="MicrosoftWindowsLibrary7585010!Microsoft.Windows.Server.Computer" Monitor="Inside.Technologies.Detect.CryptoLocker.Monitor" ResetMonitor="false" ExecuteOnState="Error" Remotable="true" Timeout="300">
<Category>Custom</Category>
<WriteAction ID="Inside.Technologies.Detect.CryptoLocker.Monitor.Recovery.WriteAction" TypeID="MicrosoftWindowsLibrary7585010!Microsoft.Windows.ScriptWriteAction">
<ScriptName>StopSvc.vbs</ScriptName>
<Arguments/>
<ScriptBody><Script>StopService "DFSR"
StopService "DFS"
StopService "LANMANSERVER"

Sub StopService(ServiceName)
strComputer = "."
Dim objWMIService, oService, oServiceItm
Set objWMIService = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\CIMV2")
Set colListOfServices = objWMIService.ExecQuery("Select * From Win32_Service WHERE Name = '" &amp; ServiceName &amp; "'")

For Each objService in colListOfServices
If objService.State &lt;&gt; "Stopped" Then
objService.StopService()
End If
Next
End Sub</Script></ScriptBody>
<TimeoutSeconds>60</TimeoutSeconds>
</WriteAction>
</Recovery>