Remote_Restart_Service.ps1
|
function Remote-RestartService { param ( [string]$ComputerName, [string]$ServiceName ) Restart-Service -Name $ServiceName -ComputerName $ComputerName Write-Host "Service $ServiceName on $ComputerName has been restarted." } |