Step 1: Identify correct registry path and property
The registry path for script block logging is under HKLM\Software\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging with property EnableScriptBlockLogging.
Step 2: Match command syntax
Set-ItemProperty sets a registry value correctly. Set-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging' -Name 'EnableScriptBlockLogging' -Value 1 uses correct path, property, and value 1 to enable logging.
Final Answer:
Set-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging' -Name 'EnableScriptBlockLogging' -Value 1 -> Option D