Forum Discussion
AB21805
Jan 12, 2023Bronze Contributor
How do I restart a service - via intune
Hi all,
The service wildsvc has stopped on some machines and I need it to be running so that I can make sure my update features are getting deployed to the devices.
Is there a way through intune even if I have to use powershell
Please help!
- RGijsbersRademakersIron ContributorHi A, Depending on your license, you could make use of proactive remediations. You can create a detection script which will check if the service is running. If that's not the case, the remediation script will kick in which starts the service. More info can be found here: https://learn.microsoft.com/en-us/mem/analytics/proactive-remediations If you don't have the required licences, you could create a custom powershell script which deploys a scheduled task that regularly checks the service and starts the service if it's stopped. Regards, Ruud
- AB21805Bronze ContributorHi, I do have the license, what would the scripts look like?
Thanks in advanced- RGijsbersRademakersIron ContributorA few examples can be found here: https://learn.microsoft.com/en-us/mem/analytics/powershell-scripts
In the try sections, you would put something like
$result = Get-Service wildsvc
If ( $result.status -eq stopped){
Write-Host "Match"
Exit 1}
Else {
Exit 0 }
The remediation script would then contain a Start-Service wildsvc
Regards,
Ruud