Writing Powershell script output to EventData in Event log

Welcome Forums General PowerShell Q&A Writing Powershell script output to EventData in Event log

Viewing 3 reply threads
  • Author
    Posts
    • #281915
      Participant
      Topics: 1
      Replies: 1
      Points: 14
      Rank: Member

      Hi all. I’m fairly new to Powershell scripting, and became stumped on this task based on experience & research. Any help would be greatly appreciated! Please see below.

      Objective: Output the results of Name, OperatingSystem, OperatingSystemVersion, lastlogondate to an event log. Currently and reasonably, it’s only outputting the message “This is a test” below in the event log. Any suggestions of how to output the results of the script itself to the event log it generates?

      `

    • #281960
      Participant
      Topics: 9
      Replies: 704
      Points: 2,829
      Helping Hand
      Rank: Community Hero
      • #282065
        Participant
        Topics: 1
        Replies: 1
        Points: 14
        Rank: Member

        This is perfect, thanks Doug!

    • #282074
      Participant
      Topics: 17
      Replies: 1951
      Points: 3,986
      Helping Hand
      Rank: Community Hero

      @Doug Nice script!

    • #282095
      Participant
      Topics: 9
      Replies: 704
      Points: 2,829
      Helping Hand
      Rank: Community Hero

      Lol thanks @Rob  it was the only way I could make it look nice with varying value lengths

Viewing 3 reply threads
  • You must be logged in to reply to this topic.