|I have used sc.exe in the past via DOS.|
Which is really impressive, considering there never was a version of SC.EXE that was compatible with DOS. It's to be expected, though, because DOS was retired, like, 16 years ago. Wow, that's 3/4 of a score. I feel old.
I want to use Powershell to control services.
It depends on what you want to do. The relevant Cmdlets are:
PS C:\> Get-Help *Service
Name Category Synopsis
---- -------- --------
Get-Service Cmdlet Gets the services on a local or remote computer.
Stop-Service Cmdlet Stops one or more running services.
Start-Service Cmdlet Starts one or more stopped services.
Suspend-Service Cmdlet Suspends (pauses) one or more running services.
Resume-Service Cmdlet Resumes one or more suspended (paused) services.
Restart-Service Cmdlet Stops and then starts one or more services.
Set-Service Cmdlet Starts, stops, and suspends a service, and changes its properties.
New-Service Cmdlet Creates a new Windows service.
How To Ask Questions The Smart Way