CmdID / PowerShell / Cmdlets / Enable
Enable-PSTrace
Enables the Microsoft-Windows-PowerShell event provider logs. PowerShell reference
From the PowerShell reference 2 parameters
What it does
Enables the Microsoft-Windows-PowerShell event provider logs. This cmdlet enables the Operational and Analytic event logs of the Microsoft-Windows-PowerShell event provider. You must run this cmdlet from an elevated PowerShell session.
Enable-PSTrace [-Force] [-AnalyticOnly]
Enable the Analytic event log for PowerShell
Enable-PSTrace -AnalyticOnlyIdentifyIts page in the reference: Enable-PSTrace.
Parameters
-AnalyticOnlyWhen this parameter is used, the cmdlet enables the Analytic event log of the Microsoft-Windows-PowerShell provider. The Operational event log is not changed.-ForceUsed to force the change without prompting.