Powershell in Application and Services Event Logs

We are looking to add all powershell command line events to the Windows Event Logs. I.E a bad guy tries to run powershell empire etc. We found and article that talks about adding this -
Add the below lines to %windir%\system32\Windows­PowerShell\v1.0\profile.ps1; this is for all users of the computer and for all shells.
$LogCommandHealthEvent = $true
$LogCommandLifeCycleEvent = $true

from

But someone was telling me newer versions of powershell automatically log commands to the event logs?

Enhanced logging is available in powershell 5 via a patch for powershell 4. There is a nice overview here Greater Visibility Through PowerShell Logging | Mandiant

To access event logs, Windows PowerShell comes with Get-EventLog cmdlet:
Adding all powershell command line events to the Windows Event Logs, this tutorial might help. I read this . Exporting event logs with Windows PowerShell | Event Log Explorer blog . .
Thanks