Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: PowerShell - Restart Services

    If I can offer an improvement

    Function Restart-ServicesAndDependents {

    param(

    $ServiceName

    )

    $service = get-service -computer $Server $ServiceName

    Restart-Service -InputObject $service -Force -Confirm:$False -verbose

    # Get Dependent services - stop each of those

    $Dependents = $service.DependentServices

    ForEach ( $depService...

Viewing post 1 (of 1 total)