无论我在第一个问题上输入什么值(例如wmic),它总是会进入do loop。当进入时,比方说在第二次通过时,它会根据需要打破do。无效的条目使我一直处于循环中,直到我输入正确的条目。$query_means = read-host 'Enter one of psinfo, powershell or wmic'
if ($query_means -ne "wmic" -OR $query_means -ne "psinfo"
我在PowerShell脚本中使用多个是/否问题时遇到问题。我知道有人已经解决了这个问题,或者答案就在我面前,而我没有看到。这是我到目前为止所拥有的。$msg = 'Do you want display AD group memberships?$sid | select name | Format-Table -AutoSize until ($response -eq 'n')
$adunlock = 'Do you want[Y
您好,我想在变量上使用group by创建一个累积和,但我想将它嵌套在dountil循环中。但是我不能得到正确的sum值。我希望将调用次数从1递增到8(最大值),直到满足"dountil“中的条件。基本上,我想知道添加的呼叫总数(累积),然后将其与条件进行比较SET UNDER_1; DO i = 1 TO 8 UNTIL (CUMM >
我试图使用PowerShell来检查用户提供的位置号是否存在。我想循环这个,直到用户提供一个有效的位置。我对PowerShell很陌生,我不明白为什么它不起作用.#Start Store and Check Budget Position Number User Template#Try{
# Find the user templateFailed to find position number " + $budgetpositionnumber) -ForegroundColor Red
我想要执行powershell内联,但当我试图执行所有。我得到了Out-Null : A positional parameter cannot be found that accepts argument 'do'.{ }$WScript.SendKeys($OutputString) powershell -