1

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.

1

1 Answer 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

Sign up to request clarification or add additional context in comments.

1 Comment

Hello, thank you for the assistance, I have just tested the PowerShell command and it seems even if the logging setting is set to disable, the enabled line within the command output is set to True at all times. I have also, restarted the IIS service to make sure the disable/enable setting is successfully enforced.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.