0
使用Get-EventLog命令進行操作。前3個命令按預期工作。在AD中查找舊電腦不準確?
Get-EventLog Application -Newest 1000 | Select Message
Get-EventLog System -Newest 1000 | Select Message
Get-EventLog Security -Newest 1000 | Select Message
但這不起作用
Get-EventLog Setup -Newest 1000 | Select Message
,這不起作用
Get-EventLog setup
怎麼來的?在安裝程序中有WSUS錯誤,我們想要捕獲。
我想我找到了它:Get-WinEvent -FilterHashtable @ {logname ='setup'; id = 3} – mqh7
是的,'Get-EventLog'只能讀取經典事件日誌,不能在遠程機器上過濾它們。 'Get-WinEvent'是一個較新的cmdlet,它可以讀取所有事件日誌,並將結果通過網絡進行過濾。 – TessellatingHeckler