echo "======view 5000 point======";
$points=(netstat -ano | findstr 5000);
echo $points;

if($points.gettype().Name -eq "Object[]"){
    $points=$points.get(0);
}

echo "======kill 5000 point======";
$pids=-Split $points;
if($pids.length -gt 0) {
    taskkill /t /f /im $pids[$pids.length-1];
    echo "======kill success======";
}

echo "======create run bat file======";
$runscripts = "dotnet Hoa.Web.Host.dll --urls=http://*:8080";
$runscripts | Out-File "./run.bat";

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2022-02-07
  • 2022-01-19
相关资源
相似解决方案