0
我想从一个被称为有如下所示的函数中打破下面的循环。从函数退出循环
Function test {
$i++
IF ($i -eq 10) {continue}
}
$Computers = "13","12","11","10","9","8","7","6","5","4","3","2","1"
ForEach ($Computer in $Computers) {
Test
write-host "Fail"
}
什么是你想怎么办?如果你想中断,请使用'break'关键字,而不是'continue' :) –