How to set PowerShell eventlog max size in a GPO

Thomas Nielsen 21 Reputation points
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
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,584 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,863 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,575 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jai Verma 461 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 39,711 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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.