Bird
0
0

After enabling script block logging, no events are recorded in the Windows Event Viewer. What is a common reason for this?

medium📝 Troubleshoot Q6 of 15
PowerShell - Scripting Best Practices
After enabling script block logging, no events are recorded in the Windows Event Viewer. What is a common reason for this?
AThe PowerShell execution policy is set to Restricted, preventing script execution
BScript block logging only records errors, and no errors occurred
CThe Windows Event Log service is stopped or disabled
DThe system is running PowerShell version 2.0, which does not support script block logging
Step-by-Step Solution
Solution:
  1. Step 1: Confirm script block logging is enabled

    Assuming the registry or Group Policy setting is correctly configured.
  2. Step 2: Check Windows Event Log service status

    If the Event Log service is stopped or disabled, no events can be recorded or viewed.
  3. Step 3: Consider PowerShell version

    Script block logging requires PowerShell 5.0 or later; older versions do not support it.
  4. Final Answer:

    The Windows Event Log service is stopped or disabled -> Option C
  5. Quick Check:

    Event logs require the Event Log service running [OK]
Quick Trick: Event Log service must be running to record logs [OK]
Common Mistakes:
  • Assuming execution policy blocks logging
  • Believing logging only records errors
  • Ignoring PowerShell version requirements

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes