运行Veeam PowersShell脚本时服务器重新启动

时间:2020-03-03 14:25:13

标签: windows powershell veeam

我创建了以下脚本,该脚本的作用是杀死与职位名称相关的特定Veeam进程。问题在于,它必须首先找到作业ID,然后在进程说明中搜索该ID并将其杀死。但是我认为以某种方式造成了无限循环,在某些情况下,当我不得不多次运行它时(因为可能有多个与ID相关的进程),它将重新启动服务器。

if (int.MaxValue - 5) < intTemp ) // it means the value will go above int range if add 5
{
  // Make conversion to target type before the operation
}else{ 
  // the value will still be in int range
}

0 个答案:

没有答案