mirror of
https://github.com/arehnman/yttrium-virtio-gpu.git
synced 2026-10-31 02:05:04 +00:00
If user operate 'ctrl+c' or exit powershell to break the script-running, the Collecting_Status.txt would be opened and cause the folder couldn't be removed/cleaned. Solves: https://issues.redhat.com/browse/RHEL-50169 Signed-off-by: Dehan Meng <[email protected]>
CollectSystemInfo
Overview
This PowerShell script is designed for comprehensive system diagnostics. It gathers a wide range of information, including system configuration, event logs, drivers, registry settings, update logs, services, uptime, processes, installed applications, installed KBs (knowledge base articles), network configuration, and optionally, memory dumps.
The collected data is organized into a timestamped folder and then compressed into a ZIP archive for easy sharing and analysis.
Usage
-
Prerequisites:
- PowerShell (Windows 10/Windows Server 2016 or later)
- Administrative privileges (for collecting event logs)
- Ensure the script runs with an unrestricted execution policy (for Windows 10 and Windows Server 2016):
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process -Force
-
Running the Script:
- Open PowerShell as an administrator.
- Navigate to the script's directory.
- Execute the script:
.\CollectSystemInfo.ps1 -IncludeSensitiveData-IncludeSensitiveData: Optional switch to include memory dumps in the collection (use with caution).
-
Output:
- A folder named
SystemInfo_YYYY-MM-DD_HH-MM-SSwill be created in the script's directory. - This folder contains the collected data files.
- A ZIP archive named
SystemInfo_YYYY-MM-DD_HH-MM-SS.zipwill also be created.
- A folder named
Data Collected
msinfo32.txt: Detailed hardware and software configuration report.system.evtx,security.evtx,application.evtx: System, Security, and Application event logs.drv_list.csv: List of all installed drivers.virtio_disk.txt: Specific configuration details for Virtio-Win storage drivers.WindowsUpdate.log: Detailed logs of Windows Update activity.Services.csv: List of services and their status.WindowsUptime.txt: Duration since the last system boot.RunningProcesses.csv: Snapshot of active processes.InstalledApplications.csv: List of installed applications.InstalledKBs.csv: List of installed Windows updates.NetworkInterfaces.txtandIPConfiguration.txt: Network configuration details.MEMORY.DMPandMinidumpfolder: Full or mini memory dumps (if-IncludeSensitiveDatais used).Collecting_Status.txt: Generated during data collection and deleted after completion. If the script is interrupted, this file indicates incomplete data collection.
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.