How to set PowerShell eventlog max size in a GPO

Thomas Nielsen 1 Reputation point
2021-09-28T18:08:48.18+00:00

Hi there.

I need to set the PowerShell event log in Windows max size in a GPO.

I allready got the Eventlog Max size for: Application, Security, Setup, and System down in the: "Windows Components/Event Log Services" area

My google foo has run out for this one.
Please help me out wise people :-)

Kind regards
Thomas....

Windows Group Policy
Windows Group Policy
A feature of Windows that enables policy-based administration using Active Directory.
2,150 questions
Windows Server Security
Windows Server Security
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
1,430 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.
4,902 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jai Verma 451 Reputation points
    2021-09-28T19:00:51.81+00:00

    GPO does not have out of the box ADMX/ADML file for PowerShell Event logs. If you can build your own ADML/ADMX or find some template, that can solve your problem.

    0 comments No comments

  2. Limitless Technology 37,781 Reputation points
    2021-09-29T13:46:29.413+00:00

    Hi there,

    Can you give this a try?

    Open the registry editor and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\<log_name>.
    For example: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Directory Service
    Set the MaxSize to the required decimal value (in bytes).


    If the reply is helpful, please Upvote and Accept it as an answer

    0 comments No comments