Skip to content

Instantly share code, notes, and snippets.

@alantsai
Last active November 19, 2015 08:58
Show Gist options
  • Save alantsai/c893e17a6e10755932e2 to your computer and use it in GitHub Desktop.
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
# 把{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