Get-WinEvent unusual errors
hi all,
looking change 1 of scripts use get-winevent in place of get-eventlog. testing command see properties returned can update script unexpected happened.
get-winevent : attempted perform unauthorized operation.
@ line:1 char:24
+ $applogs = get-winevent <<<< -logname application
+ categoryinfo : notspecified: (:) [get-winevent], unauthorizedac
cessexception
+ fullyqualifiederrorid : attempted perform unauthorized operation.,
microsoft.powershell.commands.getwineventcommand
before states obvious - yes running in elevated prompt.
now here's odd part, if create 2 arrays - 1 using "get-winevent -logname application -computer remoteserver" , using "get-eventlog -computer remoteserver application" first 1 errors 20 times, second no errors. if allow both complete (running @ same time) both have same item count of 64855. same errors occur if logon "remoteserver" , run locally.
i'm assuming issue specific event logs, have suggestions on how troubleshoot this?
thanks in advance.
suspect few event logs need admin rights - happens if pass credentials?
could please share code?
regards chen v [mcts sharepoint 2010]
Windows Server > Windows PowerShell
Comments
Post a Comment