Windows 10: Using Write-Eventlog for remote event log returns OSWritingError

Discus and support Using Write-Eventlog for remote event log returns OSWritingError in Windows 10 Support to solve the problem; I have a powershell script that works on Windows 7 with powershell versions 3, 4, and 5. The same script ran on Windows 10 the command gives me a... Discussion in 'Windows 10 Support' started by AndrewG, Sep 7, 2016.

  1. AndrewG Win User

    Using Write-Eventlog for remote event log returns OSWritingError


    I have a powershell script that works on Windows 7 with powershell versions 3, 4, and 5. The same script ran on Windows 10 the command gives me a OSWriting error:

    PS C:\WINDOWS\system32> Write-EventLog -LogName ClearLoftwareLabels2 -Source Scripts2 -ComputerName COMDCLKD01 -EventId 1 -Message Test


    Write-EventLog : The operating system reported an error when writing the event entry to the event log. A Windows error code is not

    available.

    At line:1 char:1

    + Write-EventLog -LogName ClearLoftwareLabels2 -Source Scripts2 -Comput ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo : WriteError: Using Write-Eventlog for remote event log returns OSWritingError :)) [Write-EventLog], Exception

    + FullyQualifiedErrorId : OSWritingError,Microsoft.PowerShell.Commands.WriteEventLogCommand


    The command is writing to a Windows 12 server with a custom log file. The Windows 7 users have been using this for several months with out issue. We are starting to roll out Windows 10 and we are seeing this.

    I have read plenty of blogs and various articles with no success at finding information around Windows 10 and security to remote event logs.


    The full command is:

    Write-EventLog-LogNameClearRunAwayLabels-SourceScripts-Message"This entry will cause a scheduled task to run for clearing print jobs."-EventId3-EntryTypeInformation-ComputerName ???????

    Looking for ideas or solution to why I am getting a write error, if the account or command can not access the reg to find the eventlog another error would appear, therefore it found the log but can not write. From Win 10 I can issue Get-Eventlog and read the entries.



    :)
     
    AndrewG, Sep 7, 2016
    #1
  2. Nigel_H Win User

    Event 3104 Search: "Enumerating user sessions to generate filter pools failed"

    With respect to the BSOD have you the eventlog message that occurred - in most BSOD now, Microsoft is writing the issue to the Event Viewer Log (I seem to recall it was the System log)

    In my cases to date the 3104 issue does not appear to be related to BSODs
     
    Nigel_H, Sep 7, 2016
    #2
  3. nancy3243 Win User
    Event Error Log

    PS C:\WINDOWS\system32> remove-EventLog -Source "Custom Log"

    remove-EventLog : The source name "Custom Log" does not exist on computer "localhost".

    At line:1 char:1

    + remove-EventLog -Source "Custom Log"

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo : InvalidOperation: Using Write-Eventlog for remote event log returns OSWritingError :)) [Remove-EventLog], InvalidOperationException

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.RemoveEventLogCommand



    PS C:\WINDOWS\system32> remove-EventLog -Source "CMS Application Log"

    remove-EventLog : The event log source 'CMS Application Log' cannot be deleted, because it's equal to the log name.

    At line:1 char:1

    + remove-EventLog -Source "CMS Application Log"

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo : NotSpecified: Using Write-Eventlog for remote event log returns OSWritingError :)) [Remove-EventLog], InvalidOperationException

    + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.RemoveEventLogCommand



    PS C:\WINDOWS\system32>
     
    nancy3243, Sep 7, 2016
    #3
Thema:

Using Write-Eventlog for remote event log returns OSWritingError

Loading...
  1. Using Write-Eventlog for remote event log returns OSWritingError - Similar Threads - Using Write Eventlog

  2. Windows event log

    in Windows 10 Gaming
    Windows event log: Hello. I'd like to request some insight on an event log. I'm playing a game called Tom Clancy's The Division 2, and it keeps crashing onto desktop, and this is what I've found in the event log: Fault bucket , type 0 Event Name: LiveKernelEvent Response: Not available Cab...
  3. Windows Remote Management events logged on my computer. Why?

    in AntiVirus, Firewalls and System Security
    Windows Remote Management events logged on my computer. Why?: I was looking through the Windows 10 Event Viewer and noticed that Windows Remote Management has been logging events, even though I have never used it. Log entries include: Event ID 254 Activity Transfer Event ID 145 WSMan operation Enumeration started with resourceUri...
  4. event log

    in Windows 10 BSOD Crashes and Debugging
    event log: My event log shows numerous errors and warnings specifically for DistributedCom - this started happening around the 1st of November - should i do something? <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> - <System> <Provider...
  5. Kaspersky Event Log

    in AntiVirus, Firewalls and System Security
    Kaspersky Event Log: I have a dell XPS 8900 Win 10 Pro 24 Meg Nvidia 960 I have had to remove Kaspersky internet security, however even after using Kaspersky removal tool and I left with Kaspersky event log in event viewer, spoke with Kaspersky they said the following "Please use the Disk...
  6. Event Viewer Logs

    in Windows 10 Support
    Event Viewer Logs: I’m currently on Win10 Pro x64, version 1709, Build 16299.371. Searching in my Event Viewer, I noticed some logs under the “Applications and Services Logs” folder, which I don’t recall having previously (pointed with red arrow, in the image) and are all inactive! Can...
  7. Event Log error

    in Windows 10 Support
    Event Log error: Any idea what would be causing this? svchost (3972) Database recovery/restore failed with unexpected error -566. Many instances of this error in my event log. Running windows 10 pro with November update.... Thanks. 32625
  8. Missing Events in Event log?

    in Windows 10 Performance & Maintenance
    Missing Events in Event log?: Hi so I notice that sometimes when I do a system diagnostics report I get the message of missing events in event log. I do at times clear my events from event log after a long time but is this something to be concerned about? I did clear application and system event logs...
  9. Event log question

    in Windows 10 Support
    Event log question: Tried to attach the actual event log but site did not let me. Below is a log from Event/Application and Services Logs/Microsoft/Windows/Audio/PlaybackManager I have hundreds if not thousands of these in the log since I installed and each time this is generated I get a...
  10. Event Log mechanism

    in Windows 10 Support
    Event Log mechanism: Hi All I struggle to find some information about logs collecting mechanism in Windows 10. Unfortunately, I haven't managed to do it yet. I am not able to find any publication or www site with specific information about it. Does anyone of You know where can I find needed...

Users found this page by searching for:

  1. write-eventlog : the operating system reported an error when writing the event entry to the event log. a windows errorcode is not available.