top of page

Register of the commands Powershell
(PowerShell logs)

PowerShell commands issued by a script, an application, or a user can be recorded in the Working Log and Access Logs:

image.png

To enable logging on machines, some keys must be created in the Windows Registry (Regedit) under:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\

Create the PowerShell key and, immediately below it, two additional keys:

  • Module-Logging

  • ModuleNames

image.png

Inside Module-Logging, create a DWORD value named EnableModuleLogging and set it to 1.

image.png

Inside ModuleNames, create a String value with the following label and value:

image.png

Microsoft.PowerShell.*

 

These keys must be generated by GPO, so as to "spread" them across all machines.

 


[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell]

 


[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging] "EnableModuleL-ogging"=dword:00000001

 


[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging\Modu leNames]
"Microsoft.PowerShell.*"="Microsoft.PowerShell.*"

​

If the NinjaOne software is present on your network, it may generate several million log entries, resulting in a significant increase in the database size.

In this case, the use of PowerShell logs is not recommended, as it may negatively affect the application's performance.

image.png
bottom of page