# Windows

## **IIS Logs Location**

On a standard Windows Server, IIS log files are found at %SystemDrive%\inetpub\logs\LogFiles by default.

## How to Find IIS Log Files on IIS 7 and Later

1. Go to Windows Start and run “inetmgr”. Alternatively, you can go to Administrative Tools → Internet Information Services (IIS) Manager.<br>
2. Click on “Sites” in the left-hand tree menu to display a list of sites on the right of the screen. Note your site ID number, which is what IIS saves logs based on.<br>
3. Within the tree view or the grid view, double click on your site. Next, double-click the Logging icon for the logging settings screen to open.<br>
4. Find your IIS log files in the Directory field of the logging settings screen.<br>
5. Go to the IIS log files location in the directory field. Inside this folder, there are sub folders for each site configured with IIS. The naming pattern for the folders the logs are in is W3SVC1, W3SVC2, etc. The number at the end of the folder name corresponds to the site ID mentioned in step No. 2. Thus, W3SVC2 corresponds to site ID 2.

## How to Find IIS Log Files on Azure

Azure Cloud:

1. IIS log files are automatically saved in [Azure Cloud Services](https://azure.microsoft.com/en-us/services/cloud-services/).
2. Access log files by using the Remote Desktop to connect to a specific server. There, files are stored in a path similar to this one: C:\Resources\directory\\{some random guid}.{app name}.DiagnosticStore\LogFiles\Web\W3SVC{random number}

[Azure App Services](https://azure.microsoft.com/en-us/services/app-service/):

1. Ensure that web server logging is enabled.
2. Set web server logging to save to the file system.
3. The files are located under: D:\home\LogFiles\http\RawLogs via the KUDU console.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.iblue.team/log-files-1/windows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
