Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Get-WinEvent remote successfully retrieves large number of events, then throws "The remote procedure call failed", then throws "The handle is invalid"

$
0
0

Trying to read Windows Event logs via Powershell 5.1 on Windows 10 (7GB memory) to Windows 2016 Server (4GB memory).

This pulls a couple of hundred event messages, then fails. When running locally, runs through until the end without error.

Does anyone know of any logs errors would be written too (ironically enough...)

Thanks,

Chris

ps> Get-WinEvent -Credential $mySecureCreds -ComputerName WinFS-Chris -LogName Microsoft-Windows-SM
BClient* -FilterXpath @"
>> *[System[TimeCreated[@SystemTime>'2019-04-01T02:30:00'] and (Level=4)]]
>> "@


   ProviderName: Microsoft-Windows-SMBClient

TimeCreated                     Id LevelDisplayName Message
-----------                     -- ---------------- -------
4/1/2019 9:46:19 PM          30810 Information      Added a TCP/IP transport interface....
4/1/2019 9:46:19 PM          30810 Information      Added a TCP/IP transport interface....

...

4/1/2019 4:53:45 PM          30810 Information      Added a TCP/IP transport interface....
Get-WinEvent : The remote procedure call failed
At line:1 char:1
+ Get-WinEvent -Credential $mySecureCreds -ComputerName WinFS-Chris -Lo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-WinEvent], EventLogException
    + FullyQualifiedErrorId : The remote procedure call failed,Microsoft.PowerShell.Commands.GetWinEventCommand

4/1/2019 4:53:45 PM          30810 Information      Cannot retrieve event message text.
Get-WinEvent : The handle is invalid
At line:1 char:1
+ Get-WinEvent -Credential $mySecureCreds -ComputerName WinFS-Chris -Lo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-WinEvent], EventLogException
    + FullyQualifiedErrorId : The handle is invalid,Microsoft.PowerShell.Commands.GetWinEventCommand

4/1/2019 4:53:45 PM          30810 Information      Cannot retrieve event message text.


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>