Enable Logging

Glenn Maxwell 10,551 Reputation points
2024-05-20T19:38:43.1033333+00:00

Hi All

I have a requirement to enable PowerShell/WinRM/WMI logging on my servers. I will enable this through the GPOs listed below. The requirement is that I need to generate event IDs or logs to show management that I have configured the GPO properly. Please guide me on how I can generate events or logs by executing specific PowerShell commands.

1.  To enable PowerShell Module Logging
    Computer Configuration > Administrative Templates > Windows Components > Windows PowerShell
    Set Turn on Module Logging to Enabled-->Module Name: Show: Value=*

2. To enable PowerShell Script Block Logging:
   Set Turn on PowerShell Script Block Logging:Enabled

3. To enable PowerShell Transcription:
   Set Turn on PowerShell Transcription to Enabled
   Check the Include invocation headers box( Transcript output directory will be blank)
   
   
Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,537 questions
Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,414 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,403 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,057 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,427 questions
0 comments No comments
{count} votes