powershell新手在这里。我正在尝试从当前脚本中调用另一个脚本,但是'$ _'从未通过它。
invoke-expression "$cleanScript -pattern $ageDir -days2keep $ageDays | ? {$_.keep -eq $false}"
keep : The term '.keep' is not recognized as the name of
At line:1 char:112
+ ... :\backup\archive\*.zip -days2keep 14
+
+ CategoryInfo : ObjectNotFound: (.keep:Strin
+ FullyQualifiedErrorId : CommandNotFoundException
有什么主意要怎么做吗?