Enable PowerShell Module Logging

Sometimes you may want to enable logging for all PowerShell actions on your system. You can perform this action by Group Policy Object (GPO), and it’s pretty simple!

Open the Group Policy Editor MMC and navigate to:

  • Computer Configuration
  • Administrative Templates
  • Windows Components
  • Windows PowerShell

Now, double click on “Turn on Module Logging” and select “Enabled“. Click on “Show” next to module names and if you want to log commands from all PowerShell modules then type “*” in the pop up window.

logging

Click OK and apply the policy. It’s done!

 

Thanks for reading! You can follow me on Twitter @PrigentNico

About Nicolas 282 Articles
I work as an IT Production Manager, based in Paris (France) with a primary focus on Microsoft technologies. I have 10 years experience in administering Windows Servers. . I am a Microsoft MVP for Cloud & Datacenter Management. I also received the PowerShell Hero 2016 award by PowerShell.0rg. And finally, I am "MCSE: Cloud Platform and Infrastructure", "MCSA: Windows Servers", "Administering & Deploying SCCM", and CheckPoint CCSA certified.