大佬们,请教个问题啊,关于windows powershell脚本的Get-ChildItem语句
问题补充:
在windows powershell窗口中运行下面的语句,出现数字长量无效:1
Get-ChildItem -Path $env:ProgramFiles -Recurse -Include *.exe | Where-Object -FilterScript {($_.LastWriteTime -gt "2005-10-01") -and ($_.Length -ge 1m) -and ($_.Length -le 10m)}
要怎么解决的啊
最佳答案
正确的写法是
Get-ChildItem -Path $env:ProgramFiles -Recurse -Include *.exe | Where-Object -FilterScript {($_.LastWriteTime -gt "2005-10-01") -and ($_.Length -ge 10240) -and ($_.Length -le 102400)}
网上直接抄的一般都是有错的
数值可以你调整 ,我的是10K(10240)~100K(102400)的
最佳答案由网友 whoami1978 提供
其他回答
暂无其它回答!