Critical Event Logs
hi...i trying critical event logs using powershell v 4.0 using script below -
get-winevent system | where-object leveldisplayname -eq "critical" | out-gridview
i getting error mentioned below
get-winevent : attempted perform unauthorized operation.
@ line:1 char:1
+ get-winevent system | where-object leveldisplayname -eq "critical" | out-gridvie ...
+ ~~~~~~~~~~~~~~~~~~~
+ categoryinfo : notspecified: (:) [get-winevent], unauthorizedaccessexception
+ fullyqualifiederrorid : attempted perform unauthorized operation.,microsoft.powershell.commands.getwineventcommand
can give me assistance pls...
vt
here correct way filter event log:
get-winevent -filterhashtable @{logname='system';level=1} | out-gridview
if have not been granted access event logs ask admins grant permission.
\_(ツ)_/
Windows Server > Windows PowerShell
Comments
Post a Comment