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. 4 reoccurring event logs leading into windows 11 crashing. volmgr, Eventlog, EventLog, Tcpip

    in Windows 10 Gaming
    4 reoccurring event logs leading into windows 11 crashing. volmgr, Eventlog, EventLog, Tcpip: Hello, I am working on my friends computer because he is having a random BSOD. I was able to look in event viewer and notice that 4 error events are created int the time before the BSOD. I have since tried looking to C:\Windows\Minidump for log files but could not locate...
  3. 4 reoccurring event logs leading into windows 11 crashing. volmgr, Eventlog, EventLog, Tcpip

    in Windows 10 Software and Apps
    4 reoccurring event logs leading into windows 11 crashing. volmgr, Eventlog, EventLog, Tcpip: Hello, I am working on my friends computer because he is having a random BSOD. I was able to look in event viewer and notice that 4 error events are created int the time before the BSOD. I have since tried looking to C:\Windows\Minidump for log files but could not locate...
  4. TPM Error Event id 17 in Eventlog...

    in Windows 10 Gaming
    TPM Error Event id 17 in Eventlog...: Hello to all, Every time I boot up my Windows 11 Pro 23H2 System I get this error in the eventlog TPM Error The Trusted Platform Module TPM hardware failed to execute a TPM command. With an Eventid of 17 and I have already submitted Feedback via the Feedback Hub already and...
  5. TPM Error Event id 17 in Eventlog...

    in Windows 10 Software and Apps
    TPM Error Event id 17 in Eventlog...: Hello to all, Every time I boot up my Windows 11 Pro 23H2 System I get this error in the eventlog TPM Error The Trusted Platform Module TPM hardware failed to execute a TPM command. With an Eventid of 17 and I have already submitted Feedback via the Feedback Hub already and...
  6. PC is being remotely accessed, Event Viewer logs

    in AntiVirus, Firewalls and System Security
    PC is being remotely accessed, Event Viewer logs: My PC is being remotely accessed/hacked, Im pretty sure these Events in Event Veiwer are from them, but I dont know what they mean, or how they're getting access to my PC, can you guys see how theyre doing it from these logs? ill copy/paste themDevice ROOT\NET\0000 was...
  7. PC is being remotely accessed, Event Viewer logs

    in Windows 10 Gaming
    PC is being remotely accessed, Event Viewer logs: My PC is being remotely accessed/hacked, Im pretty sure these Events in Event Veiwer are from them, but I dont know what they mean, or how they're getting access to my PC, can you guys see how theyre doing it from these logs? ill copy/paste themDevice ROOT\NET\0000 was...
  8. PC is being remotely accessed, Event Viewer logs

    in Windows 10 Software and Apps
    PC is being remotely accessed, Event Viewer logs: My PC is being remotely accessed/hacked, Im pretty sure these Events in Event Veiwer are from them, but I dont know what they mean, or how they're getting access to my PC, can you guys see how theyre doing it from these logs? ill copy/paste themDevice ROOT\NET\0000 was...
  9. EventLog

    in Windows 10 Ask Insider
    EventLog: Hello, I recently saw that EventLog service is always working and taking 1-2% cpu load, I know that 1-2 percent is nothing, but I never saw this proccess taking more than 0%, seems like bug. submitted by /u/_MeetYourMaker_ [link] [comments]...
  10. 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...

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.