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 for business | Windows Server | User experience | PowerShell
Windows for business | Windows Server | Devices and deployment | Configure application groups
Windows for business | Windows Client for IT Pros | User experience | Other
{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 40,081 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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.