Windows 10: Powershell event log

Discus and support Powershell event log in AntiVirus, Firewalls and System Security to solve the problem; I have many of these in my event logs : POWERSHELL...task category execute a remote command :Creating Scriptblock text 1 of 1:# Copyright © 2008,... Discussion in 'AntiVirus, Firewalls and System Security' started by LynnCarrico, Aug 15, 2021.

  1. Powershell event log


    I have many of these in my event logs : POWERSHELL...task category execute a remote command :Creating Scriptblock text 1 of 1:# Copyright © 2008, Microsoft Corporation. All rights reserved.#Common utility functionsImport-LocalizedData -BindingVariable localizationString -FileName CL_LocalizationData# Function to get user troubleshooting historyfunction Get-UserTSHistoryPath { return "${env:localappdata}\diagnostics"}# Functi

    :)
     
    LynnCarrico, Aug 15, 2021
    #1
  2. ddelo Win User

    Export All Administrative Events to Excel

    To analyze events, from the Windows Event Viewer, there is a simple way to export all Administrative Events to Excel, with PowerShell.

    Exporting all Administrative Events to Excel is a simple two Step process, as described here:

    Step 1 - Create the Administrative Events View .xml file
    1. Open Eventviewer (%windir%\system32\eventvwr.msc)
    2. Navigate to: Event Viewer (Local) > Custom Views > Administrative Events
    3. In the “Actions” pane select “Filter Current Custom View”.
    4. Select the the XML tab.
    5. Press Ctrl+A to select all the XML code of the Custom View.
    6. Open a notepad, paste the selected code and save the file to your Desktop as AdmEvtView.xml


    Step 2 - Create the csv file with the events
    1. Download the ExportEvtCSV.zip file, which contains the script ExportEvtCSV.ps1 and unzip it, on your Desktop.
      It's not a fancy script, just basic PowerShell commands to create a csv file on the Desktop.
    2. In Windows Search, type “ISE” (without the quotes) to open “Windows PowerShell ISE” and Run as administrator
    3. To allow running the script, change the ExecutionPolicy, for this session. To do that, in the Console pane type:
      Code:
    4. In the Windows PowerShell ISE, open and run the script: ExportEvtCSV.ps1
      The script will create a csv file with a name YYYYMMDD.HHMM.csv on the Desktop
    5. When done, open the newly created .csv file, format the columns as needed and optionally save it as .xlsx, if you wish.
    That’s it! You now have all the Administrative Events in Excel for filtering and further analysis. Powershell event log :)

    Now to the more technical hard stuff... *Confused

    There is a reason for running the script from within PowerShell ISE!

    It would be great if everything was also working perfectly, when running the script from an elevated PowerShell too.

    We can run it from an elevated PowerShell, which means that you just follow the Step 1, as above but for the Step 2 instead of the ISE you run the script from an elevated PowerShell.

    The problem is that it will work only for anybody who has en-US format for the dates. Everyone else, who has another format (i.e. en-GB, fr-FR, el-GR etc.), the dates are not translated properly by Excel (although the script uses the –UseCulture switch) and remain as text in the en-US format.

    I'm not sure if this a bug of the "export-csv" cmdlet, but although it runs the way it supposed to from within the ISE, from PowerShell there is a problem with the dates format.
    As I haven’t found a way to overcome this obstacle, any suggestion from the PowerShell gurus of the forum (like my good friend Shawn @Brink, for instance), is welcome.
     
    ddelo, Aug 15, 2021
    #2
  3. PKTeneja Win User
    Powershell logs

    Hi,

    I am looking forward to integrate Powershell logs with SIEM. However I observed we get limited powershell logs in event viewer. Is there any specific audit policy to be implemented to generate granular logs.

    Thanks
     
    PKTeneja, Aug 15, 2021
    #3
  4. angstar Win User

    Powershell event log

    angstar, Aug 15, 2021
    #4
Thema:

Powershell event log

Loading...
  1. Powershell event log - Similar Threads - Powershell event log

  2. event log

    in Windows 10 Software and Apps
    event log: Checking the event log a constant error is is this I have included this screen shot can anyone help please? https://answers.microsoft.com/en-us/windows/forum/all/event-log/392cf2c4-623e-4c7e-b677-c1718e676b8d
  3. Event log

    in Windows 10 Network and Sharing
    Event log: HiIf you close the laptop not shutdown is it possible for someone to login remotely? There shouldn't be any log details if the laptop is closed as no activity happened. Could you please explain this better?...
  4. event logs

    in Windows 10 Gaming
    event logs: https://1drv.ms/u/s!Ah4RDmoZkWcwgiUIWZvXksrjZWex?e=takR8H follow this link and investagate the event logs please include some form of contact info and a brief discussion as to what you suspect is wrong and how it can be fixed thanks....
  5. PowerShell event log that happens every month.

    in Windows 10 Gaming
    PowerShell event log that happens every month.: Why is this event log happening every month?Should I be worried?My os is Windows 10 Home It happens in PowerShell/operational logTask Category: Execute a remote commandCreating Scriptblock text 1 of 1:# Copyright © 2008, Microsoft Corporation. All rights reserved.#Common...
  6. PowerShell event log that happens every month.

    in Windows 10 Software and Apps
    PowerShell event log that happens every month.: Why is this event log happening every month?Should I be worried?My os is Windows 10 Home It happens in PowerShell/operational logTask Category: Execute a remote commandCreating Scriptblock text 1 of 1:# Copyright © 2008, Microsoft Corporation. All rights reserved.#Common...
  7. PowerShell event log that happens every month.

    in AntiVirus, Firewalls and System Security
    PowerShell event log that happens every month.: Why is this event log happening every month?Should I be worried?My os is Windows 10 Home It happens in PowerShell/operational logTask Category: Execute a remote commandCreating Scriptblock text 1 of 1:# Copyright © 2008, Microsoft Corporation. All rights reserved.#Common...
  8. UIAutomation Events on Powershell

    in Windows 10 BSOD Crashes and Debugging
    UIAutomation Events on Powershell: I'm trying to listen UIAutomation events using Powershell, and wrote somethings like this. $propChangeHandler= [System.Windows.Automation.AutomationPropertyChangedEventHandler]# <summary># Adds a handler for property-changed event in particular, a change in the enabled...
  9. Event logs

    in Windows 10 BSOD Crashes and Debugging
    Event logs: Hello, My PC, Win 10, 64, crashes to a grey or black screen every few days or so. Tried re-installing win 10 from a stick. The error is: The WCSV3 service depends on the WAS which failed to start because the system cannot find the drive specified. Then in services, I...
  10. Event Logs

    in Windows 10 Drivers and Hardware
    Event Logs: Is there an event log that shows adding and removing dates of devices - computers, printers, etc from computer? https://answers.microsoft.com/en-us/windows/forum/all/event-logs/27a9283c-9d25-47d8-8e1b-0c04e7f4357e

Users found this page by searching for:

  1. www.windowsphoneinfo.com