We need to create two scripts:
First is discovery script, to check the status of a service, whether the service is running or not. If the service is running, then the computer is compliant; if not, then non-compliant.
The second is remediation script, to forcedly start the service if it's not running, and then make the computer complaint.
##Discovery Script
$servicename = 'your_service_name'
If ((Get-Service $servicename).Status -eq 'Running') {
Write-Host "Computer is compliant"
} Else {
Write-Host "Computer is noncompliant"
}
##Remediation Script
Get-Service -Name your_service_name | Start-Service
Then, in configuration item's setting type, we choose "Script", and add Discovery Script and Remediation Script. We can also use JScript and VBScript besides Powershell script. Go ahead to compliance rules, and fill in the compliance result you defined in script, in this case it's "omputer is compliant".
Go ahead to create Configuration Baseline, and deploy.