0
我正在尋找一些代碼來搜索日誌文件的註冊表內容。具體來說:事件日誌中的Powershell搜索註冊表內容
Get-ItemProperty -path hklm:\system\currentcontrolset\enum\usbstor\*\* | select PSChildName
會列出序列號。對於每個序列號,我需要能夠搜索文本日誌文件以查看該項目何時出現。
這裏是我使用的是什麼現在:
Get-ItemProperty -path hklm:\system\currentcontrolset\enum\usbstor\*\* | select PSChildName | foreach-object {Get-Content C:\Windows\inf\setupapi.dev.log | select-string '$_.PSChildName' -context 1}
但PSChildName
搜索不工作,我缺少什麼?
大,該訣竅 – Nik 2012-07-20 02:55:22
好樂於幫助,請你能標記爲answered.What解決方案將使用1或2 – justinf 2012-07-20 06:58:38