/r:share01: Specifies the remote computer share01 to query the event log from.
/u:julie.clay: Specifies the username julie.clay to authenticate on the remote machine.
/p:Welcome1: Specifies the password Welcome1 for authentication.
Using Get-WinEvent to search in security logs
Get-WinEvent requires administrator access or permissions adjusted on the registry key HKLM\System\CurrentControlSet\Services\Eventlog\Security. Membership in just the Event Log Readers group is not sufficient.
The cmdlet can also be run as another user with the -Credential parameter.
Note on logs
In the example above, we query local logs.
When you use AD, you still have local security logs on each domain-joined machine, so this attack still applies because these logs will continue to capture local events.
AD logs on Domain Controllers capture domain-level activities. Both types of logs coexist and provide different layers of insight.