I’m using PS 5.0 for this code:
Get-Eventlog security -ComputerNameand putting my computer's name after -ComputerName, and getting this error:
Get-EventLog : Missing an argument for parameter ‘ComputerName’. Specify a parameter of type
‘System.String’ and try again.
At line:1 char:23
- Get-Eventlog security -ComputerName
-
~~~~~~~~~~~~~
- CategoryInfo : InvalidArgument: ( [Get-EventLog], ParameterBindingException
- FullyQualifiedErrorId : MissingArgument,Microsoft.PowerShell.Commands.GetEventLogCommand
The code is from PS in a Month of Lunches, 2e, page 31.
I’m not understanding why the code isn’t working as written in the book, nor am I understanding what the error is, as I should be opening the security log for my computer.
Thanks for you help.