Last active
November 19, 2015 08:58
-
-
Save alantsai/c893e17a6e10755932e2 to your computer and use it in GitHub Desktop.
Get iis website log location using powershell
快速取得某一個iis 站台的log位置
From http://stackoverflow.com/questions/6426375/where-can-i-find-the-iis-logs
#powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 把{yoursite}換成iis站台名稱 | |
# 把log位置顯示在 powershell | |
Get-Website {yoursite} | % { Join-Path ($_.logFile.Directory -replace '%SystemDrive%', $env:SystemDrive) "W3SVC$($_.id)" } | |
# 用explorer開啟log資料夾 | |
Get-Website {yoursite} | % { Join-Path ($_.logFile.Directory -replace '%SystemDrive%', $env:SystemDrive) "W3SVC$($_.id)" } | ii |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment