'How To Check IIS Logging Status Via Command Line

Looking online, I have not seen any information on how to capture the status of the logging function on the IIS console and I was hoping to see if anyone knew how to do this via cmd/PowerShell? I am trying to see if the logging component is enabled/disabled via the command-line interface.



Solution 1:[1]

you could use the below PowerShell command to check the iis logging is enabled or not and other details:

Import-Module -Name WebAdministration

Get-ItemProperty -Path 'IIS:\Sites\Default Web Site' -Name logfile

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jalpa Panchal