I ran the following command and I didn’t expect it to work because -LogName is positional (position 1) and I didn’t specify the parameter name (-LogName). The command did run successfully. (And I wasn’t prompted for LogName.)
Why does the following command run properly?
`Get-EventLog -EntryType "Information" System -Newest 5 Index Time EntryType Source InstanceID Message ----- ---- --------- ------ ---------- ------- 3817 Jul 18 10:56 Information Microsoft-Windows... 19 Installation Successful: Wi 3816 Jul 18 10:56 Information Microsoft-Windows... 17 Installation Ready: The fol 3815 Jul 18 10:56 Information Microsoft-Windows... 17 Installation Ready: The fol 3814 Jul 18 10:54 Information WMPNetworkSvc 1074607998 The description for Event I 3813 Jul 18 10:54 Information WMPNetworkSvc 1074607998 The description for Event I`