HI i wrote some script for stop and start for a single service .. #Change this values to suit your needs: $SvcName = 'Spooler' $SvrName = 'remotePC' #Initialize variables: [string]$WaitForIt = "" [string]$Verb = "" [string]$Result = "FAILED" $svc = (get-service -computername $SvrName -name $SvcName) Write-host "$SvcName on $SvrName is $($svc.status)" Switch ($svc.status) { 'Stopped' { Write-host "Starting $SvcName..." Write-host "$SvcName is started" $Verb = "start" $WaitForIt = 'Running' $svc.Start()} 'Running' { Write-host "Stopping $SvcName..." Write-host "$SvcName is stopped" $Verb = "stop" $WaitForIt = 'Stopped' $svc.Stop()} Default { Write-host "$SvcName is $($svc.status). Taking no action."} } this script is fine for stop/start for one windows servcie . but i want to start/stop multiple services at a time in one server . plz help some one
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)