PowerShell: Logging should be enabled


Maintaining an audit trail of system activity logs can help identify configuration errors, troubleshoot service disruptions, and analyze compromises that have occurred, as well as detect attacks. Audit logs are necessary to provide a trail of evidence in case the system or network is compromised. Collecting this data is essential for analyzing the security of information assets and detecting signs of suspicious and unexpected behavior. Enabling PowerShell script block logging will record detailed information from the processing of PowerShell commands and scripts. This can provide additional detail when malware has run on a system.


Enabling PowerShell Transcription Logging:
More Information:


To fix this configure the policy value for Computer Configuration >> Administrative Templates >> Windows Components >> Windows PowerShell >> "Turn on PowerShell Script Block Logging" to "Enabled".

STIG: Server: https://www.stigviewer.com/stig/windows_server_2019/2020-06-15/finding/V-93175
Desktop: https://www.stigviewer.com/stig/windows_10/2017-02-21/finding/V-68819

For a quick fix, you can import this registry key from our GitHub repository