Verify if service is running, then stop it. Afterwards verify the status of the service (Windows Update).
if ($(Get-Service -DisplayName "Windows Update").Status -eq "Running") { (Get-Service -DisplayName "Windows Update").Stop() }
(Get-Service -DisplayName "Windows Update").Status
Note: Remember to run as Administrator …