Script Block Logging is a security feature in PowerShell. What is its main purpose?
Think about what logging means in general and how it applies to scripts.
Script Block Logging captures the actual code of script blocks as they run, helping admins see what commands were executed.
What is the expected effect after enabling Script Block Logging through Group Policy and running a PowerShell script?
Write-Output 'Hello World'Consider what logging means and where PowerShell logs events.
When Script Block Logging is enabled, PowerShell logs the executed script blocks in the event log but does not block script execution.
Which registry key and value correctly enable Script Block Logging on a Windows machine?
Look for the key under Policies and the correct value name and data.
The correct registry path is under Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging with the value EnableScriptBlockLogging set to 1 to enable it.
You enabled Script Block Logging via Group Policy, but no script block events appear in the event log. What is a likely cause?
Think about how Group Policy changes take effect on Windows.
Group Policy changes require a refresh or restart to apply. Without this, logging settings may not be active.
Script Block Logging can impact system performance. Which approach best reduces this impact while keeping useful logs?
Think about balancing security and performance in a real environment.
Limiting Script Block Logging to critical systems and filtering events reduces overhead while maintaining security visibility.