Restart Service Verified
Restarts or starts a named service and verifies it reaches Running state.
Script Actions
Script Actions
Credibility
Last reviewed
Jul 8, 2026
Last tested
Jun 1, 2026
PowerShell
Windows PowerShell 5.1
Safety score
72/100
Documentation
100/100
Community rating
Coming soon
Downloads
Coming soon
Review status
approved
Verified by OperatorOS
Review
OperatorOS verified
Catalog
Official library
Safety
Static scan completed
Restart Service Verified is part of the official OperatorOS ScriptForge catalog. It has been reviewed for metadata completeness, safety scan results, PowerShell compatibility, and technician-facing documentation.
Script Body
# OperatorOS ScriptForge imported Xodus library script
# Workbook ref: SCR-018
# Title: Restart Service Verified
# Category: Endpoint Remediation
# Ready state: Ready
# Workbook risk: medium
# Body type: PowerShell / Command Block
pa
$OperatorOSFrameworkCandidates = @(
(Join-Path -Path $PSScriptRoot -ChildPath '..\..\..\framework\OperatorOS-ScriptFramework.psm1'),
(Join-Path -Path $PSScriptRoot -ChildPath '..\..\..\..\framework\OperatorOS-ScriptFramework.psm1')
)
$OperatorOSFrameworkPath = $OperatorOSFrameworkCandidates | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
if ($OperatorOSFrameworkPath) {
Import-Module $OperatorOSFrameworkPath -Force
}
$ErrorActionPreference = 'Stop'
ram(
[Parameter(Mandatory=$true)]
[string]$ServiceName
)
$svc = Get-Service -Name $ServiceName -ErrorAction Stop
if ($svc.Status -eq 'Running') {
Restart-Service -Name $ServiceName -Force -ErrorAction Stop
} else {
Start-Service -Name $ServiceName -ErrorAction Stop
}
Start-Sleep -Seconds 10
Get-Service -Name $ServiceName |
Select-Object Name,DisplayName,Status,StartType
Requirements
- Windows PowerShell 5.1 or newer for Windows Endpoint.
- Required tooling: PowerShell.
- Recommended run context: Elevated PowerShell/RMM.
Parameters
ServiceName
string / required
Workbook input carried forward from: $ServiceName
Examples
Run script
Runs the imported OperatorOS script after reviewing parameters and placeholders.
./endpoint-remediation-restart-service-verified.ps1Changelog
1.0.0 - Imported from Xodus / OperatorOS Script Library workbook with OperatorOS metadata, redaction notes, and framework bootstrap.