Iis

如何使用 PowerShell 解析 IIS 日誌文件

  • December 27, 2018

我正在尋找有關如何解析 IIS 日誌文件的範例。我才剛剛開始,而不是搜尋站點,我想要關於範例站點、範常式式碼或一本好書的個人建議,以開始這條學習路徑。

使用LogParser會更容易嗎?

當我沒有可用的 logparser 時,我很幸運使用 Select-String,就像 http://mohundro.com/blog/2006/11/06/find-in-files-with-powershell/ 中的範例一樣-String 預設使用正則表達式,因此非常強大。

Get-ChildItem -Recurse -Include *.* | Select-String "text to search for"

我還使用了Powershell 的 WebAdministration Module 來為站點找到正確的日誌目錄。

引用自:https://serverfault.com/questions/119272