param ( [string]$computer ) $services = Get-Service -Computer $Computer| Where-Object { $_.Starttype -like "Automatic*" -and $_.status -notlike "Running" } |select name, starttype, status if ($services) { foreach ( $service in $services){ get-service -computername $computer -name $service.name | start-service write-host "Starting service:" $service.name "on Computer:" $computer -ForegroundColor green } } else { write-host "No services to start" -ForegroundColor yellow }
Powershell: Start all services with startuptype: Automatic on remote server
Reply