Configure the Restart Service remedial action for Microsoft Endpoint Configuration Manager for Investigation (MECM).
Before you begin
Role required: sn_cimaf.sn_cimaf_admin
Procedure
-
Open the Microsoft Endpoint Configuration Manager.
-
Create a MECM script with the name RestartService.
-
Provide the following code in the script block.
Param(
[Parameter(Mandatory=$True)]
[string]$service_name
)
Restart-Service -Force -Name $service_name -PassThru
-
Retrieve and copy the script GUID.
-
Open the MECM Action Configuration [sn_mecm_action_config] table.
The MECM Action Configuration table displays the list of action configurations.
-
From the list of configurations, select and edit Restart service using name.
-
In the Action input field, add the script GUID.
-
Click Save.