| 多谢分享 |
| 谢谢提示,学习到了 |
|
多谢楼主分享 |
| 学习了 |
| 牛的 这一系列的软件非常强 |
| 先收藏,有时间细看。 |
| 学习学习 |
| 感谢分享,已收藏 |
| 先收藏,有时间细看。 |
| 谢谢分享 |
| 多谢楼主分享 |
|
进来认真学习一下 |
| 赞一个! |
| 技术贴寥寥无几的回帖 |
| 不论怎么样,还是谢谢楼主分享的 |
| 精彩呈现 |
| 感谢楼主提供方法 |
| 谢谢楼主,学习了。 |
| 谢谢大神的分享 |
| 确实比较耗时,需要精心研究啊 |
| 收藏 |
sairen139 发表于 2020-3-6 19:52 我是Win7系统,用的很不错 |
nc4485 发表于 2020-3-6 19:26 请问你是用win7系统还是win10系统来完成精简的? |
| 今天有空,试了一下,非常完美,就是麻烦点,是要把所有要用的地方最好点一下,不然功能会有缺失 |
|
#过滤.PS1 #当前盘符过滤 $env:SystemDrive $tempfile="boot.csv" Import-Csv $tempfile -Delimiter "," | Select "Extension" | Export-Csv WmiData.csv -Delimiter "," -Encoding UTF8 -notypeinfo $line=Get-Content -Path .\WmiData.csv $line=$line.Replace('"',"") $line| set-content WmiData.csv Start-Sleep -Milliseconds 200 $去重=Get-Content "WmiData.csv" #$去重=$去重 -replace(".$","") #$去重=$去重 -replace("^.","") $去重=$去重| Select-String -Pattern "[.]" $去重=$去重| Select-String -Pattern "$env:SystemDrive\\" $去重=$去重| Select-String -Pattern ("^.:\\Program Files\\Common Files","^.:\\Program Files (x86)\\Common Files","^.:\\Program Files (x86)\\Windows Photo Viewer","^.:\\Program Files\\Windows Photo Viewer","^.:\\W")#正则包括列表 #正则排除列表 $去重=$去重| Select-String -Pattern ("\*","^.:\\Windows\\TEMP","^.:\\Windows\\Prefetch","^.:\\Windows\\System32\\config","^.:\\Windows\\assembly","^.:\\Windows\\WinSxS","^.:\\Windows\\Installer","^.:\\Windows\\System32\\DRIVERSTORE","^.:\\Windows\\SysWOW64\\zh-CN","^.:\\Windows\\System32\\zh-CN","^.:\\Windows\\SOFTWAREDISTRIBUTION","\\Microsoft.NET","\\CSC\\","\\SystemApps\\","\\Logs\\","\\LogFiles\\") -NotMatch #$去重=$去重| Select-String -Pattern (Get-Content .\Include.ini)#正则包括列表 #$去重=$去重| Select-String -Pattern (Get-Content .\Exclude.ini) -NotMatch #正则排除列表 $去重 | Set-Content "处理完成.txt" -encoding utf8 CMD /C "del WmiData.csv" |
| 好的技术文章,不过要花大量的精力 |
sairen139 发表于 2019-9-21 22:26 求成品 |
| 热心回复:):):) |
| 這個技巧, 配合正式版的授權證書, 正好可以用來破解預覽版的時間炸彈. |
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.