![](/img/trans.png)
[英]Why does Windows FORFILES with option /D -10 not find files last modified within last 10 days?
[英]How to find files added/deleted/modified within the last X days using powershell
我想知道是否可以创建一个类似于 InstallRite 的 powershell 命令?
http://installrite.software.informer.com/
在 InstallRite 中,您可以创建快照、安装应用程序,然后将当前环境与快照进行比较,以确定添加/删除/修改了哪些文件和注册表。
我打算将其用于取证,以便我可以轻松识别在过去 X 天内添加/删除/修改了哪些文件。
尝试这个:
$Nbdays=10
Get-ChildItem "c:\temp" -file |
where {$_.CreationTime.Date -le (Get-Date).AddDays(-$Nbdays).Date -or $_.LastWriteTime.Date -le (Get-Date).AddDays(-$Nbdays).Date}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.