This article explains how to collect PowerShell-related logs and diagnostic information from Windows Event Viewer and other Windows locations.
These logs are commonly required when troubleshooting PowerShell script failures, automation issues, scheduled tasks, or service executions that rely on PowerShell. Collecting the relevant logs helps Support and Engineering teams understand what PowerShell executed, whether errors occurred, and whether security or policy controls affected execution.
This procedure applies to Windows systems using Windows PowerShell 5.1 and PowerShell Core. No third-party tools are required.
Collect PowerShell Operational logs
- Log on to the affected Windows server or workstation.
- Open Event Viewer:
- Press Windows key + R.
- Enter
eventvwr.msc. - Select OK.
- In Event Viewer, expand the appropriate path for your PowerShell version:
- Windows PowerShell 5.1: Applications and Services Logs > Microsoft > Windows > PowerShell
- PowerShell 7: Applications and Services Logs > PowerShellCore
- Select Operational.
- In the right-hand pane, select Save All Events As.
- Save the file as
PowerShell-Operational.evtx. - If prompted, select Display information for the following languages, then select OK.
These logs contain PowerShell engine start and stop events, execution errors, and script block logging information, if enabled.
Collect Windows PowerShell Application logs (legacy)
- In Event Viewer, expand Windows Logs.
- Select Application.
- In the Actions pane, select Filter Current Log.
- Under Event sources, select Windows PowerShell.
- Select OK.
- Select Save Filtered Log File As.
- Save the file as
WindowsPowerShell-Application.evtx.
These logs are useful for troubleshooting older PowerShell executions and legacy components.
Collect Windows Error Reporting (WER) crash data
If PowerShell crashed, collect the available Windows Error Reporting (WER) data.
- Open File Explorer.
- Navigate to:
C:\ProgramData\Microsoft\Windows\WER\ - If present, collect the following folders:
ReportArchiveReportQueue
- If PowerShell was executed under a specific user account, also collect the WER data from:
C:\Users\<username>\AppData\Local\Microsoft\Windows\WER\ - Compress the collected folders into a single ZIP file.
NOTE: The ProgramData and AppData folders are hidden by default.
The following locations are global WER storage directories used by Windows for application and service crashes:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive
C:\ProgramData\Microsoft\Windows\WER\ReportQueue
These directories may contain crash reports for:
powershell.exepwsh.exe(PowerShell 7 and later)- Services
- Applications
- Third-party executables
- Windows components
Collect PowerShell command history (interactive sessions only)
- Navigate to:
C:\Users\<username>\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ - Collect the following file:
ConsoleHost_history.txt
The ConsoleHost_history.txt file contains the command history for interactive PowerShell console sessions.
Information recorded in the command history
- Commands typed interactively into a PowerShell console (ConsoleHost).
- The order in which commands were entered.
- Commands associated with the user account that ran the console.
Information not recorded in the command history
- Command output.
- Errors or exceptions.
- Whether commands succeeded or failed.
- Background, scheduled, or service-run PowerShell executions.
- Execution timestamps, beyond the relative order of commands.
This behavior is expected. The ConsoleHost_history.txt file records command history only and does not provide complete execution logs.
After completing these steps, you will have collected the relevant PowerShell execution logs and supporting crash data required for troubleshooting.
Provide the collected files to Support for analysis. These logs can help Support and Engineering teams investigate PowerShell execution behavior, identify errors, confirm whether scripts ran successfully, and determine whether failures were caused by permissions, policies, or system-level faults.
Related Articles
How to collect Windows Event Application and System logs 149Number of Views Export Windows Event logs for powershell using a PowerShell script 9Number of Views Collect HAR logs in Chrome 58Number of Views Collecting Logs for Support 13Number of Views Locations of Flexera agent logs on Linux and Windows 9Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add additional feedback (optional)
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
|
FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513
(toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367
(toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895
2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago