Verify if service is stopped, then start it. Afterwards verify the status of the service (Windows Update)
1 2 |
if ($(Get-Service -DisplayName "Windows Update").Status -ne "Running") { (Get-Service -DisplayName "Windows Update").Start() } (Get-Service -DisplayName "Windows Update").Status |