[
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog  \n\nAll changes of Collect-MemoryDump will be documented in this file.  \n\n## [1.1.0] - 2025-03-10\n### Added\n- Triage Collection w/ Magnet RESPONSE\n- Microsoft Protection Logs (MPLogs)\n- RDP Sessions\n- Shadow Copies\n- Opened Files (remotely through a shared folder)\n- Magnet RESPONSE v1.7.0 &#8594; Magnet RESPONSE v1.7.1\n- 7-Zip 23.01 Standalone Console &#8594; 7-Zip 24.09 Standalone Console\n- SECURITY.md\n\n## Changed\n- CHANGELOG.md\n"
  },
  {
    "path": "Collect-MemoryDump.ps1",
    "content": "﻿# Collect-MemoryDump v1.1.0\r\n#\r\n# @author:    Martin Willing\r\n# @copyright: Copyright (c) 2019-2025 Martin Willing. All rights reserved.\r\n# @contact:   Any feedback or suggestions are always welcome and much appreciated - mwilling@lethal-forensics.com\r\n# @url:\t\t  https://lethal-forensics.com/\r\n# @date:\t  2025-03-10\r\n#\r\n#\r\n# ██╗     ███████╗████████╗██╗  ██╗ █████╗ ██╗      ███████╗ ██████╗ ██████╗ ███████╗███╗   ██╗███████╗██╗ ██████╗███████╗\r\n# ██║     ██╔════╝╚══██╔══╝██║  ██║██╔══██╗██║      ██╔════╝██╔═══██╗██╔══██╗██╔════╝████╗  ██║██╔════╝██║██╔════╝██╔════╝\r\n# ██║     █████╗     ██║   ███████║███████║██║█████╗█████╗  ██║   ██║██████╔╝█████╗  ██╔██╗ ██║███████╗██║██║     ███████╗\r\n# ██║     ██╔══╝     ██║   ██╔══██║██╔══██║██║╚════╝██╔══╝  ██║   ██║██╔══██╗██╔══╝  ██║╚██╗██║╚════██║██║██║     ╚════██║\r\n# ███████╗███████╗   ██║   ██║  ██║██║  ██║███████╗ ██║     ╚██████╔╝██║  ██║███████╗██║ ╚████║███████║██║╚██████╗███████║\r\n# ╚══════╝╚══════╝   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝ ╚═╝      ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚══════╝╚═╝ ╚═════╝╚══════╝\r\n#\r\n#\r\n# Dependencies:\r\n# 7-Zip 24.09 Standalone Console (2024-11-29)\r\n# https://www.7-zip.org/download.html\r\n#\r\n# Belkasoft Live RAM Capturer (2018-10-22)\r\n# https://belkasoft.com/ram-capturer\r\n#\r\n# MAGNET DumpIt for Windows (2023-01-17) --> Comae-Toolkit-v20230117\r\n# https://www.magnetforensics.com/resources/magnet-dumpit-for-windows/\r\n#\r\n# Magnet Encrypted Disk Detector v3.1.0 (2022-06-19)\r\n# Requirements: .NET v4.0.30319\r\n# https://www.magnetforensics.com/resources/encrypted-disk-detector/\r\n#\r\n# Magnet RAM Capture v1.2.0 (2019-07-24)\r\n# https://www.magnetforensics.com/resources/magnet-ram-capture/\r\n#\r\n# Magnet RESPONSE v1.7.1 (2024-09-07)\r\n# Requirements: .NET v4.0.30319\r\n# https://www.magnetforensics.com/resources/magnet-response/\r\n#\r\n# PsLoggedOn v1.35 (2016-06-29)\r\n# https://docs.microsoft.com/de-de/sysinternals/downloads/psloggedon\r\n#\r\n# WinPMEM 4.0 RC2 (2020-10-13)\r\n# https://github.com/Velocidex/WinPmem/releases\r\n#\r\n#\r\n#############################################################################################################################################################################################\r\n\r\n# Hash Values (Whitelisting)\r\n\r\n# 7za.exe                    MD5: 86D2E800B12CE5DA07F9BD2832870577   SHA1: FBA06CFB1D2A59D12F3495B301501D4B1D52D7DB   SHA256: 223B873C50380FE9A39F1A22B6ABF8D46DB506E1C08D08312902F6F3CD1F7AC3\r\n# DumpIt.exe (ARM64)         MD5: 4B39D63B86FFE39BBAE0415C400003C7   SHA1: E08DE257DB9EE0D2AEC8A34433883B025020227B   SHA256: 13BCA00D0042748780B761FB93768754DFD96F48944E6CEC75618CAD93B3B5D5\r\n# DumpIt.exe (x64)           MD5: 0F10DA3A5EB49D17D73D8E195FE32F85   SHA1: 95F7B26CD15170A3043D6D1F049B2A88FB7A5C5F   SHA256: 6A484C1DB7718949C7027ABDE97E164C7E7E4E4214E3E29FE48AC4364C0CD23C\r\n# DumpIt.exe (x86)           MD5: 586C57AD0EEA179FCAE4B8BA117F2AB9   SHA1: 31F4ECD04D5A94437A98D09435A2CEAC7DFD57DC   SHA256: F4F353821178BDAF3E29B49DB6E6D80C543081AC7A4312E5FDB5583B96815839\r\n# EDDv310.exe                MD5: EE4E8097DA5DC038EC3C9B2CB9DB4700   SHA1: 94D250ECA8CD73FB62541E59EC9E6191F71F22A2   SHA256: DE3FC8F41D498D2108DFD52DE8E6200C6271BB45F3FBD6DA5E4C7C648A5BB5B8\r\n# MagnetRESPONSE.exe         MD5: 2A3BA98713A243F90CD0582C64F13CFB   SHA1: AE4E55C15B338229697485AB6154E6E36CA8539D   SHA256: 341A42C9D95855CC62456EF30ECAD14F922E11CBC8374E83B4F758A6DBECC9DE\r\n# MRCv120.exe                MD5: 51D286BDF58359417A28E3132ABA957F   SHA1: 6FA7C189B736808C66C82CCF5F4AAA11F995C95A   SHA256: 72DC1BA6DDC9D572D70A194EBDF6027039734ECEE23A02751B0B3B3C4EA430DE\r\n# PsLoggedon.exe             MD5: E3EA271E748CCDAD6A6D3E692D6F337E   SHA1: F02E06BC439A28AAD6DD957DF8D0022F22798A09   SHA256: D689CB1DBD2E4C06CD15E51A6871C406C595790DDCDCD7DC8D0401C7183720EF\r\n# PsLoggedon64.exe           MD5: 07ED30D2343BF8914DAAED872B681118   SHA1: 1F5B5E40C420F64AA8E8DE471367E3DECC9763CD   SHA256: FDADB6E15C52C41A31E3C22659DD490D5B616E017D1B1AA6070008CE09ED27EA\r\n# RamCapture64.exe           MD5: E331F960CDBA675DEA9218EFDED56A5F   SHA1: 8BD76FB052A10A3EDA7F85993B4B6766C517C646   SHA256: 3F934019C46763B518C90E9D66088A301BD50FFC7F90D447FF1B54AF96AB9E4E\r\n# RamCapture.exe             MD5: FCA60980F235B4EFB3C3119EF4584FFF   SHA1: 465F8F1BEFC212700EA1A71F5CE6F6899A707612   SHA256: 6E2C3E0CE3ABBD8D027E77D210891F2F835400856F36BB70AEA47598F1C5B131\r\n# winpmem_mini_x64_rc2.exe   MD5: 9DD3160679832165738BFABD7279ACEB   SHA1: E460CA732204740674C27073E0FA478F334420FC   SHA256: A4D516B6FCAF3B5B1D4EE709CE86F8EABF1D8028B3A83101479B7568B933D21B\r\n# winpmem_mini_x86.exe       MD5: C2BC7851F966BC39068345FB24BC8740   SHA1: F552A8C22D589471BE582BF884AA5624C967760B   SHA256: DC6A82FC6CFDA792D3182E07DE10ADBFBA42BF336EF269DBC40732C4B2AE052C\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region Arguments\r\n\r\nFunction HelpMessage\r\n{\r\n    Write-Output \"\"\r\n    Write-Output \"Collect-MemoryDump v1.1.0 - Automated Creation of Windows Memory Snapshots for DFIR\"\r\n    Write-Output \"(c) 2025 Martin Willing at Lethal-Forensics (https://lethal-forensics.com/)\"\r\n    Write-Output \"\"\r\n\r\n    Write-Output \"Usage: .\\Collect-MemoryDump.ps1 [-Tool] [--Pagefile] [--Triage]\"\r\n    Write-Output \"\"\r\n    Write-Output \"Tools:\"\r\n    Write-Output \"-Comae        Memory Snapshot will be collected w/ DumpIt (Microsoft Crash Dump)\"\r\n    Write-Output \"-DumpIt       Memory Snapshot will be collected w/ DumpIt (Raw Physical Memory Dump)\"\r\n    Write-Output \"-RamCapture   Memory Snapshot will be collected w/ Magnet Ram Capture (Raw Physical Memory Dump)\"\r\n    Write-Output \"-WinPMEM      Memory Snapshot will be collected w/ WinPMEM (Raw Physical Memory Dump)\"\r\n    Write-Output \"-Belkasoft    Memory Snapshot will be collected w/ Belkasoft Live Ram Capturer (Raw Physical Memory Dump)\"\r\n    Write-Output \"\"\r\n    Write-Output \"Optional:\"\r\n    Write-Output \"--Pagefile    In addition, Pagefile(s) will be collected w/ Magnet RESPONSE\"\r\n    Write-Output \"--Triage      In addition, Forensic Artifacts will be collected w/ Magent RESPONSE\"\r\n    Write-Output \"\"\r\n    Write-Output \"Examples:\"\r\n    Write-Output \".\\Collect-MemoryDump.ps1 -Comae\"\r\n    Write-Output \".\\Collect-MemoryDump.ps1 -DumpIt\"\r\n    Write-Output \".\\Collect-MemoryDump.ps1 -WinPMEM\"\r\n    Write-Output \".\\Collect-MemoryDump.ps1 -RamCapture\"\r\n    Write-Output \".\\Collect-MemoryDump.ps1 -Belkasoft\"\r\n    Write-Output \".\\Collect-MemoryDump.ps1 -DumpIt --Pagefile\"\r\n    Write-Output \".\\Collect-MemoryDump.ps1 -WinPMEM --Pagefile\"\r\n    Write-Output \".\\Collect-MemoryDump.ps1 -DumpIt --Pagefile --Triage\"\r\n    Write-Output \".\\Collect-MemoryDump.ps1 -Comae --Triage\"\r\n    Write-Output \"\"\r\n    Exit\r\n}\r\n\r\n# Arguments\r\n\r\n# Check if an argument was provided\r\nif($Args.Count -eq 0)\r\n{\r\n    HelpMessage\r\n}\r\n\r\n# Check if more than 3 arguments were provided\r\nif($Args.Count -gt 3)\r\n{\r\n    HelpMessage\r\n}\r\n\r\n# Validate $Args[0]\r\nif ($Args[0])\r\n{\r\n    $Tool = ($Args[0] | Out-String).Trim()\r\n\r\n    if (($Tool -ne \"-DumpIt\") -and ($Tool -ne \"-RamCapture\") -and ($Tool -ne \"-WinPMEM\") -and ($Tool -ne \"-Comae\") -and ($Tool -ne \"-Belkasoft\"))\r\n    {\r\n        HelpMessage\r\n    }\r\n}\r\n\r\n# Validate $Args[1]\r\nif ($Args[1])\r\n{\r\n    $Argument1 = ($Args[1] | Out-String).Trim()\r\n\r\n    if (($Argument1 -ne \"--Pagefile\") -and ($Argument1 -ne \"--Triage\"))\r\n    {\r\n        HelpMessage\r\n    }\r\n\r\n    if ($Argument1 -eq \"--Pagefile\")\r\n    {\r\n        $Pagefile = $Argument1\r\n    }\r\n\r\n    if ($Argument1 -eq \"--Triage\")\r\n    {\r\n        $Triage = $Argument1\r\n    }\r\n}\r\n\r\n# Validate $Args[2]\r\nif ($Args[2])\r\n{\r\n    $Argument2 = ($Args[2] | Out-String).Trim()\r\n\r\n    if (($Argument2 -ne \"--Pagefile\") -and ($Argument2 -ne \"--Triage\"))\r\n    {\r\n        HelpMessage\r\n    }\r\n\r\n    if ($Argument2 -eq \"--Pagefile\")\r\n    {\r\n        $Pagefile = $Argument2\r\n    }\r\n\r\n    if ($Argument2 -eq \"--Triage\")\r\n    {\r\n        $Triage = $Argument2\r\n    }\r\n}\r\n\r\n#endregion Arguments\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region Declarations\r\n\r\n# Declarations\r\n\r\n# Script Root\r\nif ($PSVersionTable.PSVersion.Major -gt 2)\r\n{\r\n    # PowerShell 3+\r\n    $SCRIPT_DIR = $PSScriptRoot\r\n}\r\nelse\r\n{\r\n    # PowerShell 2\r\n    $SCRIPT_DIR = Split-Path -Parent $MyInvocation.MyCommand.Definition\r\n}\r\n\r\n# Acquisition date (ISO 8601)\r\n$Date = [datetime]::Now.ToUniversalTime().ToString(\"yyyy-MM-ddTHH:mm:ss\") # YYYY-MM-DDThh:mm:ss\r\n$Timestamp = $Date -replace \":\", \"\" # YYYY-MM-DDThhmmss\r\n\r\n# Output Directory\r\n$OUTPUT_FOLDER = \"$SCRIPT_DIR\\$env:COMPUTERNAME\\$Timestamp-Collect-MemoryDump\"\r\n\r\n# Logfile Directory\r\n$LOG_DIR = \"$SCRIPT_DIR\\$env:COMPUTERNAME\"\r\n\r\n# Tools\r\n\r\n# 7-Zip\r\n$7za = \"$SCRIPT_DIR\\Tools\\7-Zip\\7za.exe\"\r\n\r\n# Belkasoft Live RAM Capturer\r\n\r\n# x64\r\nif ($env:PROCESSOR_ARCHITECTURE -eq \"AMD64\")\r\n{\r\n    $Belkasoft = \"$SCRIPT_DIR\\Tools\\RamCapturer\\x64\\RamCapture64.exe\"\r\n}\r\n\r\n# x86\r\nif ($env:PROCESSOR_ARCHITECTURE -eq \"x86\")\r\n{\r\n    $Belkasoft = \"$SCRIPT_DIR\\Tools\\RamCapturer\\x86\\RamCapture.exe\"\r\n}\r\n\r\n# DumpIt\r\n\r\n# ARM64\r\nif ($env:PROCESSOR_ARCHITECTURE -eq \"ARM64\")\r\n{\r\n    $DumpIt = \"$SCRIPT_DIR\\Tools\\DumpIt\\ARM64\\DumpIt.exe\"\r\n}\r\n\r\n# x64\r\nif ($env:PROCESSOR_ARCHITECTURE -eq \"AMD64\")\r\n{\r\n    $DumpIt = \"$SCRIPT_DIR\\Tools\\DumpIt\\x64\\DumpIt.exe\"\r\n}\r\n\r\n# x86\r\nif ($env:PROCESSOR_ARCHITECTURE -eq \"x86\")\r\n{\r\n    $DumpIt = \"$SCRIPT_DIR\\Tools\\DumpIt\\x86\\DumpIt.exe\"\r\n}\r\n\r\n# Magnet Forensics Encrypted Disk Detector (EDD)\r\n$EDD = \"$SCRIPT_DIR\\Tools\\EDD\\EDDv310.exe\"\r\n\r\n# Magnet RAM Capture (MRC)\r\n$MRC = \"$SCRIPT_DIR\\Tools\\MRC\\MRCv120.exe\"\r\n\r\n# Magnet RESPONSE\r\n$MagnetRESPONSE = \"$SCRIPT_DIR\\Tools\\MagnetRESPONSE\\MagnetRESPONSE.exe\"\r\n\r\n# PsLoggedOn\r\n\r\n# x64\r\nif ($env:PROCESSOR_ARCHITECTURE -eq \"AMD64\")\r\n{\r\n    $PsLoggedOn = \"$SCRIPT_DIR\\Tools\\PsLoggedOn\\PsLoggedon64.exe\"\r\n}\r\n\r\n# x86\r\nif ($env:PROCESSOR_ARCHITECTURE -eq \"x86\")\r\n{\r\n    $PsLoggedOn = \"$SCRIPT_DIR\\Tools\\PsLoggedOn\\PsLoggedon.exe\"\r\n}\r\n\r\n# WinPMEM\r\n\r\n# x64\r\nif ($env:PROCESSOR_ARCHITECTURE -eq \"AMD64\")\r\n{\r\n    $WinPMEM = \"$SCRIPT_DIR\\Tools\\WinPMEM\\winpmem_mini_x64_rc2.exe\"\r\n}\r\n\r\n# x86\r\nif ($env:PROCESSOR_ARCHITECTURE -eq \"x86\")\r\n{\r\n    $WinPMEM = \"$SCRIPT_DIR\\Tools\\WinPMEM\\winpmem_mini_x86.exe\"\r\n}\r\n\r\n# Secure Archive Password\r\n$PASSWORD = \"IncidentResponse\"\r\n\r\n#endregion Declarations\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region Header\r\n\r\n# Check if the PowerShell script is being run with admin rights\r\nif (!([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))\r\n{\r\n    Write-Output \"[Error] This PowerShell script must be run with admin rights.\"\r\n    Exit\r\n}\r\n\r\n# Check if the PowerShell script is being run in Windows PowerShell ISE\r\nif ($psISE)\r\n{\r\n    Write-Output \"[Error] This PowerShell script must be run in Windows PowerShell.\"\r\n    Exit\r\n}\r\n\r\n# Check if the PowerShell script is being run in PowerShell Core\r\nif ($PSVersionTable.PSEdition -eq \"Core\")\r\n{\r\n    Write-Output \"[Error] This PowerShell script must be run in Windows PowerShell.\"\r\n    Exit\r\n}\r\n\r\n# Windows Title\r\n$script:DefaultWindowsTitle = $Host.UI.RawUI.WindowTitle\r\n$Host.UI.RawUI.WindowTitle = \"Collect-MemoryDump v1.1.0 - Automated Creation of Windows Memory Snapshots for DFIR\"\r\n\r\n# Add the required MessageBox class (Windows PowerShell)\r\nAdd-Type -AssemblyName System.Windows.Forms\r\n\r\n# Function Get-FileSize\r\nFunction script:Get-FileSize() {\r\n    Param ([long]$Length)\r\n    if ($Length -gt 1TB) {[string]::Format(\"{0:0.00} TB\", $Length / 1TB)}\r\n    elseIf ($Length -gt 1GB) {[string]::Format(\"{0:0.00} GB\", $Length / 1GB)}\r\n    elseIf ($Length -gt 1MB) {[string]::Format(\"{0:0.00} MB\", $Length / 1MB)}\r\n    elseIf ($Length -gt 1KB) {[string]::Format(\"{0:0.00} KB\", $Length / 1KB)}\r\n    elseIf ($Length -gt 0) {[string]::Format(\"{0:0.00} Bytes\", $Length)}\r\n    else {\"\"}\r\n}\r\n\r\n# Function Test-RegistryValue\r\nFunction Test-RegistryValue\r\n{\r\n    param([string]$Path,[string]$Value)\r\n    $ValueExist = $null -ne (Get-ItemProperty $Path).$Value\r\n    Return $ValueExist\r\n}\r\n\r\n# Get Start Time\r\n$StartTime = (Get-Date)\r\n\r\n# Creating Output Directory\r\nNew-Item \"$OUTPUT_FOLDER\" -ItemType Directory -Force | Out-Null\r\n\r\n# Logo\r\n$Logo = @\"\r\n██╗     ███████╗████████╗██╗  ██╗ █████╗ ██╗      ███████╗ ██████╗ ██████╗ ███████╗███╗   ██╗███████╗██╗ ██████╗███████╗\r\n██║     ██╔════╝╚══██╔══╝██║  ██║██╔══██╗██║      ██╔════╝██╔═══██╗██╔══██╗██╔════╝████╗  ██║██╔════╝██║██╔════╝██╔════╝\r\n██║     █████╗     ██║   ███████║███████║██║█████╗█████╗  ██║   ██║██████╔╝█████╗  ██╔██╗ ██║███████╗██║██║     ███████╗\r\n██║     ██╔══╝     ██║   ██╔══██║██╔══██║██║╚════╝██╔══╝  ██║   ██║██╔══██╗██╔══╝  ██║╚██╗██║╚════██║██║██║     ╚════██║\r\n███████╗███████╗   ██║   ██║  ██║██║  ██║███████╗ ██║     ╚██████╔╝██║  ██║███████╗██║ ╚████║███████║██║╚██████╗███████║\r\n╚══════╝╚══════╝   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝ ╚═╝      ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚══════╝╚═╝ ╚═════╝╚══════╝\r\n\"@\r\n\r\nWrite-Output \"\"\r\nWrite-Output \"$Logo\"\r\nWrite-Output \"\"\r\n\r\nWrite-Output \"\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\nWrite-Output \"$Logo\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\nWrite-Output \"\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n# Header\r\nWrite-Output \"Collect-MemoryDump v1.1.0 - Automated Creation of Windows Memory Snapshots for DFIR\"\r\nWrite-Output \"$([char]0x00A9) 2025 Martin Willing at Lethal-Forensics (https://lethal-forensics.com/)\"\r\nWrite-Output \"\"\r\n\r\nWrite-Output \"Collect-MemoryDump v1.1.0 - Automated Creation of Windows Memory Snapshots for DFIR\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\nWrite-Output \"$([char]0x00A9) 2025 Martin Willing at Lethal-Forensics (https://lethal-forensics.com/)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\nWrite-Output \"\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n# Acquisition date (ISO 8601)\r\n$AcquisitionStartTime = $Date -replace \"T\", \" \" # YYYY-MM-DD hh:mm:ss\r\nWrite-Output \"Acquisition date: $AcquisitionStartTime UTC\"\r\nWrite-Output \"\"\r\n\r\nWrite-Output \"Acquisition date: $AcquisitionStartTime UTC\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\nWrite-Output \"\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n# Hostname\r\nWrite-Output \"[Info]  Host Name: $env:COMPUTERNAME\"\r\nWrite-Output \"[Info]  Host Name: $env:COMPUTERNAME\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n#endregion Header\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region Pagefile\r\n\r\n# Note: Save the pagefile.sys file immediately after capturing RAM.\r\n\r\nFunction Get-Pagefile\r\n{\r\n    # Magnet RESPONSE\r\n    if (Test-Path \"$MagnetRESPONSE\") \r\n    {\r\n        # Verify File Integrity\r\n        $certUtil = \"$env:SystemDrive\\Windows\\System32\\certutil.exe\"\r\n        $MD5 = (((& $certUtil -hashfile \"$MagnetRESPONSE\" MD5) -replace '\\s', '' | Select-String -Pattern \"^[0-9a-f]{32}$\" | Out-String).Trim()).ToUpper()\r\n\r\n        if ($MD5 -eq \"2A3BA98713A243F90CD0582C64F13CFB\")\r\n        {\r\n            # PageFileInfo\r\n            New-Item \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\" -ItemType Directory -Force | Out-Null\r\n\r\n            # AutomaticManagedPagefile\r\n            [string]$AutomaticManagedPagefile = (Get-WmiObject -Class Win32_ComputerSystem -Namespace 'root\\cimv2' | Select-Object AutomaticManagedPagefile).AutomaticManagedPagefile\r\n\r\n            # Automatically manage paging file size for all drives\r\n            if ($AutomaticManagedPagefile -eq \"True\")\r\n            {\r\n                Write-Output \"[Info]  AutomaticManagedPagefile: True (Default: True)\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\AutomaticManagedPagefile.txt\"\r\n                Write-Output \"        Note: The automatic system page file management is enabled for all drives.\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\AutomaticManagedPagefile.txt\" -Append\r\n            }\r\n\r\n            # Custom size, System managed size, No paging file\r\n            if ($AutomaticManagedPagefile -eq \"False\")\r\n            {\r\n                Write-Output \"[Info]  AutomaticManagedPagefile: False (Default: True)\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\AutomaticManagedPagefile.txt\"\r\n                Write-Output \"        Note: It seems that the automatic system page file management is disabled (for all drives).\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\AutomaticManagedPagefile.txt\" -Append\r\n            }\r\n\r\n            # DisablePagingExecutive - Specifies whether kernel-mode drivers and kernel-mode system code can be paged to disk when not in use (Default Value: 0).\r\n            $CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\n            $DisablePagingExecutive = (Get-ItemProperty \"HKLM:\\System\\ControlSet00$CurrentControlSet\\Control\\Session Manager\\Memory Management\" -Name DisablePagingExecutive).DisablePagingExecutive\r\n\r\n            if ($DisablePagingExecutive -eq \"0\")\r\n            {\r\n                Write-Output \"[Info]  DisablePagingExecutive: 0 (Default Value: 0)\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\DisablePagingExecutive.txt\"\r\n                Write-Output \"        Note: Drivers and system code can be paged to disk as needed.\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\DisablePagingExecutive.txt\" -Append\r\n            }\r\n\r\n            if ($DisablePagingExecutive -eq \"1\")\r\n            {\r\n                Write-Output \"[Info]  DisablePagingExecutive: 1 (Default Value: 0)\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\DisablePagingExecutive.txt\"\r\n                Write-Output \"        Note: Drivers and system code must remain in physical memory.\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\DisablePagingExecutive.txt\" -Append\r\n            }\r\n\r\n            # NTFS Pagefile Encryption --> Encrypting File System (EFS) \r\n            $CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\n            $NtfsEncryptPagingFile = (Get-ItemProperty \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Control\\FileSystem\" -Name NtfsEncryptPagingFile).NtfsEncryptPagingFile\r\n\r\n            switch($NtfsEncryptPagingFile) \r\n            {\r\n                \"0\" { $PagefileEncryption = \"Disabled\" }\r\n                \"1\" { $PagefileEncryption = \"Enabled\" }\r\n            }\r\n\r\n            Write-Output \"[Info]  NTFS Pagefile Encryption: $PagefileEncryption\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\NtfsEncryptPagingFile.txt\"\r\n\r\n            # ExistingPageFiles (REG_MULTI_SZ)\r\n            $CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\n            (Get-ItemProperty \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Control\\Session Manager\\Memory Management\" -Name ExistingPageFiles).ExistingPageFiles | ForEach-Object{($_ -replace \"^\\\\\\?\\?\\\\\",\"\")} | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\ExistingPageFiles.txt\"\r\n\r\n            # PagingFiles (REG_MULTI_SZ)\r\n            $CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\n            (Get-ItemProperty \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Control\\Session Manager\\Memory Management\" -Name PagingFiles).PagingFiles | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\PagingFiles.txt\"\r\n\r\n            # PagefileOnOsVolume\r\n            $CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\n            \r\n            if (Test-RegistryValue -Path \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Control\\Session Manager\\Memory Management\" -Value \"PagefileOnOsVolume\")\r\n            {\r\n                $PagefileOnOsVolume = (Get-ItemProperty \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Control\\Session Manager\\Memory Management\" -Name PagefileOnOsVolume).PagefileOnOsVolume\r\n                Write-Output \"$PagefileOnOsVolume\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\PagefileOnOsVolume.txt\"\r\n            }\r\n\r\n            # ClearPageFileAtShutdown - Specifies whether inactive pages in the paging file are filled with zeros when the system stops (Default Value: 0).\r\n            $CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\n            $ClearPageFileAtShutdown = (Get-ItemProperty \"HKLM:\\System\\ControlSet00$CurrentControlSet\\Control\\Session Manager\\Memory Management\" -Name ClearPageFileAtShutdown).ClearPageFileAtShutdown\r\n\r\n            if ($ClearPageFileAtShutdown -eq \"0\")\r\n            {\r\n                Write-Output \"[Info]  ClearPageFileAtShutdown: 0 (Default Value: 0)\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\ClearPageFileAtShutdown.txt\"\r\n                Write-Output \"        Note: Inactive pages are not filled with zeros.\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\ClearPageFileAtShutdown.txt\" -Append\r\n            }\r\n\r\n            if ($ClearPageFileAtShutdown -eq \"1\")\r\n            {\r\n                Write-Output \"[Info]  ClearPageFileAtShutdown: 1 (Default Value: 0)\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\ClearPageFileAtShutdown.txt\"\r\n                Write-Output \"        Note: Inactive pages are filled with zeros.\" | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\ClearPageFileAtShutdown.txt\" -Append\r\n            }\r\n\r\n            # Check if it is an Array --> Multiple Pagefiles\r\n            $PageFileList = Get-WmiObject -Class Win32_PageFile\r\n\r\n            if ($PageFileList -is [array])\r\n            {\r\n                # Count Pagefiles\r\n                # Note: Windows supports up to 16 paging files; however, normally only one is used.\r\n                $Count = $PageFileList.Length\r\n                if ($Count -gt 0)\r\n                {\r\n                    Write-Output \"[Info]  $Count Page File(s) found\"\r\n                    Write-Output \"[Info]  $Count Page File(s) found\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n                else\r\n                {\r\n                    Write-Output \"[Info]  No Page File found\"\r\n                }\r\n\r\n                $i = 1\r\n\r\n                foreach ($PageFile in $PageFileList)\r\n                {\r\n                    # Name\r\n                    $Name = ($PageFile | Select-Object -Property Name).Name\r\n\r\n                    # File Size\r\n                    $Bytes = ($PageFile | Select-Object -Property FileSize).FileSize\r\n                    $FileSize = Get-FileSize($Bytes)\r\n\r\n                    Write-Output \"[Info]  Pagefile #$i`: $Name [$FileSize]\"\r\n                    Write-Output \"[Info]  Pagefile #$i`: $Name [$FileSize]\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                    $i += 1\r\n                }\r\n            }\r\n            else\r\n            {\r\n                # Name\r\n                $Name = (Get-WmiObject -Class Win32_PageFileUsage | Select-Object -Property Name).Name\r\n                Write-Output \"[Info]  Pagefile Name: $Name\"\r\n                Write-Output \"[Info]  PageFile Name: $Name\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                # File Size\r\n                $AllocatedBaseSize = (Get-WmiObject -Class Win32_PageFileUsage | Select-Object -Property AllocatedBaseSize).AllocatedBaseSize\r\n                $Length = ($AllocatedBaseSize*1024*1024)\r\n                $FileSize = Get-FileSize($Length)\r\n                Write-Output \"[Info]  Pagefile Size: $FileSize\"\r\n                Write-Output \"[Info]  Pagefile Size: $FileSize\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n\r\n            # Collecting Pagefile(s)\r\n\r\n            # .NET 4.0 Framework\r\n            if (Test-Path \"HKLM:SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\")\r\n            {\r\n                Write-Output \"[Info]  Collecting Pagefile(s) [approx. 1-20 min] ...\"\r\n                Write-Output \"[Info]  Collecting Pagefile(s) [approx. 1-20 min] ...\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                $StartTime_MagnetRESPONSE = (Get-Date)\r\n                & $MagnetRESPONSE /accepteula /nodiagnosticdata /unattended /caseref:\"Collect-MemoryDump-v1.1.0\" /output:\"$OUTPUT_FOLDER\\Memory\\Pagefile\" /capturepagefile /capturevolatile /captureextendedprocessinfo /saveprocfiles\r\n                Wait-Process -Name \"MagnetRESPONSE\"\r\n                Start-Sleep -Seconds 1\r\n                $EndTime_MagnetRESPONSE = (Get-Date)\r\n                $Time_MagnetRESPONSE = ($EndTime_MagnetRESPONSE-$StartTime_MagnetRESPONSE)\r\n                ('Pagefile Collection duration: {0} h {1} min {2} sec' -f $Time_MagnetRESPONSE.Hours, $Time_MagnetRESPONSE.Minutes, $Time_MagnetRESPONSE.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\Pagefile\\Stats.txt\"\r\n\r\n                # Rename Archive\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Memory\\Pagefile\\*\\*.zip\")\r\n                {\r\n                    Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\Pagefile\\*\\*.zip\" | Rename-Item -NewName {\"$env:COMPUTERNAME.zip\"}\r\n                }\r\n\r\n                # Rename Directory\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Memory\\Pagefile\\*\\*.zip\")\r\n                {\r\n                    Get-ChildItem \"$OUTPUT_FOLDER\\Memory\\Pagefile\" | Where-Object {($_.FullName -match \"MagnetRESPONSE\")} | Rename-Item -NewName {\"Pagefile\"}\r\n                }\r\n\r\n                # MD5 Calculation\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Memory\\Pagefile\\Pagefile\\$env:COMPUTERNAME.zip\") \r\n                {\r\n                    if (Get-Command Get-FileHash -ErrorAction SilentlyContinue)\r\n                    {\r\n                        Write-Output \"[Info]  Calculating MD5 checksum of $env:COMPUTERNAME.zip [approx. 1-2 min] ...\"\r\n                        Write-Output \"[Info]  Calculating MD5 checksum of $env:COMPUTERNAME.zip [approx. 1-2 min] ...\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                        $StartTime_MD5 = (Get-Date)\r\n                        $MD5 = (Get-FileHash -LiteralPath \"$OUTPUT_FOLDER\\Memory\\Pagefile\\Pagefile\\$env:COMPUTERNAME.zip\" -Algorithm MD5).Hash\r\n                        Write-Output \"[Info]  MD5 Hash: $MD5\"\r\n                        Write-Output \"[Info]  MD5 Hash: $MD5\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                        $MD5 > \"$OUTPUT_FOLDER\\Memory\\Pagefile\\Pagefile\\MD5.txt\"\r\n                        $EndTime_MD5 = (Get-Date)\r\n                        $Time_MD5 = ($EndTime_MD5-$StartTime_MD5)\r\n                        ('MD5 Calculation duration:     {0} h {1} min {2} sec' -f $Time_MD5.Hours, $Time_MD5.Minutes, $Time_MD5.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\Pagefile\\Stats.txt\"\r\n                    }\r\n                }\r\n\r\n                # Get File Size of \"$env:COMPUTERNAME.zip\"\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Memory\\Pagefile\\Pagefile\\$env:COMPUTERNAME.zip\") \r\n                {\r\n                    $Length = $Length = (Get-Item -Path \"$OUTPUT_FOLDER\\Memory\\Pagefile\\Pagefile\\$env:COMPUTERNAME.zip\").Length\r\n                    $Size = Get-FileSize($Length)\r\n                    Write-Output \"[Info]  Archive Size: $Size\"\r\n                    Write-Output \"[Info]  Archive Size: $Size\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n\r\n                # Create Time (ISO 8601)\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Memory\\Pagefile\\Pagefile\\$env:COMPUTERNAME.zip\") \r\n                {\r\n                    $CreationTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Memory\\Pagefile\\Pagefile\\$env:COMPUTERNAME.zip\").CreationTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\"\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n\r\n                # Last Modified Time (ISO 8601)\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Memory\\Pagefile\\Pagefile\\$env:COMPUTERNAME.zip\") \r\n                {\r\n                    $LastWriteTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Memory\\Pagefile\\Pagefile\\$env:COMPUTERNAME.zip\").LastWriteTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\"\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Write-Output \"[Error] NET Framework v4 NOT found. Pagefile Collection will be skipped ...\"\r\n                Write-Output \"[Error] NET Framework v4 NOT found. Pagefile Collection will be skipped ...\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n\r\n            # WMI Classes\r\n\r\n            # Win32_PageFileUsage\r\n            $PageFileList = Get-WmiObject -Class Win32_PageFile\r\n\r\n            if ($PageFileList -is [array])\r\n            {\r\n                $PageFileList = Get-WmiObject -Class Win32_PageFileUsage\r\n\r\n                $i = 1\r\n\r\n                foreach ($PageFile in $PageFileList)\r\n                {\r\n                    $Name              = ($PageFile | Select-Object -Property Name).Name\r\n                    $InstallDateString = ($PageFile | Select-Object InstallDate).InstallDate\r\n                    $InstallDate       = ([Management.ManagementDateTimeConverter]::ToDateTime(\"$InstallDateString\")).ToUniversalTime()\r\n                    $AllocatedBaseSize = ($PageFile | Select-Object -Property AllocatedBaseSize).AllocatedBaseSize\r\n                    $CurrentUsage      = ($PageFile | Select-Object -Property CurrentUsage).CurrentUsage\r\n                    $PeakUsage         = ($PageFile | Select-Object -Property PeakUsage).PeakUsage\r\n                    $TempPageFile      = ($PageFile | Select-Object -Property TempPageFile).TempPageFile\r\n\r\n                    $Win32_PageFileUsage  = [PSCustomObject]@{\r\n                    \"Pagefile #$i\"        = $Name\r\n                    \"Install Date\"        = ($InstallDate).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    \"Allocated Base Size\" = \"$AllocatedBaseSize MB\"\r\n                    \"Current Usage\"       = \"$CurrentUsage MB\"\r\n                    \"Peak Usage\"          = \"$PeakUsage MB\"\r\n                    \"Temp Page File\"      = $TempPageFile\r\n                    }\r\n\r\n                    ($Win32_PageFileUsage | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\Win32_PageFileUsage_Pagefile-$i.txt\"\r\n\r\n                $i += 1\r\n\r\n                }\r\n            }\r\n            else\r\n            {\r\n                $PageFile          = Get-WmiObject -Class Win32_PageFileUsage\r\n                $Name              = ($PageFile | Select-Object -Property Name).Name\r\n                $InstallDateString = ($PageFile | Select-Object InstallDate).InstallDate\r\n                $InstallDate       = ([Management.ManagementDateTimeConverter]::ToDateTime(\"$InstallDateString\")).ToUniversalTime()\r\n                $AllocatedBaseSize = ($PageFile | Select-Object -Property AllocatedBaseSize).AllocatedBaseSize\r\n                $CurrentUsage      = ($PageFile | Select-Object -Property CurrentUsage).CurrentUsage\r\n                $PeakUsage         = ($PageFile | Select-Object -Property PeakUsage).PeakUsage\r\n                $TempPageFile      = ($PageFile | Select-Object -Property TempPageFile).TempPageFile\r\n\r\n                $Win32_PageFileUsage  = [PSCustomObject]@{\r\n                \"Pagefile    \"        = $Name\r\n                \"Install Date\"        = ($InstallDate).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                \"Allocated Base Size\" = \"$AllocatedBaseSize MB\"\r\n                \"Current Usage\"       = \"$CurrentUsage MB\"\r\n                \"Peak Usage\"          = \"$PeakUsage MB\"\r\n                \"Temp Page File\"      = $TempPageFile\r\n                }\r\n\r\n                ($Win32_PageFileUsage | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\Win32_PageFileUsage.txt\"\r\n            }\r\n\r\n            # Win32_PageFileSetting\r\n            [string]$AutoManaged = $null -eq (Get-WmiObject -Class Win32_PageFile)\r\n\r\n            if ($AutoManaged -eq \"False\")\r\n            {\r\n                $PageFileList = Get-WmiObject -Class Win32_PageFileSetting\r\n\r\n                if ($PageFileList -is [array])\r\n                {\r\n                    $i = 1\r\n\r\n                    foreach ($PageFile in $PageFileList)\r\n                    {\r\n                        $Name        = $PageFile.Name\r\n                        $InitialSize = $PageFile.InitialSize\r\n                        $MaximumSize = $PageFile.MaximumSize\r\n\r\n                        $Win32_PageFileSetting = [PSCustomObject]@{\r\n                        \"Pagefile #$i\"         = $Name\r\n                        \"Initial Size\"         = \"$InitialSize MB\"\r\n                        \"Maximum Size\"         = \"$MaximumSize MB\"\r\n                        }\r\n\r\n                        ($Win32_PageFileSetting | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\Win32_PageFileSetting_Pagefile-$i.txt\"\r\n\r\n                    $i += 1\r\n\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    $PageFile    = Get-WmiObject -Class Win32_PageFileSetting\r\n                    $Name        = $PageFile.Name\r\n                    $InitialSize = $PageFile.InitialSize\r\n                    $MaximumSize = $PageFile.MaximumSize\r\n\r\n                    $Win32_PageFileSetting = [PSCustomObject]@{\r\n                    \"Pagefile\"             = $Name\r\n                    \"Initial Size\"         = \"$InitialSize MB\"\r\n                    \"Maximum Size\"         = \"$MaximumSize MB\"\r\n                    }\r\n\r\n                    ($Win32_PageFileSetting | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\Win32_PageFileSetting.txt\"\r\n                }\r\n            }\r\n\r\n            # Win32_PageFile\r\n            [string]$AutoManaged = $null -eq (Get-WmiObject -Class Win32_PageFile)\r\n\r\n            if ($AutoManaged -eq \"False\")\r\n            {\r\n                $PageFileList = Get-WmiObject -Class Win32_PageFile\r\n\r\n                if ($PageFileList -is [array])\r\n                {\r\n                    $i = 1\r\n\r\n                    foreach ($PageFile in $PageFileList)\r\n                    {\r\n                        $Name               = $PageFile.Name\r\n                        $Compressed         = $PageFile.Compressed\r\n                        $CompressionMethod  = $PageFile.CompressionMethod\r\n                        $CreationDateString = ($PageFile | Select-Object CreationDate).CreationDate\r\n                        $CreationDate       = ([Management.ManagementDateTimeConverter]::ToDateTime(\"$CreationDateString\")).ToUniversalTime()\r\n                        $Encrypted          = $PageFile.Encrypted\r\n                        $EncryptionMethod   = $PageFile.EncryptionMethod\r\n                        $FileSize           = $PageFile.FileSize\r\n                        $InitialSize        = $PageFile.InitialSize\r\n                        $InstallDateString  = $PageFile.InstallDate\r\n                        $InstallDate        = ([Management.ManagementDateTimeConverter]::ToDateTime(\"$InstallDateString\")).ToUniversalTime()\r\n                        $LastAccessedString = $PageFile.LastAccessed\r\n                        $LastAccessed       = ([Management.ManagementDateTimeConverter]::ToDateTime(\"$LastAccessedString\")).ToUniversalTime()\r\n                        $LastModifiedString = $PageFile.LastModified\r\n                        $LastModified       = ([Management.ManagementDateTimeConverter]::ToDateTime(\"$LastModifiedString\")).ToUniversalTime()\r\n                        $MaximumSize        = $PageFile.MaximumSize\r\n\r\n                        $Win32_PageFile     = [PSCustomObject]@{\r\n                        \"Pagefile\"          = $Name\r\n                        \"Compressed\"        = $Compressed\r\n                        \"CompressionMethod\" = $CompressionMethod\r\n                        \"CreationDate\"      = ($CreationDate).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                        \"Encrypted\"         = $Encrypted\r\n                        \"EncryptionMethod\"  = $EncryptionMethod\r\n                        \"FileSize\"          = $FileSize\r\n                        \"Initial Size\"      = \"$InitialSize MB\"\r\n                        \"InstallDate\"       = ($InstallDate).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                        \"LastAccessed\"      = ($LastAccessed).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                        \"LastModified\"      = ($LastModified).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                        \"MaximumSize\"       = \"$MaximumSize MB\"\r\n                        }\r\n\r\n                        ($Win32_PageFile | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\Win32_PageFile_Pagefile-$i.txt\"\r\n\r\n                        $i += 1\r\n\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    $PageFile           = Get-WmiObject -Class Win32_Pagefile\r\n                    $Name               = $PageFile.Name\r\n                    $Compressed         = $PageFile.Compressed\r\n                    $CompressionMethod  = $PageFile.CompressionMethod\r\n                    $CreationDateString = ($PageFile | Select-Object CreationDate).CreationDate\r\n                    $CreationDate       = ([Management.ManagementDateTimeConverter]::ToDateTime(\"$CreationDateString\")).ToUniversalTime()\r\n                    $Encrypted          = $PageFile.Encrypted\r\n                    $EncryptionMethod   = $PageFile.EncryptionMethod\r\n                    $FileSize           = $PageFile.FileSize\r\n                    $InitialSize        = $PageFile.InitialSize\r\n                    $InstallDateString  = $PageFile.InstallDate\r\n                    $InstallDate        = ([Management.ManagementDateTimeConverter]::ToDateTime(\"$InstallDateString\")).ToUniversalTime()\r\n                    $LastAccessedString = $PageFile.LastAccessed\r\n                    $LastAccessed       = ([Management.ManagementDateTimeConverter]::ToDateTime(\"$LastAccessedString\")).ToUniversalTime()\r\n                    $LastModifiedString = $PageFile.LastModified\r\n                    $LastModified       = ([Management.ManagementDateTimeConverter]::ToDateTime(\"$LastModifiedString\")).ToUniversalTime()\r\n                    $MaximumSize        = $PageFile.MaximumSize\r\n\r\n                    $Win32_PageFile     = [PSCustomObject]@{\r\n                    \"Pagefile\"          = $Name\r\n                    \"Compressed\"        = $Compressed\r\n                    \"CompressionMethod\" = $CompressionMethod\r\n                    \"CreationDate\"      = ($CreationDate).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    \"Encrypted\"         = $Encrypted\r\n                    \"EncryptionMethod\"  = $EncryptionMethod\r\n                    \"FileSize\"          = $FileSize\r\n                    \"Initial Size\"      = \"$InitialSize MB\"\r\n                    \"InstallDate\"       = ($InstallDate).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    \"LastAccessed\"      = ($LastAccessed).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    \"LastModified\"      = ($LastModified).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    \"MaximumSize\"       = \"$MaximumSize MB\"\r\n                    }\r\n\r\n                    ($Win32_PageFile | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\Memory\\Pagefile\\PageFileInfo\\Win32_PageFile.txt\"\r\n                } \r\n            }\r\n        }\r\n        else\r\n        {\r\n            Write-Output \"[Error] File Hash does NOT match.\"\r\n            Write-Output \"[Error] File Hash does NOT match.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n            Exit\r\n        }\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Error] MagnetRESPONSE.exe NOT found.\"\r\n        Write-Output \"[Error] MagnetRESPONSE.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n        Exit\r\n    }\r\n}\r\n\r\n#endregion Pagefile\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region Triage\r\n\r\n# Collects the following files/locations:\r# - Amcache data\r# - AnyDesk Logs\r\n# - Chrome Browser History\r\n# - Edge Browser History\r# - Firefox Browser History\r\n# - Firewall Logs\r# - Jumplist files\r\n# - LogMeIn Logs\r\n# - Master File Table ($MFT)\r# - NTUSER.DAT files\r\n# - PowerShell history\r\n# - Prefetch files\r# - Program Compatibility Assistant files\r# - Recent Link files\r\n# - Recycle Bin\r\n# - Registry Hives\r# - Scheduled Tasks\r\n# - SRUM data\r\n# - TeamViewer Logs\r\n# - UsrClass.dat files\r\n# - Windows Event Logs\r\n# - Windows Timeline data\r\n\r\nFunction Get-Triage\r\n{\r\n    # Magnet RESPONSE\r\n    if (Test-Path \"$MagnetRESPONSE\") \r\n    {\r\n        # Verify File Integrity\r\n        $certUtil = \"$env:SystemDrive\\Windows\\System32\\certutil.exe\"\r\n        $MD5 = (((& $certUtil -hashfile \"$MagnetRESPONSE\" MD5) -replace '\\s', '' | Select-String -Pattern \"^[0-9a-f]{32}$\" | Out-String).Trim()).ToUpper()\r\n\r\n        if ($MD5 -eq \"2A3BA98713A243F90CD0582C64F13CFB\")\r\n        {\r\n            # Triage\r\n            New-Item \"$OUTPUT_FOLDER\\Triage\" -ItemType Directory -Force | Out-Null\r\n\r\n            # Collecting Artifacts\r\n\r\n            # .NET 4.0 Framework\r\n            if (Test-Path \"HKLM:SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\")\r\n            {\r\n                Write-Output \"[Info]  Collecting Forensic Artifacts [approx. 1-15 min] ... \"\r\n                Write-Output \"[Info]  Collecting Forensic Artifacts [approx. 1-15 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                $StartTime_Triage = (Get-Date)\r\n                & $MagnetRESPONSE /accepteula /nodiagnosticdata /unattended /caseref:\"Collect-MemoryDump-v1.1.0\" /output:\"$OUTPUT_FOLDER\\Triage\" /capturesystemfiles /saveprocfiles\r\n                Wait-Process -Name \"MagnetRESPONSE\"\r\n                Start-Sleep -Seconds 1\r\n                $EndTime_Triage = (Get-Date)\r\n                $Time_Triage = ($EndTime_Triage-$StartTime_Triage)\r\n                ('Triage Collection duration: {0} h {1} min {2} sec' -f $Time_Triage.Hours, $Time_Triage.Minutes, $Time_Triage.Seconds) >> \"$OUTPUT_FOLDER\\Triage\\Stats.txt\"\r\n\r\n                # Rename Archive\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Triage\\*\\*.zip\")\r\n                {\r\n                    Get-ChildItem -Path \"$OUTPUT_FOLDER\\Triage\\*\\*.zip\" | Rename-Item -NewName {\"$env:COMPUTERNAME.zip\"}\r\n                }\r\n\r\n                # Rename Directory\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Triage\\*\\*.zip\")\r\n                {\r\n                    Get-ChildItem \"$OUTPUT_FOLDER\\Triage\" | Where-Object {($_.FullName -match \"MagnetRESPONSE\")} | Rename-Item -NewName {\"Artifacts\"}\r\n                }\r\n\r\n                # MD5 Calculation\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Triage\\Artifacts\\$env:COMPUTERNAME.zip\") \r\n                {\r\n                    if (Get-Command Get-FileHash -ErrorAction SilentlyContinue)\r\n                    {\r\n                        Write-Output \"[Info]  Calculating MD5 checksum of $env:COMPUTERNAME.zip [approx. 1-2 min] ... \"\r\n                        Write-Output \"[Info]  Calculating MD5 checksum of $env:COMPUTERNAME.zip [approx. 1-2 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                        $StartTime_MD5 = (Get-Date)\r\n                        $MD5 = (Get-FileHash -LiteralPath \"$OUTPUT_FOLDER\\Triage\\Artifacts\\$env:COMPUTERNAME.zip\" -Algorithm MD5).Hash\r\n                        Write-Output \"[Info]  MD5 Hash: $MD5\"\r\n                        Write-Output \"[Info]  MD5 Hash: $MD5\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                        $MD5 > \"$OUTPUT_FOLDER\\Triage\\Artifacts\\MD5.txt\"\r\n                        $EndTime_MD5 = (Get-Date)\r\n                        $Time_MD5 = ($EndTime_MD5-$StartTime_MD5)\r\n                        ('MD5 Calculation duration:   {0} h {1} min {2} sec' -f $Time_MD5.Hours, $Time_MD5.Minutes, $Time_MD5.Seconds) >> \"$OUTPUT_FOLDER\\Triage\\Stats.txt\"\r\n                    }\r\n                }\r\n\r\n                # Get File Size of \"$env:COMPUTERNAME.zip\"\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Triage\\Artifacts\\$env:COMPUTERNAME.zip\") \r\n                {\r\n                    $Length = $Length = (Get-Item -Path \"$OUTPUT_FOLDER\\Triage\\Artifacts\\$env:COMPUTERNAME.zip\").Length\r\n                    $Size = Get-FileSize($Length)\r\n                    Write-Output \"[Info]  Archive Size: $Size\"\r\n                    Write-Output \"[Info]  Archive Size: $Size\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n\r\n                # Create Time (ISO 8601)\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Triage\\Artifacts\\$env:COMPUTERNAME.zip\") \r\n                {\r\n                    $CreationTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Triage\\Artifacts\\$env:COMPUTERNAME.zip\").CreationTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\"\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n\r\n                # Last Modified Time (ISO 8601)\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Triage\\Artifacts\\$env:COMPUTERNAME.zip\") \r\n                {\r\n                    $LastWriteTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Triage\\Artifacts\\$env:COMPUTERNAME.zip\").LastWriteTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\"\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Write-Output \"[Error] NET Framework v4 NOT found. Triage Collection will be skipped ...\"\r\n                Write-Output \"[Error] NET Framework v4 NOT found. Triage Collection will be skipped ...\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n        }\r\n        else\r\n        {\r\n            Write-Output \"[Error] File Hash does NOT match.\"\r\n            Write-Output \"[Error] File Hash does NOT match.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n            Exit\r\n        }\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Error] MagnetRESPONSE.exe NOT found.\"\r\n        Write-Output \"[Error] MagnetRESPONSE.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n        Exit\r\n    }\r\n}\r\n\r\n#endregion Triage\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region Comae\r\n\r\nFunction New-ComaeSnapshot\r\n{\r\n    # DumpIt\r\n    if (Test-Path \"$DumpIt\") \r\n    {\r\n        # Verify File Integrity\r\n        $certUtil = \"$env:SystemDrive\\Windows\\System32\\certutil.exe\"\r\n        $MD5 = (((& $certUtil -hashfile \"$DumpIt\" MD5) -replace '\\s', '' | Select-String -Pattern \"^[0-9a-f]{32}$\" | Out-String).Trim()).ToUpper()\r\n\r\n        # ARM64 or x64 or x86\r\n        if (($MD5 -eq \"4B39D63B86FFE39BBAE0415C400003C7\") -Or ($MD5 -eq \"0F10DA3A5EB49D17D73D8E195FE32F85\") -OR ($MD5 -eq \"586C57AD0EEA179FCAE4B8BA117F2AB9\"))\r\n        {\r\n            # Get Physical Memory Size\r\n            if ($PSVersionTable.PSVersion.Major -ge 3)\r\n            {\r\n                $TotalMemory = Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum | ForEach-Object {\"{0}\" -f ([math]::round(($_.Sum / 1GB)))}\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\"\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n            else\r\n            {\r\n                $TotalMemory = Get-WmiObject Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum | ForEach-Object {\"{0}\" -f ([math]::round(($_.Sum / 1GB)))}\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\"\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n\r\n            # Check Available Space (GB)\r\n            $DriveLetter = \"$SCRIPT_DIR\".Substring(0,2)\r\n            $AvailableSpace = (Get-WmiObject -Class Win32_LogicalDisk -Filter \"deviceid='$DriveLetter'\" | Select-Object FreeSpace).FreeSpace | ForEach-Object {\"{0}\" -f ([math]::round(($_ / 1GB)))}\r\n            \r\n            [int]$TotalMemoryInt32 = [convert]::ToInt32($TotalMemory, 10)\r\n            [int]$AvailableSpaceInt32 = [convert]::ToInt32($AvailableSpace, 10)\r\n            [int]$AdditionalSpaceInt32 = ($TotalMemoryInt32/100*12.5) # +12,5%\r\n            [int]$RequiredSpaceInt32 = ([int]$TotalMemoryInt32)+([int]$AdditionalSpaceInt32)\r\n\r\n            if ($RequiredSpaceInt32 -gt $AvailableSpaceInt32)\r\n            {\r\n                Write-Output \"[Error] Not enough disk space to save memory dump file.\"\r\n                Write-Output \"[Error] Not enough disk space to save memory dump file.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                Write-Output \"\"\r\n                $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n                Exit\r\n            }\r\n\r\n            # Check if output directory exists\r\n            if (Test-Path $OUTPUT_FOLDER\\Memory\\DumpIt)\r\n            {\r\n                # Check for output directory content\r\n                if (Test-Path $OUTPUT_FOLDER\\Memory\\DumpIt\\*)\r\n                {\r\n                    # Delete output directory content after confirmation\r\n                    Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\" -Force -Recurse -ErrorAction SilentlyContinue | Remove-Item -Force -Recurse -Confirm\r\n                }\r\n            }\r\n            else \r\n            {\r\n                # Creating Output Directory\r\n                New-Item \"$OUTPUT_FOLDER\\Memory\\DumpIt\" -ItemType Directory -Force | Out-Null\r\n            }\r\n\r\n            # Microsoft Crash Dump\r\n            $StartTime_MemoryAcquisition = (Get-Date)\r\n            Write-Output \"[Info]  Creating Memory Snapshot w/ DumpIt (Microsoft Crash Dump) [approx. 1-5 min] ... \"\r\n            Write-Output \"[Info]  Creating Memory Snapshot w/ DumpIt (Microsoft Crash Dump) [approx. 1-5 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            & $DumpIt /T DMP /N /Q /NOCOMPRESS /O \"$OUTPUT_FOLDER\\Memory\\DumpIt\\$env:COMPUTERNAME.dmp\" 2>&1 | Out-File \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\"\r\n            $EndTime_MemoryAcquisition = (Get-Date)\r\n            $Time_MemoryAcquisition = ($EndTime_MemoryAcquisition-$StartTime_MemoryAcquisition)\r\n            ('Memory Acquisition duration: {0} h {1} min {2} sec' -f $Time_MemoryAcquisition.Hours, $Time_MemoryAcquisition.Minutes, $Time_MemoryAcquisition.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\DumpIt\\Stats.txt\"\r\n\r\n            # Error: Can't install the driver\r\n            if (Test-Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\")\r\n            {\r\n                if (Get-Content \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\" | Select-String -Pattern \"Error: Can't install the driver.\" -Quiet)\r\n                {\r\n                    Write-Output \"[Error] Installing the DumpIt.sys driver failed. Please try WinPMEM.\"\r\n                    Write-Output \"[Error] Installing the DumpIt.sys driver failed. Please try WinPMEM.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n            }\r\n\r\n            # SHA256\r\n            if (Test-Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\")\r\n            {\r\n                $SHA256 = Get-Content \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\" | Select-String -Pattern \"[A-Fa-f0-9]{64}\" | ForEach-Object { $PSItem.Matches[0].Value } | Select-Object -First 1\r\n                if ($SHA256)\r\n                {\r\n                    Write-Output \"[Info]  SHA256 Hash: $SHA256\"\r\n                    Write-Output \"[Info]  SHA256 Hash: $SHA256\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n            }\r\n\r\n            # Processing... Failed.\r\n            if (Test-Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\")\r\n            {\r\n                # Error: The request could not be performed because of an I/O device error.\r\n                if (Get-Content \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\" | Select-String -Pattern \"Error: The request could not be performed because of an I/O device error.\" -Quiet)\r\n                {\r\n                    Write-Output \"[Error] The request could not be performed because of an I/O device error.\"\r\n                }\r\n            }\r\n\r\n            # Collecting PageFile\r\n            if ($PageFile -eq \"--PageFile\")\r\n            {\r\n                Get-Pagefile\r\n            }\r\n            \r\n            # Creating Secure Archive File\r\n            if (Test-Path \"$7za\") \r\n            {\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\\$env:COMPUTERNAME.dmp\") \r\n                {\r\n                    $StartTime_Archive = (Get-Date)\r\n                    Write-Output \"[Info]  Compressing Memory Snapshot [time-consuming task] [approx. 10-60 min] ... \"\r\n                    Write-Output \"[Info]  Compressing Memory Snapshot [time-consuming task] [approx. 10-60 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                    & $7za a -mx5 -mhe \"-p$PASSWORD\" -t7z \"$OUTPUT_FOLDER\\Memory\\DumpIt\\$env:COMPUTERNAME.7z\" \"$OUTPUT_FOLDER\\Memory\\DumpIt\\$env:COMPUTERNAME.dmp\" \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\" > $null 2>&1\r\n                    $EndTime_Archive = (Get-Date)\r\n                    $Time_Archive = ($EndTime_Archive-$StartTime_Archive)\r\n                    ('Archive Creation duration:   {0} h {1} min {2} sec' -f $Time_Archive.Hours, $Time_Archive.Minutes, $Time_Archive.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\DumpIt\\Stats.txt\"\r\n\r\n                    # Remove all files except \"$env:COMPUTERNAME.7z\" and \"Stats.txt\"\r\n                    Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\" -Exclude \"$env:COMPUTERNAME.7z*\", \"Stats.txt\" -Recurse -Force | ForEach-Object ($_) {Remove-Item $_.FullName}\r\n\r\n                    # Get File Size of \"$env:COMPUTERNAME.7z\"\r\n                    $Length = (Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\" | Measure-Object -Property Length -Sum).Sum\r\n                    $Size = Get-FileSize($Length)\r\n                    Write-Output \"[Info]  Total Archive Size: $Size\"\r\n                    Write-Output \"[Info]  Total Archive Size: $Size\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                    # Create Time (ISO 8601)\r\n                    $CreationTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Memory\\DumpIt\\$env:COMPUTERNAME.7z\").CreationTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\"\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                    # Last Modified Time (ISO 8601)\r\n                    $LastWriteTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Memory\\DumpIt\\$env:COMPUTERNAME.7z\").LastWriteTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\"\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Write-Output \"[Error] 7za.exe NOT found.\"\r\n                Write-Output \"[Error] 7za.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n        }\r\n        else\r\n        {\r\n            Write-Output \"[Error] File Hash does NOT match.\"\r\n            Write-Output \"[Error] File Hash does NOT match.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n            Exit\r\n        }\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Error] DumpIt.exe NOT found.\"\r\n        Write-Output \"[Error] DumpIt.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n        Exit\r\n    }\r\n}\r\n\r\n# DumpIt\r\nif ($Tool -eq \"-Comae\")\r\n{\r\n    New-ComaeSnapshot\r\n}\r\n\r\n#endregion Comae\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region DumpIt\r\n\r\nFunction New-DumpItSnapshot\r\n{\r\n    # DumpIt\r\n    if (Test-Path \"$DumpIt\") \r\n    {\r\n        # Verify File Integrity\r\n        $certUtil = \"$env:SystemDrive\\Windows\\System32\\certutil.exe\"\r\n        $MD5 = (((& $certUtil -hashfile \"$DumpIt\" MD5) -replace '\\s', '' | Select-String -Pattern \"^[0-9a-f]{32}$\" | Out-String).Trim()).ToUpper()\r\n\r\n        # ARM64 or x64 or x86\r\n        if (($MD5 -eq \"4B39D63B86FFE39BBAE0415C400003C7\") -Or ($MD5 -eq \"0F10DA3A5EB49D17D73D8E195FE32F85\") -OR ($MD5 -eq \"586C57AD0EEA179FCAE4B8BA117F2AB9\"))\r\n        {\r\n            # Get Physical Memory Size\r\n            if ($PSVersionTable.PSVersion.Major -ge 3)\r\n            {\r\n                $TotalMemory = Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum | ForEach-Object {\"{0}\" -f ([math]::round(($_.Sum / 1GB)))}\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\"\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n            else\r\n            {\r\n                $TotalMemory = Get-WmiObject Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum | ForEach-Object {\"{0}\" -f ([math]::round(($_.Sum / 1GB)))}\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\"\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n\r\n            # Check Available Space (GB)\r\n            $DriveLetter = \"$SCRIPT_DIR\".Substring(0,2)\r\n            $AvailableSpace = (Get-WmiObject -Class Win32_LogicalDisk -Filter \"deviceid='$DriveLetter'\" | Select-Object FreeSpace).FreeSpace | ForEach-Object {\"{0}\" -f ([math]::round(($_ / 1GB)))}\r\n            \r\n            [int]$TotalMemoryInt32 = [convert]::ToInt32($TotalMemory, 10)\r\n            [int]$AvailableSpaceInt32 = [convert]::ToInt32($AvailableSpace, 10)\r\n            [int]$AdditionalSpaceInt32 = ($TotalMemoryInt32/100*12.5) # +12,5%\r\n            [int]$RequiredSpaceInt32 = ([int]$TotalMemoryInt32)+([int]$AdditionalSpaceInt32)\r\n\r\n            if ($RequiredSpaceInt32 -gt $AvailableSpaceInt32)\r\n            {\r\n                Write-Output \"[Error] Not enough disk space to save memory dump file.\"\r\n                Write-Output \"[Error] Not enough disk space to save memory dump file.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                Write-Output \"\"\r\n                $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n                Exit\r\n            }\r\n\r\n            # Check if output directory exists\r\n            if (Test-Path $OUTPUT_FOLDER\\Memory\\DumpIt)\r\n            {\r\n                # Check for output directory content\r\n                if (Test-Path $OUTPUT_FOLDER\\Memory\\DumpIt\\*)\r\n                {\r\n                    # Delete output directory content after confirmation\r\n                    Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\" -Force -Recurse -ErrorAction SilentlyContinue | Remove-Item -Force -Recurse -Confirm\r\n                }\r\n            }\r\n            else \r\n            {\r\n                # Creating Output Directory\r\n                New-Item \"$OUTPUT_FOLDER\\Memory\\DumpIt\" -ItemType Directory -Force | Out-Null\r\n            }\r\n\r\n            # Raw Physical Memory Dump\r\n            # Note: DumpIt uses automatically .bin file extension.\r\n            $StartTime_MemoryAcquisition = (Get-Date)\r\n            Write-Output \"[Info]  Creating Memory Snapshot w/ DumpIt (Raw Physical Memory Dump) [approx. 1-5 min] ... \"\r\n            Write-Output \"[Info]  Creating Memory Snapshot w/ DumpIt (Raw Physical Memory Dump) [approx. 1-5 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            & $DumpIt /T RAW /N /Q /U /O \"$OUTPUT_FOLDER\\Memory\\DumpIt\\$env:COMPUTERNAME.bin\" 2>&1 | Out-File \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\"\r\n            $EndTime_MemoryAcquisition = (Get-Date)\r\n            $Time_MemoryAcquisition = ($EndTime_MemoryAcquisition-$StartTime_MemoryAcquisition)\r\n            ('Memory Acquisition duration: {0} h {1} min {2} sec' -f $Time_MemoryAcquisition.Hours, $Time_MemoryAcquisition.Minutes, $Time_MemoryAcquisition.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\DumpIt\\Stats.txt\"\r\n\r\n            # Error: Can't install the driver\r\n            if (Test-Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\")\r\n            {\r\n                if (Get-Content \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\" | Select-String -Pattern \"Error: Can't install the driver.\" -Quiet)\r\n                {\r\n                    Write-Output \"[Error] Installing the DumpIt.sys driver failed. Please try WinPMEM.\"\r\n                    Write-Output \"[Error] Installing the DumpIt.sys driver failed. Please try WinPMEM.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n            }\r\n\r\n            # SHA256\r\n            if (Test-Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\")\r\n            {\r\n                $SHA256 = Get-Content \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\" | Select-String -Pattern \"[A-Fa-f0-9]{64}\" | ForEach-Object { $PSItem.Matches[0].Value } | Select-Object -First 1\r\n                if ($SHA256)\r\n                {\r\n                    Write-Output \"[Info]  SHA256 Hash: $SHA256\"\r\n                    Write-Output \"[Info]  SHA256 Hash: $SHA256\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n            }\r\n\r\n            # Collecting PageFile\r\n            if ($PageFile -eq \"--PageFile\")\r\n            {\r\n                Get-Pagefile\r\n            }\r\n            \r\n            # Creating Secure Archive File\r\n            if (Test-Path \"$7za\") \r\n            {\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\\$env:COMPUTERNAME.bin\") \r\n                {\r\n                    $StartTime_Archive = (Get-Date)\r\n                    Write-Output \"[Info]  Compressing Memory Snapshot [time-consuming task] [approx. 10-60 min] ... \"\r\n                    Write-Output \"[Info]  Compressing Memory Snapshot [time-consuming task] [approx. 10-60 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                    & $7za a -mx5 -mhe \"-p$PASSWORD\" -t7z \"$OUTPUT_FOLDER\\Memory\\DumpIt\\$env:COMPUTERNAME.7z\" \"$OUTPUT_FOLDER\\Memory\\DumpIt\\$env:COMPUTERNAME.bin\" \"$OUTPUT_FOLDER\\Memory\\DumpIt\\DumpIt.log\" > $null 2>&1\r\n                    $EndTime_Archive = (Get-Date)\r\n                    $Time_Archive = ($EndTime_Archive-$StartTime_Archive)\r\n                    ('Archive Creation duration:   {0} h {1} min {2} sec' -f $Time_Archive.Hours, $Time_Archive.Minutes, $Time_Archive.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\DumpIt\\Stats.txt\"\r\n\r\n                    # Remove all files except \"$env:COMPUTERNAME.7z\" and \"Stats.txt\"\r\n                    Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\" -Exclude \"$env:COMPUTERNAME.7z*\", \"Stats.txt\" -Recurse -Force | ForEach-Object ($_) {Remove-Item $_.FullName}\r\n\r\n                    # Get File Size of \"$env:COMPUTERNAME.7z\"\r\n                    $Length = (Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\DumpIt\" | Measure-Object -Property Length -Sum).Sum\r\n                    $Size = Get-FileSize($Length)\r\n                    Write-Output \"[Info]  Total Archive Size: $Size\"\r\n                    Write-Output \"[Info]  Total Archive Size: $Size\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                    # Create Time (ISO 8601)\r\n                    $CreationTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Memory\\DumpIt\\$env:COMPUTERNAME.7z\").CreationTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\"\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                    # Last Modified Time (ISO 8601)\r\n                    $LastWriteTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Memory\\DumpIt\\$env:COMPUTERNAME.7z\").LastWriteTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\"\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                    # TODO\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Write-Output \"[Error] 7za.exe NOT found.\"\r\n                Write-Output \"[Error] 7za.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n\r\n            # Triage Collection\r\n            if ($Triage -eq \"--Triage\")\r\n            {\r\n                Get-Triage\r\n            }\r\n        }\r\n        else\r\n        {\r\n            Write-Output \"[Error] File Hash does NOT match.\"\r\n            Write-Output \"[Error] File Hash does NOT match.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n            Exit\r\n        }\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Error] DumpIt.exe NOT found.\"\r\n        Write-Output \"[Error] DumpIt.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n        Exit\r\n    }\r\n}\r\n\r\n# DumpIt\r\nif ($Tool -eq \"-DumpIt\")\r\n{\r\n    New-DumpItSnapshot\r\n}\r\n\r\n#endregion DumpIt\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region RamCapture\r\n\r\nFunction New-RamCapture\r\n{\r\n    # ARM64 Support\r\n    if ($env:PROCESSOR_ARCHITECTURE -eq \"ARM64\")\r\n    {\r\n        Write-Output \"[Error] ARM64 architecture is NOT supported by Magnet RAM Capture.\"\r\n        $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n        Exit\r\n    }\r\n\r\n    # Magnet RAM Capture\r\n    if (Test-Path \"$MRC\") \r\n    {\r\n        # Verify File Integrity\r\n        $certUtil = \"$env:SystemDrive\\Windows\\System32\\certutil.exe\"\r\n        $MD5 = (((& $certUtil -hashfile \"$MRC\" MD5) -replace '\\s', '' | Select-String -Pattern \"^[0-9a-f]{32}$\" | Out-String).Trim()).ToUpper()\r\n\r\n        if ($MD5 -eq \"51D286BDF58359417A28E3132ABA957F\")\r\n        {\r\n            # Get Physical Memory Size\r\n            if ($PSVersionTable.PSVersion.Major -ge 3)\r\n            {\r\n                $TotalMemory = Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum | ForEach-Object {\"{0}\" -f ([math]::round(($_.Sum / 1GB)))}\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\"\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n            else\r\n            {\r\n                $TotalMemory = Get-WmiObject Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum | ForEach-Object {\"{0}\" -f ([math]::round(($_.Sum / 1GB)))}\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\"\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n\r\n            # Check Available Space (GB)\r\n            $DriveLetter = \"$SCRIPT_DIR\".Substring(0,2)\r\n            $AvailableSpace = (Get-WmiObject -Class Win32_LogicalDisk -Filter \"deviceid='$DriveLetter'\" | Select-Object FreeSpace).FreeSpace | ForEach-Object {\"{0}\" -f ([math]::round(($_ / 1GB)))}\r\n            \r\n            [int]$TotalMemoryInt32 = [convert]::ToInt32($TotalMemory, 10)\r\n            [int]$AvailableSpaceInt32 = [convert]::ToInt32($AvailableSpace, 10)\r\n            [int]$AdditionalSpaceInt32 = ($TotalMemoryInt32/100*12.5) # +12,5%\r\n            [int]$RequiredSpaceInt32 = ([int]$TotalMemoryInt32)+([int]$AdditionalSpaceInt32)\r\n\r\n            if ($RequiredSpaceInt32 -gt $AvailableSpaceInt32)\r\n            {\r\n                Write-Output \"[Error] Not enough disk space to save memory dump file.\"\r\n                Write-Output \"[Error] Not enough disk space to save memory dump file.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                Write-Output \"\"\r\n                $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n                Exit\r\n            }\r\n\r\n            # Check if output directory exists\r\n            if (Test-Path $OUTPUT_FOLDER\\Memory\\Magnet)\r\n            {\r\n                # Check for output directory content\r\n                if (Test-Path $OUTPUT_FOLDER\\Memory\\Magnet\\*)\r\n                {\r\n                    # Delete output directory content after confirmation\r\n                    Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\Magnet\" -Force -Recurse -ErrorAction SilentlyContinue | Remove-Item -Force -Recurse -Confirm\r\n                }\r\n            }\r\n            else \r\n            {\r\n                # Creating Output Directory\r\n                New-Item \"$OUTPUT_FOLDER\\Memory\\Magnet\" -ItemType Directory -Force | Out-Null\r\n            }\r\n\r\n            # Raw Physical Memory Dump \r\n            $StartTime_MemoryAcquisition = (Get-Date)\r\n            Write-Output \"[Info]  Creating Memory Snapshot w/ Magnet RAM Capture (Raw Physical Memory Dump) [approx. 5-10 min] ... \"\r\n            Write-Output \"[Info]  Creating Memory Snapshot w/ Magnet RAM Capture (Raw Physical Memory Dump) [approx. 5-10 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            & $MRC /accepteula /go \"$OUTPUT_FOLDER\\Memory\\Magnet\\$env:COMPUTERNAME.raw\"\r\n            Wait-Process -Name \"MRCv120\"\r\n            Start-Sleep -Seconds 1\r\n            $EndTime_MemoryAcquisition = (Get-Date)\r\n            $Time_MemoryAcquisition = ($EndTime_MemoryAcquisition-$StartTime_MemoryAcquisition)\r\n            ('Memory Acquisition duration: {0} h {1} min {2} sec' -f $Time_MemoryAcquisition.Hours, $Time_MemoryAcquisition.Minutes, $Time_MemoryAcquisition.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\Magnet\\Stats.txt\"\r\n\r\n            # Collecting PageFile\r\n            if ($PageFile -eq \"--PageFile\")\r\n            {\r\n                Get-Pagefile\r\n            }\r\n\r\n            # MD5 Calculation\r\n            if (Test-Path \"$OUTPUT_FOLDER\\Memory\\Magnet\\$env:COMPUTERNAME.raw\") \r\n            {\r\n                if (Get-Command Get-FileHash -ErrorAction SilentlyContinue)\r\n                {\r\n                    Write-Output \"[Info]  Calculating MD5 checksum of Memory Snapshot [approx. 3-5 min] ... \"\r\n                    Write-Output \"[Info]  Calculating MD5 checksum of Memory Snapshot [approx. 3-5 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                    $StartTime_MD5 = (Get-Date)\r\n                    $MD5 = (Get-FileHash -LiteralPath \"$OUTPUT_FOLDER\\Memory\\Magnet\\$env:COMPUTERNAME.raw\" -Algorithm MD5).Hash\r\n                    Write-Output \"[Info]  MD5 Hash: $MD5\"\r\n                    Write-Output \"[Info]  MD5 Hash: $MD5\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                    $MD5 > \"$OUTPUT_FOLDER\\Memory\\Magnet\\MD5.txt\"\r\n                    $EndTime_MD5 = (Get-Date)\r\n                    $Time_MD5 = ($EndTime_MD5-$StartTime_MD5)\r\n                    ('MD5 Calculation duration:    {0} h {1} min {2} sec' -f $Time_MD5.Hours, $Time_MD5.Minutes, $Time_MD5.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\Magnet\\Stats.txt\"\r\n                }\r\n                else\r\n                {\r\n                    if (Test-Path \"$env:SystemDrive\\Windows\\System32\\certutil.exe\")\r\n                    {\r\n                        Write-Output \"[Info]  Calculating MD5 checksum of Memory Snapshot [approx. 3-5 min] ... \"\r\n                        Write-Output \"[Info]  Calculating MD5 checksum of Memory Snapshot [approx. 3-5 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                        $StartTime_MD5 = (Get-Date)\r\n                        $certUtil = \"$env:SystemDrive\\Windows\\System32\\certutil.exe\"\r\n                        $MD5 = ((& $certUtil -hashfile \"$OUTPUT_FOLDER\\Memory\\Magnet\\$env:COMPUTERNAME.raw\" MD5) -replace '\\s', '' | Select-String -Pattern \"^[0-9a-f]{32}$\" | Out-String).Trim()\r\n                        Write-Output \"[Info]  MD5 Hash: $MD5\"\r\n                        Write-Output \"[Info]  MD5 Hash: $MD5\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                        $MD5 > \"$OUTPUT_FOLDER\\Memory\\Magnet\\MD5.txt\"\r\n                        $EndTime_MD5 = (Get-Date)\r\n                        $Time_MD5 = ($EndTime_MD5-$StartTime_MD5)\r\n                        ('MD5 Calculation duration:    {0} h {1} min {2} sec' -f $Time_MD5.Hours, $Time_MD5.Minutes, $Time_MD5.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\Magnet\\Stats.txt\"\r\n                    }\r\n                }\r\n            }\r\n\r\n            # Creating Secure Archive File\r\n            if (Test-Path \"$7za\") \r\n            {\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Memory\\Magnet\\$env:COMPUTERNAME.raw\") \r\n                {\r\n                    $StartTime_Archive = (Get-Date)\r\n                    Write-Output \"[Info]  Compressing Memory Snapshot [time-consuming task] [approx. 10-60 min] ... \"\r\n                    Write-Output \"[Info]  Compressing Memory Snapshot [time-consuming task] [approx. 10-60 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                    & $7za a -mx5 -mhe \"-p$PASSWORD\" -t7z \"$OUTPUT_FOLDER\\Memory\\Magnet\\$env:COMPUTERNAME.7z\" \"$OUTPUT_FOLDER\\Memory\\Magnet\\$env:COMPUTERNAME.raw\" \"$OUTPUT_FOLDER\\Memory\\Magnet\\MD5.txt\" > $null 2>&1\r\n                    $EndTime_Archive = (Get-Date)\r\n                    $Time_Archive = ($EndTime_Archive-$StartTime_Archive)\r\n                    ('Archive Creation duration:   {0} h {1} min {2} sec' -f $Time_Archive.Hours, $Time_Archive.Minutes, $Time_Archive.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\Magnet\\Stats.txt\"\r\n\r\n                    # Remove all files except \"$env:COMPUTERNAME.7z\"\r\n                    Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\Magnet\" -Exclude \"$env:COMPUTERNAME.7z*\", \"Stats.txt\" -Recurse -Force | ForEach-Object ($_) {Remove-Item $_.FullName}\r\n\r\n                    # Get File Size of \"$env:COMPUTERNAME.7z\"\r\n                    $Length = (Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\Magnet\" | Measure-Object -Property Length -Sum).Sum\r\n                    $Size = Get-FileSize($Length)\r\n                    Write-Output \"[Info]  Total Archive Size: $Size\"\r\n                    Write-Output \"[Info]  Total Archive Size: $Size\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                    # Create Time (ISO 8601)\r\n                    $CreationTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Memory\\Magnet\\$env:COMPUTERNAME.7z\").CreationTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\"\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                    # Last Modified Time (ISO 8601)\r\n                    $LastWriteTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Memory\\Magnet\\$env:COMPUTERNAME.7z\").LastWriteTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\"\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Write-Output \"[Error] 7za.exe NOT found.\"\r\n                Write-Output \"[Error] 7za.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n        }\r\n        else\r\n        {\r\n            Write-Output \"[Error] File Hash does NOT match.\"\r\n            Write-Output \"[Error] File Hash does NOT match.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n            Exit\r\n        }\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Error] MRCv120.exe NOT found.\"\r\n        Write-Output \"[Error] MRCv120.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n        Exit\r\n    }\r\n}\r\n\r\n# Magnet RAM Capture\r\nif ($Tool -eq \"-RamCapture\")\r\n{\r\n    New-RamCapture\r\n}\r\n\r\n#endregion RamCapture\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region WinPMEM\r\n\r\nFunction New-WinPMEMSnapshot\r\n{\r\n    # ARM64 Support\r\n    if ($env:PROCESSOR_ARCHITECTURE -eq \"ARM64\")\r\n    {\r\n        Write-Output \"[Error] ARM64 architecture is NOT supported by WinPMEM.\"\r\n        $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n        Exit\r\n    }\r\n\r\n    # WinPMEM\r\n    if (Test-Path \"$WinPMEM\") \r\n    {\r\n        # Verify File Integrity\r\n        $certUtil = \"$env:SystemDrive\\Windows\\System32\\certutil.exe\"\r\n        $MD5 = (((& $certUtil -hashfile \"$WinPMEM\" MD5) -replace '\\s', '' | Select-String -Pattern \"^[0-9a-f]{32}$\" | Out-String).Trim()).ToUpper()\r\n\r\n        # x64 or x86\r\n        if (($MD5 -eq \"9DD3160679832165738BFABD7279ACEB\") -Or ($MD5 -eq \"C2BC7851F966BC39068345FB24BC8740\"))\r\n        {\r\n            # Get Physical Memory Size\r\n            if ($PSVersionTable.PSVersion.Major -ge 3)\r\n            {\r\n                $TotalMemory = Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum | ForEach-Object {\"{0}\" -f ([math]::round(($_.Sum / 1GB)))}\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\"\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n            else\r\n            {\r\n                $TotalMemory = Get-WmiObject Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum | ForEach-Object {\"{0}\" -f ([math]::round(($_.Sum / 1GB)))}\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\"\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n\r\n            # Check Available Space (GB)\r\n            $DriveLetter = \"$SCRIPT_DIR\".Substring(0,2)\r\n            $AvailableSpace = (Get-WmiObject -Class Win32_LogicalDisk -Filter \"deviceid='$DriveLetter'\" | Select-Object FreeSpace).FreeSpace | ForEach-Object {\"{0}\" -f ([math]::round(($_ / 1GB)))}\r\n            \r\n            [int]$TotalMemoryInt32 = [convert]::ToInt32($TotalMemory, 10)\r\n            [int]$AvailableSpaceInt32 = [convert]::ToInt32($AvailableSpace, 10)\r\n            [int]$AdditionalSpaceInt32 = ($TotalMemoryInt32/100*12.5) # +12,5%\r\n            [int]$RequiredSpaceInt32 = ([int]$TotalMemoryInt32)+([int]$AdditionalSpaceInt32)\r\n\r\n            if ($RequiredSpaceInt32 -gt $AvailableSpaceInt32)\r\n            {\r\n                Write-Output \"[Error] Not enough disk space to save memory dump file.\"\r\n                Write-Output \"[Error] Not enough disk space to save memory dump file.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                Write-Output \"\"\r\n                $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n                Exit\r\n            }\r\n\r\n            # Check if output directory exists\r\n            if (Test-Path $OUTPUT_FOLDER\\Memory\\WinPMEM)\r\n            {\r\n                # Check for output directory content\r\n                if (Test-Path $OUTPUT_FOLDER\\Memory\\WinPMEM\\*)\r\n                {\r\n                    # Delete output directory content after confirmation\r\n                    Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\WinPMEM\" -Force -Recurse -ErrorAction SilentlyContinue | Remove-Item -Force -Recurse -Confirm\r\n                }\r\n            }\r\n            else \r\n            {\r\n                # Creating Output Directory\r\n                New-Item \"$OUTPUT_FOLDER\\Memory\\WinPMEM\" -ItemType Directory -Force | Out-Null\r\n            }\r\n\r\n            # Raw Physical Memory Dump\r\n            $StartTime_MemoryAcquisition = (Get-Date)\r\n            Write-Output \"[Info]  Creating Memory Snapshot w/ WinPMEM (Raw Physical Memory Dump) [approx. 1-6 min] ... \"\r\n            Write-Output \"[Info]  Creating Memory Snapshot w/ WinPMEM (Raw Physical Memory Dump) [approx. 1-6 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            & $WinPMEM \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\$env:COMPUTERNAME.raw\" > \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\stdout.txt\" 2> \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\stderr.txt\"\r\n            $EndTime_MemoryAcquisition = (Get-Date)\r\n            $Time_MemoryAcquisition = ($EndTime_MemoryAcquisition-$StartTime_MemoryAcquisition)\r\n            ('Memory Acquisition duration: {0} h {1} min {2} sec' -f $Time_MemoryAcquisition.Hours, $Time_MemoryAcquisition.Minutes, $Time_MemoryAcquisition.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\Stats.txt\"\r\n\r\n            # Collecting PageFile\r\n            if ($PageFile -eq \"--PageFile\")\r\n            {\r\n                Get-Pagefile\r\n            }\r\n\r\n            # MD5 Calculation\r\n            if (Test-Path \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\$env:COMPUTERNAME.raw\") \r\n            {\r\n                if (Get-Command Get-FileHash -ErrorAction SilentlyContinue)\r\n                {\r\n                    Write-Output \"[Info]  Calculating MD5 checksum of Memory Snapshot [approx. 3-5 min] ... \"\r\n                    Write-Output \"[Info]  Calculating MD5 checksum of Memory Snapshot [approx. 3-5 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                    $StartTime_MD5 = (Get-Date)\r\n                    $MD5 = (Get-FileHash -LiteralPath \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\$env:COMPUTERNAME.raw\" -Algorithm MD5).Hash\r\n                    Write-Output \"[Info]  MD5 Hash: $MD5\"\r\n                    Write-Output \"[Info]  MD5 Hash: $MD5\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                    $MD5 > \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\MD5.txt\"\r\n                    $EndTime_MD5 = (Get-Date)\r\n                    $Time_MD5 = ($EndTime_MD5-$StartTime_MD5)\r\n                    ('MD5 Calculation duration:    {0} h {1} min {2} sec' -f $Time_MD5.Hours, $Time_MD5.Minutes, $Time_MD5.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\Stats.txt\"\r\n                }\r\n                else\r\n                {\r\n                    if (Test-Path \"$env:SystemDrive\\Windows\\System32\\certutil.exe\")\r\n                    {\r\n                        Write-Output \"[Info]  Calculating MD5 checksum of Memory Snapshot [approx. 3-5 min] ... \"\r\n                        Write-Output \"[Info]  Calculating MD5 checksum of Memory Snapshot [approx. 3-5 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                        $StartTime_MD5 = (Get-Date)\r\n                        $certUtil = \"$env:SystemDrive\\Windows\\System32\\certutil.exe\"\r\n                        $MD5 = ((& $certUtil -hashfile \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\$env:COMPUTERNAME.raw\" MD5) -replace '\\s', '' | Select-String -Pattern \"^[0-9a-f]{32}$\" | Out-String).Trim()\r\n                        Write-Output \"[Info]  MD5 Hash: $MD5\"\r\n                        Write-Output \"[Info]  MD5 Hash: $MD5\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                        $MD5 > \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\MD5.txt\"\r\n                        $EndTime_MD5 = (Get-Date)\r\n                        $Time_MD5 = ($EndTime_MD5-$StartTime_MD5)\r\n                        ('MD5 Calculation duration:    {0} h {1} min {2} sec' -f $Time_MD5.Hours, $Time_MD5.Minutes, $Time_MD5.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\Stats.txt\"\r\n                    }\r\n                }\r\n            }\r\n\r\n            # Creating Secure Archive File\r\n            if (Test-Path \"$7za\") \r\n            {\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\$env:COMPUTERNAME.raw\") \r\n                {\r\n                    $StartTime_Archive = (Get-Date)\r\n                    Write-Output \"[Info]  Compressing Memory Snapshot [time-consuming task] [approx. 10-60 min] ... \"\r\n                    Write-Output \"[Info]  Compressing Memory Snapshot [time-consuming task] [approx. 10-60 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                    & $7za a -mx5 -mhe \"-p$PASSWORD\" -t7z \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\$env:COMPUTERNAME.7z\" \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\$env:COMPUTERNAME.raw\" \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\MD5.txt\" > $null 2>&1\r\n                    $EndTime_Archive = (Get-Date)\r\n                    $Time_Archive = ($EndTime_Archive-$StartTime_Archive)\r\n                    ('Archive Creation duration:   {0} h {1} min {2} sec' -f $Time_Archive.Hours, $Time_Archive.Minutes, $Time_Archive.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\Stats.txt\"\r\n\r\n                    # Remove all files except \"$env:COMPUTERNAME.7z\", \"Stats.txt\", \"stdout.txt\" and \"stderr.txt\"\r\n                    Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\WinPMEM\" -Exclude \"$env:COMPUTERNAME.7z*\", \"Stats.txt\", \"stdout.txt\", \"stderr.txt\" -Recurse -Force | ForEach-Object ($_) {Remove-Item $_.FullName}\r\n\r\n                    # Get File Size of \"$env:COMPUTERNAME.7z\"\r\n                    $Length = (Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\WinPMEM\" -Exclude *.txt | Measure-Object -Property Length -Sum).Sum\r\n                    $Size = Get-FileSize($Length)\r\n                    Write-Output \"[Info]  Total Archive Size: $Size\"\r\n                    Write-Output \"[Info]  Total Archive Size: $Size\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                    # Create Time (ISO 8601)\r\n                    $CreationTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\$env:COMPUTERNAME.7z\").CreationTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\"\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                    # Last Modified Time (ISO 8601)\r\n                    $LastWriteTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Memory\\WinPMEM\\$env:COMPUTERNAME.7z\").LastWriteTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\"\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Write-Output \"[Error] 7za.exe NOT found.\"\r\n                Write-Output \"[Error] 7za.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n        }\r\n        else\r\n        {\r\n            Write-Output \"[Error] File Hash does NOT match.\"\r\n            Write-Output \"[Error] File Hash does NOT match.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n            Exit\r\n        }\r\n    }\r\n    else\r\n    {\r\n        # x64\r\n        if ($env:PROCESSOR_ARCHITECTURE -eq \"AMD64\")\r\n        {\r\n            Write-Output \"[Error] winpmem_mini_x64_rc2.exe NOT found.\"\r\n            Write-Output \"[Error] winpmem_mini_x64_rc2.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n            Exit\r\n        }\r\n\r\n        # x86\r\n        if ($env:PROCESSOR_ARCHITECTURE -eq \"x86\")\r\n        {\r\n            Write-Output \"[Error] winpmem_mini_x86.exe NOT found.\"\r\n            Write-Output \"[Error] winpmem_mini_x86.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n            Exit\r\n        }\r\n    }\r\n}\r\n\r\n# WinPMEM\r\nif ($Tool -eq \"-WinPMEM\")\r\n{\r\n    New-WinPMEMSnapshot\r\n}\r\n\r\n#endregion WinPMEM\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region Belkasoft\r\n\r\nFunction New-BelkasoftSnapshot\r\n{\r\n    # ARM64 Support\r\n    if ($env:PROCESSOR_ARCHITECTURE -eq \"ARM64\")\r\n    {\r\n        Write-Output \"[Error] ARM64 architecture is NOT supported by Belkasoft Live RAM Capturer.\"\r\n        $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n        Exit\r\n    }\r\n\r\n    # Belkasoft Live RAM Capturer\r\n    if (Test-Path \"$Belkasoft\") \r\n    {\r\n        # Verify File Integrity\r\n        $certUtil = \"$env:SystemDrive\\Windows\\System32\\certutil.exe\"\r\n        $MD5 = (((& $certUtil -hashfile \"$Belkasoft\" MD5) -replace '\\s', '' | Select-String -Pattern \"^[0-9a-f]{32}$\" | Out-String).Trim()).ToUpper()\r\n\r\n        # x64 or x86\r\n        if (($MD5 -eq \"E331F960CDBA675DEA9218EFDED56A5F\") -Or ($MD5 -eq \"FCA60980F235B4EFB3C3119EF4584FFF\"))\r\n        {\r\n            # Get Physical Memory Size\r\n            if ($PSVersionTable.PSVersion.Major -ge 3)\r\n            {\r\n                $TotalMemory = Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum | ForEach-Object {\"{0}\" -f ([math]::round(($_.Sum / 1GB)))}\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\"\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n            else\r\n            {\r\n                $TotalMemory = Get-WmiObject Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum | ForEach-Object {\"{0}\" -f ([math]::round(($_.Sum / 1GB)))}\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\"\r\n                Write-Output \"[Info]  Total Physical Memory Size: $TotalMemory GB\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n\r\n            # Check Available Space (GB)\r\n            $DriveLetter = \"$SCRIPT_DIR\".Substring(0,2)\r\n            $AvailableSpace = (Get-WmiObject -Class Win32_LogicalDisk -Filter \"deviceid='$DriveLetter'\" | Select-Object FreeSpace).FreeSpace | ForEach-Object {\"{0}\" -f ([math]::round(($_ / 1GB)))}\r\n            \r\n            [int]$TotalMemoryInt32 = [convert]::ToInt32($TotalMemory, 10)\r\n            [int]$AvailableSpaceInt32 = [convert]::ToInt32($AvailableSpace, 10)\r\n            [int]$AdditionalSpaceInt32 = ($TotalMemoryInt32/100*12.5) # +12,5%\r\n            [int]$RequiredSpaceInt32 = ([int]$TotalMemoryInt32)+([int]$AdditionalSpaceInt32)\r\n\r\n            if ($RequiredSpaceInt32 -gt $AvailableSpaceInt32)\r\n            {\r\n                Write-Output \"[Error] Not enough disk space to save memory dump file.\"\r\n                Write-Output \"[Error] Not enough disk space to save memory dump file.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                Write-Output \"\"\r\n                $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n                Exit\r\n            }\r\n\r\n            # Check if output directory exists\r\n            if (Test-Path $OUTPUT_FOLDER\\Memory\\Belkasoft)\r\n            {\r\n                # Check for output directory content\r\n                if (Test-Path $OUTPUT_FOLDER\\Memory\\Belkasoft\\*)\r\n                {\r\n                    # Delete output directory content after confirmation\r\n                    Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\Belkasoft\" -Force -Recurse -ErrorAction SilentlyContinue | Remove-Item -Force -Recurse -Confirm\r\n                }\r\n            }\r\n            else \r\n            {\r\n                # Creating Output Directory\r\n                New-Item \"$OUTPUT_FOLDER\\Memory\\Belkasoft\" -ItemType Directory -Force | Out-Null\r\n            }\r\n\r\n            # Raw Physical Memory Dump\r\n            $StartTime_MemoryAcquisition = (Get-Date)\r\n            Write-Output \"[Info]  Creating Memory Snapshot w/ Belkasoft Live RAM Capturer (Raw Physical Memory Dump) [approx. 1-6 min] ... \"\r\n            Write-Output \"[Info]  Creating Memory Snapshot w/ Belkasoft Live RAM Capturer (Raw Physical Memory Dump) [approx. 1-6 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            $FileName = (Get-Date).ToString(\"yyyyMMdd\")\r\n            Start-Process -FilePath $Belkasoft -ArgumentList \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\$FileName.mem\" -WindowStyle Hidden -Wait\r\n            $EndTime_MemoryAcquisition = (Get-Date)\r\n            $Time_MemoryAcquisition = ($EndTime_MemoryAcquisition-$StartTime_MemoryAcquisition)\r\n            ('Memory Acquisition duration: {0} h {1} min {2} sec' -f $Time_MemoryAcquisition.Hours, $Time_MemoryAcquisition.Minutes, $Time_MemoryAcquisition.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\Stats.txt\"\r\n\r\n            # Collecting PageFile\r\n            if ($PageFile -eq \"--PageFile\")\r\n            {\r\n                Get-Pagefile\r\n            }\r\n\r\n            # MD5 Calculation\r\n            if (Test-Path \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\$FileName.mem\") \r\n            {\r\n                if (Get-Command Get-FileHash -ErrorAction SilentlyContinue)\r\n                {\r\n                    Write-Output \"[Info]  Calculating MD5 checksum of Memory Snapshot [approx. 3-5 min] ... \"\r\n                    Write-Output \"[Info]  Calculating MD5 checksum of Memory Snapshot [approx. 3-5 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                    $StartTime_MD5 = (Get-Date)\r\n                    $MD5 = (Get-FileHash -LiteralPath \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\$FileName.mem\" -Algorithm MD5).Hash\r\n                    Write-Output \"[Info]  MD5 Hash: $MD5\"\r\n                    Write-Output \"[Info]  MD5 Hash: $MD5\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                    $MD5 > \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\MD5.txt\"\r\n                    $EndTime_MD5 = (Get-Date)\r\n                    $Time_MD5 = ($EndTime_MD5-$StartTime_MD5)\r\n                    ('MD5 Calculation duration:    {0} h {1} min {2} sec' -f $Time_MD5.Hours, $Time_MD5.Minutes, $Time_MD5.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\Stats.txt\"\r\n                }\r\n                else\r\n                {\r\n                    if (Test-Path \"$env:SystemDrive\\Windows\\System32\\certutil.exe\")\r\n                    {\r\n                        Write-Output \"[Info]  Calculating MD5 checksum of Memory Snapshot [approx. 3-5 min] ... \"\r\n                        Write-Output \"[Info]  Calculating MD5 checksum of Memory Snapshot [approx. 3-5 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                        $StartTime_MD5 = (Get-Date)\r\n                        $certUtil = \"$env:SystemDrive\\Windows\\System32\\certutil.exe\"\r\n                        $MD5 = ((& $certUtil -hashfile \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\$FileName.mem\" MD5) -replace '\\s', '' | Select-String -Pattern \"^[0-9a-f]{32}$\" | Out-String).Trim()\r\n                        Write-Output \"[Info]  MD5 Hash: $MD5\"\r\n                        Write-Output \"[Info]  MD5 Hash: $MD5\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                        $MD5 > \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\MD5.txt\"\r\n                        $EndTime_MD5 = (Get-Date)\r\n                        $Time_MD5 = ($EndTime_MD5-$StartTime_MD5)\r\n                        ('MD5 Calculation duration:    {0} h {1} min {2} sec' -f $Time_MD5.Hours, $Time_MD5.Minutes, $Time_MD5.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\Stats.txt\"\r\n                    }\r\n                }\r\n            }\r\n\r\n            # Creating Secure Archive File\r\n            if (Test-Path \"$7za\") \r\n            {\r\n                if (Test-Path \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\$FileName.mem\") \r\n                {\r\n                    $StartTime_Archive = (Get-Date)\r\n                    Write-Output \"[Info]  Compressing Memory Snapshot [time-consuming task] [approx. 10-60 min] ... \"\r\n                    Write-Output \"[Info]  Compressing Memory Snapshot [time-consuming task] [approx. 10-60 min] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                    & $7za a -mx5 -mhe \"-p$PASSWORD\" -t7z \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\$FileName.7z\" \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\$FileName.mem\" \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\MD5.txt\" > $null 2>&1\r\n                    $EndTime_Archive = (Get-Date)\r\n                    $Time_Archive = ($EndTime_Archive-$StartTime_Archive)\r\n                    ('Archive Creation duration:   {0} h {1} min {2} sec' -f $Time_Archive.Hours, $Time_Archive.Minutes, $Time_Archive.Seconds) >> \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\Stats.txt\"\r\n\r\n                    # Remove all files except \"$FileName.7z\" and \"Stats.txt\"\r\n                    Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\Belkasoft\" -Exclude \"$FileName.7z*\", \"Stats.txt\" -Recurse -Force | ForEach-Object ($_) {Remove-Item $_.FullName}\r\n\r\n                    # Get File Size of \"$FileName.7z\"\r\n                    $Length = (Get-ChildItem -Path \"$OUTPUT_FOLDER\\Memory\\Belkasoft\" -Exclude *.txt | Measure-Object -Property Length -Sum).Sum\r\n                    $Size = Get-FileSize($Length)\r\n                    Write-Output \"[Info]  Total Archive Size: $Size\"\r\n                    Write-Output \"[Info]  Total Archive Size: $Size\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                    # Create Time (ISO 8601)\r\n                    $CreationTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\$FileName.7z\").CreationTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\"\r\n                    Write-Output \"[Info]  Create Time: $CreationTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n                    # Last Modified Time (ISO 8601)\r\n                    $LastWriteTime = ((Get-Item -LiteralPath \"$OUTPUT_FOLDER\\Memory\\Belkasoft\\$FileName.7z\").LastWriteTimeUtc).ToString(\"yyyy-MM-dd HH:mm:ss UTC\")\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\"\r\n                    Write-Output \"[Info]  Last Modified Time: $LastWriteTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Write-Output \"[Error] 7za.exe NOT found.\"\r\n                Write-Output \"[Error] 7za.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n        }\r\n        else\r\n        {\r\n            Write-Output \"[Error] File Hash does NOT match.\"\r\n            Write-Output \"[Error] File Hash does NOT match.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n            Exit\r\n        }\r\n    }\r\n    else\r\n    {\r\n        # x64\r\n        if ($env:PROCESSOR_ARCHITECTURE -eq \"AMD64\")\r\n        {\r\n            Write-Output \"[Error] RamCapture64.exe NOT found.\"\r\n            Write-Output \"[Error] RamCapture64.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n            Exit\r\n        }\r\n\r\n        # x86\r\n        if ($env:PROCESSOR_ARCHITECTURE -eq \"x86\")\r\n        {\r\n            Write-Output \"[Error] RamCapture.exe NOT found.\"\r\n            Write-Output \"[Error] RamCapture.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n            Exit\r\n        }\r\n    }\r\n}\r\n\r\n# Belkasoft Live RAM Capturer\r\nif ($Tool -eq \"-Belkasoft\")\r\n{\r\n    New-BelkasoftSnapshot\r\n}\r\n\r\n#endregion Belkasoft\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region SystemInfo\r\n\r\n# System-Info\r\nNew-Item \"$OUTPUT_FOLDER\\System-Info\" -ItemType Directory -Force | Out-Null\r\n\r\n# PowerShell Version\r\n$PSVersion = \"$($PSVersionTable.PSVersion.Major).$($PSVersionTable.PSVersion.Minor)\"\r\n$ConstrainedLanguageMode = $ExecutionContext.SessionState.LanguageMode\r\nWrite-Output \"[Info]  PowerShell Version: $PSVersion ($ConstrainedLanguageMode)\"\r\nWrite-Output \"[Info]  PowerShell Version: $PSVersion ($ConstrainedLanguageMode)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n# .NET Framework Version\r\nif (Test-Path \"HKLM:SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\")\r\n{\r\n    if (Test-RegistryValue -Path \"HKLM:SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\" -Value \"Version\")\r\n    {\r\n        $NetVersion = (Get-ItemProperty \"HKLM:SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\" -Name Version).Version\r\n        Write-Output \"[Info]  NET Framework Version: $NETVersion\"\r\n        Write-Output \"[Info]  NET Framework Version: $NETVersion\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\nelse\r\n{\r\n    if (Test-RegistryValue -Path \"HKLM:SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v3.5\" -Value \"Version\")\r\n    {\r\n        $NetVersion = (Get-ItemProperty \"HKLM:SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v3.5\" -Name Version).Version\r\n        Write-Output \"[Info]  NET Framework Version: $NETVersion\"\r\n        Write-Output \"[Info]  NET Framework Version: $NETVersion\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n# Velociraptor\r\n$CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\nif (Test-Path \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Services\\Velociraptor\")\r\n{\r\n    Write-Output \"[Info]  Velociraptor Service found\"\r\n}\r\n\r\n# Cortex XDR (Palo Alto Networks)\r\n$CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\nif (Test-Path \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Services\\cyserver\")\r\n{\r\n    # Cortex XDR Service\r\n    $ImagePath = ((Get-ItemProperty \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Services\\cyserver\" -Name ImagePath).ImagePath) -replace '\"', \"\"\r\n    if (Test-Path \"$ImagePath\")\r\n    {\r\n        $DisplayName = (Get-ItemProperty \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Services\\cyserver\" -Name DisplayName).DisplayName\r\n        $ProductVersion = (Get-ItemProperty \"HKLM:\\SOFTWARE\\Cyvera\\Client\" -Name \"Product Version\").\"Product Version\"\r\n        Write-Output \"[Info]  $DisplayName v$ProductVersion\"\r\n        Write-Output \"[Info]  $DisplayName v$ProductVersion\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n# CrowdStrike Agent Version\r\nif (Test-Path \"$env:SystemDrive\\Windows\\System32\\drivers\\CrowdStrike\\CSAgent.sys\")\r\n{\r\n    $CSAgent = [System.Diagnostics.FileVersionInfo]::GetVersionInfo(\"$env:SystemDrive\\Windows\\System32\\drivers\\CrowdStrike\\CSAgent.sys\").FileVersion\r\n    Write-Output \"[Info]  CrowdStrike Agent Version: $CSAgent\"\r\n    Write-Output \"[Info]  CrowdStrike Agent Version: $CSAgent\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n}\r\n\r\n# CrowdStrike Agent-ID\r\n$CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\nif (Test-Path \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Services\\CSAgent\\Sim\")\r\n{\r\n    $AID = ('{0:x}' -f ((Get-ItemProperty \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Services\\CSAgent\\Sim\" -Name AG).AG) -replace '\\s','')\r\n    Write-Output \"[Info]  Agent-ID: $AID\"\r\n}\r\n\r\n# FireEye Endpoint Security\r\nif (Test-Path \"$env:SystemDrive\\Program Files (x86)\\FireEye\\xagt\\xagt.exe\")\r\n{\r\n    # Agent Version\r\n    $AgentVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo(\"$env:SystemDrive\\Program Files (x86)\\FireEye\\xagt\\xagt.exe\").FileVersion\r\n    Write-Output \"[Info]  FireEye Endpoint Security v$AgentVersion\"\r\n    Write-Output \"[Info]  FireEye Endpoint Security v$AgentVersion\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n    # Agent ID\r\n    $xagt = \"C:\\Program Files (x86)\\FireEye\\xagt\\xagt.exe\"\r\n    $AgentID = (& $xagt -G -L 20 | Select-String -Pattern \"aid\" | Select-Object -First 1 | ForEach-Object { -split $_.Line | Select-Object -Last 1 }).TrimEnd('.')\r\n    Write-Output \"[Info]  Agent-ID: $AgentID\"\r\n    Write-Output \"[Info]  Agent-ID: $AgentID\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n}\r\n\r\n# Cybereason EDR\r\nif (Test-Path \"HKLM:\\SOFTWARE\\Cybereason\")\r\n{\r\n    # Cybereason Sensor\r\n    $EDRProductName = (Get-ItemProperty \"HKLM:\\SOFTWARE\\Cybereason\\ActiveProbe\" -Name EDRProductName).EDRProductName\r\n    $Version = (Get-ItemProperty \"HKLM:\\SOFTWARE\\Cybereason\\Cybereason Sensor\\*\\Setup\" -Name Version).Version\r\n    Write-Output \"[Info]  EDR ProductName: $EDRProductName (Version: $Version)\"\r\n    Write-Output \"[Info]  EDR ProductName: $EDRProductName (Version: $Version)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n}\r\n\r\n# ASGARD Agent v2 (Nextron Systems GmbH)\r\nif (Test-Path \"$env:SystemDrive\\Windows\\System32\\asgard2-agent\\asgard2-agent.exe\")\r\n{\r\n    # Version\r\n    $Agent = \"$env:SystemDrive\\Windows\\System32\\asgard2-agent\\asgard2-agent.exe\"\r\n    $Version = (& $Agent -version)\r\n    Write-Output \"[Info]  Nextron Systems ASGARD Agent v2 (Version: $Version)\"\r\n    Write-Output \"[Info]  Nextron Systems ASGARD Agent v2 (Version: $Version)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n}\r\n\r\n# McAfee Endpoint Security (ENS)\r\nif (Test-Path \"HKLM:\\SOFTWARE\\McAfee\\Endpoint\\AV\")\r\n{\r\n    # ProductVersion\r\n    $ProductVersion = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\McAfee\\Endpoint\\AV\" -Name ProductVersion).ProductVersion\r\n    Write-Output \"[Info]  McAfee Endpoint Security v$ProductVersion\"\r\n    Write-Output \"[Info]  McAfee Endpoint Security v$ProductVersion\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n    # LogFilePath\r\n    $CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\n    $LogFilePath = (Get-ItemProperty -Path \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Control\\Session Manager\\Environment\" -Name \"DEFLOGDIR\").DEFLOGDIR\r\n    Write-Output \"[Info]  LogFilePath: $LogFilePath\"\r\n    Write-Output \"[Info]  LogFilePath: $LogFilePath\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n    # QuarantineDirectory\r\n    $QuarantineDirectory = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\McAfee\\AVSolution\\MCSHIELDGLOBAL\\MCSHIELDGLOBAL\" -Name backupdirectory).backupdirectory\r\n    Write-Output \"[Info]  QuarantineDirectory: $QuarantineDirectory\"\r\n    Write-Output \"[Info]  QuarantineDirectory: $QuarantineDirectory\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n    # QuarantineAge (in days)\r\n    $QuarantineAge = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\McAfee\\Endpoint\\AV\\QM\" -Name QuarantineAge).QuarantineAge\r\n    Write-Output \"[Info]  QuarantineAge (in days): $QuarantineAge\"\r\n    Write-Output \"[Info]  QuarantineAge (in days): $QuarantineAge\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n    # Quarantine Files (PW: infected)\r\n    if (Test-Path \"$QuarantineDirectory\\quarantine\\*.zip\")\r\n    {\r\n        $QuarantineFiles = Get-ChildItem \"$QuarantineDirectory\\quarantine\\*.zip\" | Measure-Object | ForEach-Object{$_.Count}\r\n        Write-Output \"[Alert] $QuarantineFiles McAfee Quarantine file(s) found\"\r\n        Write-Output \"[Alert] $QuarantineFiles McAfee Quarantine file(s) found\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Info]  No McAfee Quarantine file(s) found\"\r\n        Write-Output \"[Info]  No McAfee Quarantine file(s) found\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n\r\n    # Last Full Scan\r\n    $LastFullScanOdsRunTime = (Get-ItemProperty \"HKLM:\\SOFTWARE\\McAfee\\Endpoint\\AV\\ODS\" -Name LastFullScanOdsRunTime).LastFullScanOdsRunTime\r\n    $LastFullScan = (Get-Date '1/1/1970').AddSeconds($LastFullScanOdsRunTime).ToString(\"yyyy-MM-dd HH:mm:ss\")\r\n    Write-Output \"[Info]  Last Full Scan: $LastFullScan UTC\"\r\n    Write-Output \"[Info]  Last Full Scan: $LastFullScan UTC\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n}\r\n\r\n# McAfee VirusScan Enterprise (VSE)\r\nif (Test-Path \"HKLM:\\SOFTWARE\\Wow6432Node\\McAfee\\AVEngine\")\r\n{\r\n    # Version\r\n    $Version = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Wow6432Node\\McAfee\\DesktopProtection\" -Name szProductVer).szProductVer\r\n    $Patch = ((Get-Item -Path \"HKLM:\\SOFTWARE\\Wow6432Node\\McAfee\\DesktopProtection\" | Select-Object -ExpandProperty Property | Select-String -Pattern \"Patch_\") -replace \"_\",\" \" | Out-String).Trim()\r\n    Write-Output \"[Info]  McAfee VirusScan Enterprise v$Version (Patch: $Patch)\"\r\n    Write-Output \"[Info]  McAfee VirusScan Enterprise v$Version (Patch: $Patch)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n    # LogFilePath\r\n    $CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\n    $LogFilePath = (Get-ItemProperty -Path \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Control\\Session Manager\\Environment\" -Name \"DEFLOGDIR\").DEFLOGDIR\r\n    Write-Output \"[Info]  LogFilePath: $LogFilePath\"\r\n    Write-Output \"[Info]  LogFilePath: $LogFilePath\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n    # QuarantineDirectory\r\n    $QuarantineDirectory = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Wow6432Node\\McAfee\\DesktopProtection\" -Name QuarantineDirectory).QuarantineDirectory\r\n    Write-Output \"[Info]  QuarantineDirectory: $QuarantineDirectory\"\r\n    Write-Output \"[Info]  QuarantineDirectory: $QuarantineDirectory\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n    # QuarantineAge (in days)\r\n    $QuarantineAge = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Wow6432Node\\McAfee\\DesktopProtection\" -Name QuarantineAge).QuarantineAge\r\n    Write-Output \"[Info]  QuarantineAge (in days): $QuarantineAge\"\r\n    Write-Output \"[Info]  QuarantineAge (in days): $QuarantineAge\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n    # Quarantine Files\r\n    if (Test-Path \"$QuarantineDirectory\\*.bup\")\r\n    {\r\n        $BUPFILES = Get-ChildItem \"$QuarantineDirectory\\*.bup\" | Measure-Object | ForEach-Object{$_.Count}\r\n        Write-Output \"[Alert] $BUPFILES McAfee Quarantine file(s) found\"\r\n        Write-Output \"[Alert] $BUPFILES McAfee Quarantine file(s) found\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Info]  No McAfee Quarantine file(s) found\"\r\n        Write-Output \"[Info]  No McAfee Quarantine file(s) found\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n# Trend Micro Apex One\r\nif (Test-Path \"HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ApexOneNT\")\r\n{\r\n    # Version\r\n    $Version = ((Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ApexOneNT\" -Name DisplayVersion).DisplayVersion).split(\"\\.\")[0,1] -join \".\"\r\n    $Build = ((Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ApexOneNT\" -Name DisplayVersion).DisplayVersion).split(\"\\.\")[-1]\r\n    Write-Output \"[Info]  Trend Micro Apex One $Version (Build: $Build)\"\r\n    Write-Output \"[Info]  Trend Micro Apex One $Version (Build: $Build)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n    # Agent Installation Folder\r\n    $InstallPath = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\TrendMicro\\Osprey\" -Name InstallPath).InstallPath\r\n    Write-Output \"[Info]  Agent Installation Folder: $InstallPath\"\r\n    Write-Output \"[Info]  Agent Installation Folder: $InstallPath\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n    # QuarantineDirectory\r\n    if (Test-Path \"$InstallPath\\SUSPECT\\Backup\\*.qtn\")\r\n    {\r\n        $QTNFILES = Get-ChildItem \"$InstallPath\\SUSPECT\\Backup\\*.qtn\" | Measure-Object | ForEach-Object{$_.Count}\r\n        Write-Output \"[Alert] $QTNFILES Trend Micro Quarantine file(s) found\"\r\n        Write-Output \"[Alert] $QTNFILES Trend Micro Quarantine file(s) found\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Info]  No Trend Micro Quarantine file(s) found\"\r\n        Write-Output \"[Info]  No Trend Micro Quarantine file(s) found\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n# Sophos Endpoint Security and Control (SESC) --> Sophos Anti-Virus (SAV)\r\nif (Test-Path \"HKLM:\\SOFTWARE\\Wow6432Node\\Sophos\\SavService\\Application\")\r\n{\r\n    # Version\r\n    $Version = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Wow6432Node\\Sophos\\SavService\\Telemetry\\Install\" -Name Version).Version\r\n\r\n    # UpToDateState\r\n    $UpToDateState = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Wow6432Node\\Sophos\\SavService\\Status\" -Name UpToDateState).UpToDateState\r\n\r\n    # 1 - TRUE\r\n    \r\n    Write-Output \"[Info]  Sophos Anti-Virus $Version (UpToDateState: $UpToDateState)\"\r\n\r\n    # LastUpdateTime\r\n    $LastUpdateTime = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Wow6432Node\\Sophos\\SavService\\Status\" -Name LastUpdateTime).LastUpdateTime\r\n    $TimestampUtc = (([System.DateTimeOffset]::FromUnixTimeSeconds($LastUpdateTime)).DateTime).ToString(\"yyyy-MM-dd HH:mm:ss\")\r\n    Write-Output = \"[Info]  LastUpdateTime: $TimestampUtc UTC\"\r\n\r\n    # Features\r\n    $Features = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Wow6432Node\\Sophos\\SavService\\Telemetry\\Install\" -Name Features).Features\r\n    Write-Output \"[Info]  Features: $Features\"\r\n\r\n    # AV        - Anti-Virus\r\n    # CRT       - Competitor Removal Tool (detects third-party security software)\r\n    # DLP       - Data Leakage Prevention\r\n    # DVCCNTRL  - Device Control\r\n    # HIPS      - Host Intrusion Prevention\r\n    # PUA       - Potentially Unwanted Applications\r\n    # URLSCRTY  - URL-Filtering (Web Protection)\r\n    # WEBCNTRL  - Web Control\r\n\r\n    # LogDir\r\n    $LogDir = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Wow6432Node\\Sophos\\SavService\\Application\" -Name LogDir).LogDir\r\n    Write-Output \"[Info]  LogDir: $LogDir\"\r\n\r\n    # DBFolder\r\n    $DBFolder = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Wow6432Node\\Sophos\\SavService\\Safestore\" -Name DBFolder).DBFolder\r\n    Write-Output \"[Info]  DBFolder: $DBFolder\"\r\n\r\n    # SafestoreCount\r\n    $SafestoreCount = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Wow6432Node\\Sophos\\SavService\\Telemetry\\Safestore\" -Name store_count).store_count\r\n    Write-Output \"[Info]  SafestoreCount: $SafestoreCount\"\r\n}\r\n\r\n# Microsoft Defender for Endpoint\r\nif (Test-Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows Advanced Threat Protection\")\r\n{\r\n    if (Test-RegistryValue -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows Advanced Threat Protection\\Status\" -Value \"OnboardingState\")\r\n    {\r\n        if ((Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows Advanced Threat Protection\\Status\" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty OnboardingState) -eq $True)\r\n        {\r\n            # OnboardingState\r\n            $OnboardingState = (Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows Advanced Threat Protection\\Status\" -Name OnboardingState).OnboardingState\r\n\r\n            if ($OnboardingState -match \"1\")\r\n            {\r\n                Write-Output \"[Info]  Microsoft Defender for Endpoint (OnboardingState: 1)\"\r\n                Write-Output \"[Info]  Microsoft Defender for Endpoint (OnboardingState: 1)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n            else\r\n            {\r\n                Write-Output \"[Info]  Microsoft Defender for Endpoint (OnboardingState: 0)\"\r\n                Write-Output \"[Info]  Microsoft Defender for Endpoint (OnboardingState: 0)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n\r\n            # senseId\r\n            $senseId = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows Advanced Threat Protection\" -Name senseId).senseId\r\n            Write-Output \"[Info]  senseId: $senseId\"\r\n            Write-Output \"[Info]  senseId: $senseId\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n            # senseGuid\r\n            $senseGuid = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows Advanced Threat Protection\" -Name senseGuid).senseGuid\r\n            Write-Output \"[Info]  senseGuid: $senseGuid\"\r\n            Write-Output \"[Info]  senseGuid: $senseGuid\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n            # OrgId\r\n            $OrgId = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows Advanced Threat Protection\\Status\" -Name OrgId).OrgId\r\n            Write-Output \"[Info]  OrgId: $OrgId\"\r\n            Write-Output \"[Info]  OrgId: $OrgId\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n            # LastConnected\r\n            $LastConnected = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows Advanced Threat Protection\\Status\" -Name LastConnected).LastConnected\r\n            $TimestampUtc = [datetime]::FromFileTime($LastConnected).ToString(\"yyyy-MM-dd HH:mm:ss\")\r\n            Write-Output \"[Info]  LastConnected: $TimestampUtc\"\r\n            Write-Output \"[Info]  LastConnected: $TimestampUtc\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        }\r\n    }\r\n}\r\n\r\n# Microsoft Defender AntiVirus\r\nif (Get-Command -CommandType Function Get-MpComputerStatus -ErrorAction SilentlyContinue)\r\n{\r\n    New-Item \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\" -ItemType Directory -Force | Out-Null\r\n\r\n    # MpComputerStatus\r\n    Get-MpComputerStatus -ErrorAction SilentlyContinue| Out-File \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\MpComputerStatus.txt\"\r\n\r\n    # Real-Time Monitoring\r\n    $RealTimeProtectionEnabled = (Get-MpComputerStatus | Select-Object RealTimeProtectionEnabled -ErrorAction SilentlyContinue).RealTimeProtectionEnabled\r\n    if ($IsTamperProtected)\r\n    {\r\n        $RealTimeProtectionEnabled | Out-File \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\RealTimeProtectionEnabled.txt\"\r\n    }\r\n\r\n    # Tamper Protection\r\n    $IsTamperProtected = (Get-MpComputerStatus | Select-Object IsTamperProtected -ErrorAction SilentlyContinue).IsTamperProtected\r\n    if ($IsTamperProtected)\r\n    {\r\n        $IsTamperProtected | Out-File \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\IsTamperProtected.txt\"\r\n    }\r\n\r\n    # AMRunningMode\r\n    $AMRunningMode = (Get-MpComputerStatus | Select-Object AMRunningMode -ErrorAction SilentlyContinue).AMRunningMode\r\n    if ($AMRunningMode)\r\n    {\r\n        $AMRunningMode | Out-File \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\AMRunningMode.txt\"\r\n    }\r\n\r\n    # Normal means Microsoft Defender Antivirus is running in active mode.\r\n    # Passive mode means Microsoft Defender Antivirus running, but is not the primary antivirus/antimalware product on your device. Passive mode is only available for devices that are onboarded to Microsoft Defender for Endpoint and that meet certain requirements.\r\n    # EDR Block Mode means Microsoft Defender Antivirus is running and Endpoint detection and response (EDR) in block mode, a capability in Microsoft Defender for Endpoint, is enabled. Check the ForceDefenderPassiveMode registry key. If its value is 0, it is running in normal mode; otherwise, it is running in passive mode.\r\n    # SxS Passive Mode means Microsoft Defender Antivirus is running alongside another antivirus/antimalware product, and limited periodic scanning is used.\r\n\r\n    # IsVirtualMachine (True/False)\r\n    $IsVirtualMachine = (Get-MpComputerStatus | Select-Object IsVirtualMachine -ErrorAction SilentlyContinue).IsVirtualMachine\r\n    if ($IsVirtualMachine)\r\n    {\r\n        $IsVirtualMachine | Out-File \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\IsVirtualMachine.txt\"\r\n    }\r\n\r\n    # MpPreference\r\n    if (Get-Command -Name Get-MpPreference -CommandType Function -ErrorAction SilentlyContinue)\r\n    {\r\n        Get-MpPreference | Out-File \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\Get-MpPreference.txt\"\r\n\r\n        # Exclusions\r\n        New-Item \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\Exclusions\" -ItemType Directory -Force | Out-Null\r\n\r\n        # ExclusionPath\r\n        $ExclusionPath = (Get-MpPreference | Select-Object ExclusionPath).ExclusionPath\r\n        if ($ExclusionPath)\r\n        {\r\n            $ExclusionPath | Out-File \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\Exclusions\\ExclusionPath.txt\"\r\n        }\r\n\r\n        # ExclusionExtension\r\n        $ExclusionExtension = (Get-MpPreference | Select-Object ExclusionExtension).ExclusionExtension\r\n        if ($ExclusionExtension)\r\n        {\r\n            $ExclusionExtension | Out-File \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\Exclusions\\ExclusionExtension.txt\"\r\n        }\r\n\r\n        # ExclusionIpAddress\r\n        $ExclusionIpAddress = (Get-MpPreference | Select-Object ExclusionIpAddress -ErrorAction SilentlyContinue).ExclusionIpAddress\r\n        if ($ExclusionIpAddress)\r\n        {\r\n            $ExclusionIpAddress | Out-File \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\Exclusions\\ExclusionIpAddress.txt\"\r\n        }\r\n\r\n        # ExclusionProcess\r\n        $ExclusionProcess = (Get-MpPreference | Select-Object ExclusionProcess -ErrorAction SilentlyContinue).ExclusionProcess\r\n        if ($ExclusionProcess)\r\n        {\r\n            $ExclusionProcess | Out-File \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\Exclusions\\ExclusionProcess.txt\"\r\n        }\r\n    }\r\n\r\n    # Gets active and past malware threats that Windows Defender detected\r\n    Get-MpThreatDetection -ErrorAction SilentlyContinue | Out-File \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\Get-MpThreatDetection.txt\"\r\n\r\n    # Gets the history of threats detected on the computer\r\n    Get-MpThreat -ErrorAction SilentlyContinue | Out-File \"$OUTPUT_FOLDER\\System-Info\\Microsoft-Defender\\Get-MpThreat.txt\"\r\n}\r\n\r\n# Get-SecurityProduct\r\nFunction Get-SecurityProduct \r\n{\r\n    # AntiVirusProduct\r\n    if (Get-WmiObject -List -Namespace \"root\\SecurityCenter2\" -ErrorAction SilentlyContinue | Where-Object {$_.Name -eq \"AntiVirusProduct\"})\r\n    {\r\n        $AntiVirusProducts = Get-WmiObject -Namespace \"root\\SecurityCenter2\" -Class AntiVirusProduct\r\n\r\n        if ($AntiVirusProducts) \r\n        {\r\n            $AntiVirus = @()\r\n            ForEach($AntiVirusProduct in $AntiVirusProducts)\r\n            {\r\n                # Switch to determine the status of Anti-Virus definitions and Real-Time Protection\r\n                switch ($AntiVirusProduct.productState) \r\n                {\r\n                    \"262144\" {$RealTimeProtectionStatus = \"No\"; $DefinitionStatus = \"Yes\" } # McAfee Endpoint Security (ENS)\r\n                    \"262160\" {$RealTimeProtectionStatus = \"No\"; $DefinitionStatus = \"No\" }\r\n                    \"266240\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"Yes\"} # McAfee Endpoint Security (ENS)\r\n                    \"266256\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"No\"}\r\n                    \"393216\" {$RealTimeProtectionStatus = \"No\"; $DefinitionStatus = \"Yes\"}  # Microsoft Security Essentials, McAfee Endpoint Security (ENS)\r\n                    \"393232\" {$RealTimeProtectionStatus = \"No\"; $DefinitionStatus = \"No\"}\r\n                    \"393472\" {$RealTimeProtectionStatus = \"No\"; $DefinitionStatus = \"Yes\"}  # Windows Defender\r\n                    \"393488\" {$RealTimeProtectionStatus = \"No\"; $DefinitionStatus = \"No\"}\r\n                    \"397312\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"Yes\"} # Microsoft Security Essentials, McAfee Endpoint Security (ENS)\r\n                    \"397328\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"No\"}  # McAfee Endpoint Security (ENS)\r\n                    \"397568\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"Yes\"} # Windows Defender\r\n                    \"397584\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"No\"}  # Windows Defender\r\n                    \"401664\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"Yes\"} # Windows Defender\r\n                    default {$RealTimeProtectionStatus = \"Unknown\"; $DefinitionStatus = \"Unknown\"}\r\n                }\r\n\r\n                $AV = @{}\r\n                $AV.'Display Name' = $AntiVirusProduct.displayName\r\n                $AV.'Instance GUID' = $AntiVirusProduct.instanceGuid\r\n                $AV.'Product State' = $AntiVirusProduct.productState\r\n                $AV.'Enabled' = $RealTimeProtectionStatus\r\n                $AV.'Up To Date' = $DefinitionStatus\r\n                $AV.'Product Type' = \"AntiVirusProduct\"\r\n                $AV.'Product EXE' = $AntiVirusProduct.pathToSignedProductExe\r\n                $AV.'Reporting EXE' = $AntiVirusProduct.pathToSignedReportingExe\r\n\r\n                $AntiVirus += New-Object -TypeName PSObject -Property $AV\r\n            }\r\n\r\n            New-Item \"$OUTPUT_FOLDER\\System-Info\\Get-SecurityProduct\" -ItemType Directory -Force | Out-Null\r\n            $AntiVirus | Select-Object \"Display Name\",\"Instance GUID\",\"Product State\",\"Enabled\",\"Up To Date\",\"Product Type\",\"Product EXE\",\"Reporting EXE\" | ConvertTo-Csv -NoTypeInformation -Delimiter \",\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\Get-SecurityProduct\\SecurityProducts.csv\"\r\n        }\r\n    }\r\n\r\n    # AntiSpywareProduct\r\n    if (Get-WmiObject -List -Namespace \"root\\SecurityCenter2\" -ErrorAction SilentlyContinue | Where-Object {$_.Name -eq \"AntiSpywareProduct\"})\r\n    {\r\n        $AntiSpywareProducts = Get-WmiObject -Namespace \"root\\SecurityCenter2\" -Class AntiSpywareProduct\r\n\r\n        if ($AntiSpywareProducts) \r\n        {\r\n            $AntiSpyware = @()\r\n            ForEach($AntiSpywareProduct in $AntiSpywareProducts)\r\n            {\r\n                switch ($AntiSpywareProduct.productState) \r\n                {\r\n                    \"262144\" {$RealTimeProtectionStatus = \"No\"; $DefinitionStatus = \"Yes\" }\r\n                    \"262160\" {$RealTimeProtectionStatus = \"No\"; $DefinitionStatus = \"No\" }\r\n                    \"266240\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"Yes\"}\r\n                    \"266256\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"No\"}\r\n                    \"393216\" {$RealTimeProtectionStatus = \"No\"; $DefinitionStatus = \"Yes\"}\r\n                    \"393232\" {$RealTimeProtectionStatus = \"No\"; $DefinitionStatus = \"No\"}\r\n                    \"393472\" {$RealTimeProtectionStatus = \"No\"; $DefinitionStatus = \"Yes\"}\r\n                    \"393488\" {$RealTimeProtectionStatus = \"No\"; $DefinitionStatus = \"No\"}\r\n                    \"397312\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"Yes\"}\r\n                    \"397328\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"No\"}\r\n                    \"397568\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"Yes\"}\r\n                    \"397584\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"No\"}\r\n                    \"401664\" {$RealTimeProtectionStatus = \"Yes\"; $DefinitionStatus = \"Yes\"}\r\n                    default {$RealTimeProtectionStatus = \"Unknown\"; $DefinitionStatus = \"Unknown\"}\r\n                }\r\n\r\n                $AS = @{}\r\n                $AS.'Display Name' = $AntiSpywareProduct.displayName\r\n                $AS.'Instance GUID' = $AntiSpywareProduct.instanceGuid\r\n                $AS.'Product State' = $AntiSpywareProduct.productState\r\n                $AS.'Enabled' = $RealTimeProtectionStatus\r\n                $AS.'Up To Date' = $DefinitionStatus\r\n                $AS.'Product Type' = \"AntiSpywareProduct\"\r\n                $AS.'Product EXE' = $AntiSpywareProduct.pathToSignedProductExe\r\n                $AS.'Reporting EXE' = $AntiSpywareProduct.pathToSignedReportingExe\r\n\r\n                $AntiSpyware += New-Object -TypeName PSObject -Property $AS\r\n            }\r\n\r\n            New-Item \"$OUTPUT_FOLDER\\System-Info\\Get-SecurityProduct\" -ItemType Directory -Force | Out-Null\r\n            $AntiSpyware | Select-Object \"Display Name\",\"Instance GUID\",\"Product State\",\"Enabled\",\"Up To Date\",\"Product Type\",\"Product EXE\",\"Reporting EXE\" | ConvertTo-Csv -NoTypeInformation -Delimiter \",\" | Select-Object -Skip 1 | Out-File \"$OUTPUT_FOLDER\\System-Info\\Get-SecurityProduct\\SecurityProducts.csv\" -Append \r\n        }\r\n    }\r\n}\r\n\r\nGet-SecurityProduct\r\n\r\n# ProductName\r\nif (Test-RegistryValue -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Value \"ProductName\")\r\n{\r\n    $ProductName = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name ProductName).ProductName)\r\n}\r\n\r\n# OSArchitecture\r\n$OSArchitecture = ( (Get-WmiObject -Class Win32_OperatingSystem).OSArchitecture )\r\n\r\nif ($OSArchitecture -like \"*64*\")\r\n{\r\n    $OSArchitecture = \"64-Bit\"\r\n}\r\nelse\r\n{\r\n    $OSArchitecture = \"32-Bit\"\r\n}\r\n\r\n# Processor Architecture\r\n\r\n# ARM\r\nif ($env:PROCESSOR_ARCHITECTURE -like \"*ARM*\")\r\n{\r\n    $ProcessorArchitecture = \"ARM-based Processor\"\r\n}\r\n\r\n# AMD64\r\nif ($env:PROCESSOR_ARCHITECTURE -like \"*AMD64*\")\r\n{\r\n    $ProcessorArchitecture = \"x64-based Processor\"\r\n}\r\n\r\n# x86\r\nif ($env:PROCESSOR_ARCHITECTURE -like \"*x86*\")\r\n{\r\n    $ProcessorArchitecture = \"x86-based Processor\"\r\n}\r\n\r\n# CSDVersion\r\nif (Test-RegistryValue -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Value \"CSDVersion\")\r\n{\r\n    $OSVersion = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name CSDVersion).CSDVersion)\r\n}\r\n\r\n# Windows 10\r\nif ($ProductName -like \"*Windows 10*\")\r\n{\r\n    # Major\r\n    $Major = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name CurrentMajorVersionNumber).CurrentMajorVersionNumber)\r\n\r\n    # Minor\r\n    $Minor = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name CurrentMinorVersionNumber).CurrentMinorVersionNumber)\r\n}\r\nelse \r\n{\r\n    # CurrentVersion\r\n    $CurrentVersion = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name CurrentVersion).CurrentVersion)\r\n\r\n    # Major\r\n    $Major = $CurrentVersion.split('.')[0]\r\n\r\n    # Minor\r\n    $Minor = $CurrentVersion.split('.')[1]\r\n}\r\n\r\n# Windows 10, Windows 11, Windows Server 2016, Windows Server 2019, and Windows Server 2022\r\nif (($ProductName -like \"*Windows 10*\") -Or ($ProductName -like \"*Windows Server 2016*\") -Or ($ProductName -like \"*Windows Server 2019*\") -Or ($ProductName -like \"*Windows Server 2022*\"))\r\n{\r\n    # DisplayVersion\r\n    if (Test-RegistryValue -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Value \"DisplayVersion\")\r\n    {\r\n        $DisplayVersion = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name DisplayVersion).DisplayVersion)\r\n    }\r\n\r\n    # ReleaseID\r\n    if (Test-RegistryValue -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Value \"ReleaseID\")\r\n    {\r\n        $ReleaseID = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name ReleaseID).ReleaseID)\r\n    }\r\n\r\n    # CurrentBuildNumber\r\n    if (Test-RegistryValue -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Value \"CurrentBuildNumber\")\r\n    {\r\n        $CurrentBuildNumber = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name CurrentBuildNumber).CurrentBuildNumber)\r\n    }\r\n\r\n    # UBR (Update Build Revision)\r\n    if (Test-RegistryValue -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Value \"UBR\")\r\n    {\r\n        $UBR = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name UBR).UBR)\r\n    }\r\n\r\n    # Windows 11 (CurrentBuildNumber + Update Build Revision)\r\n    # Windows 11 Build 21996 --> First Developer Preview\r\n    # Windows 11 Build 22000 --> First Public Preview\r\n    if ($CurrentBuildNumber -ge \"21996\")\r\n    {\r\n        $ProductName = $ProductName | ForEach-Object{($_ -replace \"10\",\"11\")}\r\n        Write-Output \"[Info]  OS: $ProductName ($OSArchitecture), Version: $DisplayVersion ($Major.$Minor.$CurrentBuildNumber.$UBR)\"\r\n        Write-Output \"[Info]  OS: $ProductName ($OSArchitecture), Version: $DisplayVersion ($Major.$Minor.$CurrentBuildNumber.$UBR)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n\r\n        # System Type\r\n        Write-Output \"[Info]  System Type: $OSArchitecture Operating System, $ProcessorArchitecture\"\r\n        Write-Output \"[Info]  System Type: $OSArchitecture Operating System, $ProcessorArchitecture\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    else\r\n    {\r\n        if ($DisplayVersion)\r\n        {\r\n            Write-Output \"[Info]  OS: $ProductName ($OSArchitecture), Version: $ReleaseID / $DisplayVersion ($Major.$Minor.$CurrentBuildNumber.$UBR)\"\r\n            Write-Output \"[Info]  OS: $ProductName ($OSArchitecture), Version: $ReleaseID / $DisplayVersion ($Major.$Minor.$CurrentBuildNumber.$UBR)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        }\r\n        else\r\n        {\r\n            Write-Output \"[Info]  OS: $ProductName, Version: $ReleaseID ($Major.$Minor.$CurrentBuildNumber.$UBR)\"\r\n            Write-Output \"[Info]  OS: $ProductName, Version: $ReleaseID ($Major.$Minor.$CurrentBuildNumber.$UBR)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n            # System Type\r\n            Write-Output \"[Info]  System Type: $OSArchitecture Operating System, $ProcessorArchitecture\"\r\n            Write-Output \"[Info]  System Type: $OSArchitecture Operating System, $ProcessorArchitecture\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        }\r\n    }\r\n}\r\nelse\r\n{\r\n    # CurrentBuildNumber\r\n    $CurrentBuildNumber = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name CurrentBuildNumber).CurrentBuildNumber)\r\n\r\n    # Revision Number\r\n    if (Test-RegistryValue -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Value \"BuildLabEx\")\r\n    {\r\n        # BuildLabEx\r\n        $BuildLabEx = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name BuildLabEx).BuildLabEx)\r\n        $RevisionNumber = $BuildLabEx.split('.')[1]\r\n    }\r\n    else\r\n    {\r\n        if (Test-RegistryValue -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Value \"BuildLab\")\r\n        {\r\n            # BuildLab\r\n            $BuildLab = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name BuildLab).BuildLab)\r\n            $RevisionNumber = $BuildLab.split('-')[1]\r\n        }\r\n    }\r\n\r\n    if (Test-RegistryValue -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Value \"CSDVersion\")\r\n    {\r\n        Write-Output \"[Info]  OS: $ProductName ($OSArchitecture), $OSVersion ($Major.$Minor.$CurrentBuildNumber.$RevisionNumber)\"\r\n        Write-Output \"[Info]  OS: $ProductName ($OSArchitecture), $OSVersion ($Major.$Minor.$CurrentBuildNumber.$RevisionNumber)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Info]  OS: $ProductName ($OSArchitecture), Version: $Major.$Minor (Build: $CurrentBuildNumber.$RevisionNumber)\"\r\n        Write-Output \"[Info]  OS: $ProductName ($OSArchitecture), Version: $Major.$Minor (Build: $CurrentBuildNumber.$RevisionNumber)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n# InstallDate (ISO 8601)\r\n$OS = Get-WmiObject -class Win32_OperatingSystem\r\n$InstallDate = ( $OS.ConvertToDateTime($OS.InstallDate).ToString(\"yyyy-MM-dd HH:mm:ss\") )\r\nWrite-Output \"[Info]  InstallDate: $InstallDate UTC\"\r\nWrite-Output \"[Info]  InstallDate: $InstallDate UTC\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n# InstallDates (MM/dd/yyyy)\r\n(Get-ChildItem \"HKLM:\\SYSTEM\\Setup\\Source OS*\" | ForEach-Object {Get-ItemProperty $_.PSPath | Select-Object -Property PSChildName,ProductName,ReleaseId} | Sort-Object -Property ReleaseId | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\InstallDates.txt\" 2> $null\r\n\r\n# RegisteredOrganization\r\nif ($null -ne (Get-Item -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\").GetValue(\"RegisteredOrganization\"))\r\n{\r\n    $RegisteredOrganization = ( (Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\\" -Name RegisteredOrganization).RegisteredOrganization )\r\n    if ($null -ne $RegisteredOrganization)\r\n    {\r\n        Write-Output \"[Info]  RegisteredOrganization: --\"\r\n        Write-Output \"[Info]  RegisteredOrganization: --\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    } \r\n    else \r\n    {\r\n        Write-Output \"[Info]  RegisteredOrganization: $RegisteredOrganization\"\r\n        Write-Output \"[Info]  RegisteredOrganization: $RegisteredOrganization\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n# RegisteredOwner\r\nif ($null -ne (Get-Item -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\").GetValue(\"RegisteredOwner\"))\r\n{\r\n    $RegisteredOwner = ( (Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\\" -Name RegisteredOwner).RegisteredOwner )\r\n    if ($null -ne $RegisteredOwner)\r\n    {\r\n        Write-Output \"[Info]  RegisteredOwner: --\"\r\n        Write-Output \"[Info]  RegisteredOwner: --\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Info]  RegisteredOwner: $RegisteredOwner\"\r\n        Write-Output \"[Info]  RegisteredOwner: $RegisteredOwner\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n# OEM Information\r\nif (Test-RegistryValue -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\OEMInformation\" -Value \"Manufacturer\")\r\n{\r\n    (Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\OEMInformation\" | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\OEMInformation.txt\" 2> $null\r\n}\r\n\r\n# System Language ID\r\n# https://docs.microsoft.com/en-us/windows/desktop/intl/language-identifier-constants-and-strings\r\n$SystemLanguageID = ( (Get-WmiObject -class Win32_OperatingSystem).Locale )\r\nWrite-Output \"[Info]  System Language ID: $SystemLanguageID (e.g. 0407 = Germany)\"\r\nWrite-Output \"[Info]  System Language ID: $SystemLanguageID (e.g. 0407 = Germany)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n# Keyboard Layout\r\n# https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-language-pack-default-values\r\n# Note: This will return a list of all installed keyboards of the current user, with the one currently in use as 1.\r\nreg query \"HKEY_CURRENT_USER\\Keyboard Layout\\Preload\" | Where-Object {$_ -ne \"\"} > \"$OUTPUT_FOLDER\\System-Info\\Keyboard-Layout.txt\" 2> $null\r\n\r\n# Computer System\r\n(Get-WmiObject -Class Win32_ComputerSystem | Select-Object Name,Manufacturer,Model,ChassisSKUNumber,Domain,SystemType,PrimaryOwnerName | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\ComputerSystem.txt\" 2> $null\r\n\r\n# Physical Memory\r\n(Get-WmiObject -Class Win32_PhysicalMemory | Select-Object Manufacturer,PartNumber,SerialNumber,Banklabel,Configuredclockspeed,Devicelocator,Capacity | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\PhysicalMemory.txt\" 2> $null\r\n\r\n# BIOS\r\n(Get-WmiObject -Class Win32_BIOS | Select-Object Manufacturer,SMBIOSBIOSVersion,Name,SerialNumber,Version,ReleaseDate | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\BIOS.txt\" 2> $null\r\n\r\n# Operating System\r\n(Get-WmiObject -Class Win32_OperatingSystem | Select-Object Manufacturer,Caption,Version,BuildNumber,OSArchitecture,OSLanguage,Locale,SystemDrive,NumberOfProcesses | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\OperatingSystem.txt\" 2> $null\r\n\r\n# User Accounts (Local)\r\n(Get-WmiObject -Class Win32_UserAccount -Filter \"LocalAccount='True'\" | Select-Object AccountType,Description,Status,Disabled,Caption,Domain,SID,FullName,Name,LocalAccount,Lockout,PasswordRequired,PasswordChangeable,PasswordExpires | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\UserAccounts-Local.txt\" 2> $null\r\n\r\n# Users\r\n(Get-ChildItem -Force \"$env:SystemDrive\\Users\\*\\NTUSER.DAT\" | Select-Object FullName,Length, CreationTimeUtc,LastAccessTimeUtc,LastWriteTimeUtc,Attributes | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\Users.txt\" 2> $null\r\n\r\n# PsLoggedOn --> No ARM64 Support\r\n# Note: When launched for the first time, PsLoggedOn will create following regkey: HKCU\\Software\\Sysinternals\\PsLoggedOn\\EulaAccepted=0x01\r\nif (!($env:PROCESSOR_ARCHITECTURE -eq \"ARM64\"))\r\n{\r\n    & $PsLoggedOn -accepteula > \"$OUTPUT_FOLDER\\System-Info\\PsLoggedOn.txt\"\r\n}\r\n\r\n# Local Users\r\nif (Get-Command -CommandType Cmdlet Get-LocalUser -ErrorAction SilentlyContinue)\r\n{\r\n    Get-LocalUser | Format-Table | Out-File \"$OUTPUT_FOLDER\\System-Info\\LocalUsers.txt\" -Encoding UTF8\r\n}\r\n\r\n# Active Users\r\nif (Get-Command -CommandType Application query -ErrorAction SilentlyContinue)\r\n{\r\n    query user > \"$OUTPUT_FOLDER\\System-Info\\ActiveUsers.txt\"\r\n}\r\n\r\n# Check if WMI Class exists\r\nif (Get-WmiObject -List | Where-Object {$_.Name -eq \"Win32_Printer\"})\r\n{\r\n    # Printer\r\n    (Get-WmiObject -Class Win32_Printer | Format-Table DeviceID,DriverName -AutoSize | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\Printer.txt\" 2> $null\r\n    Get-WmiObject -Class Win32_Printer | Select-Object DeviceID,DriverName | Export-Csv \"$OUTPUT_FOLDER\\System-Info\\Printer.csv\" -Delimiter \"`t\" -NoTypeInformation\r\n}\r\n\r\n# Virtualization-Based Security (VBS)\r\nif (Get-Command -CommandType Cmdlet Get-CimInstance -ErrorAction SilentlyContinue)\r\n{\r\n    # Check if WMI Namespace exists\r\n    if (Get-WmiObject -List -Namespace \"root\\Microsoft\\Windows\\DeviceGuard\" -ErrorAction SilentlyContinue | Where-Object {$_.Name -eq \"Win32_DeviceGuard\"})\r\n    {\r\n        Function Get-DeviceGuardStatus\r\n        {\r\n            $AvailableSecurityPropertiesTable = @{\r\n                1 = 'BaseVirtualizationSupport'\r\n                2 = 'SecureBoot'\r\n                3 = 'DMAProtection'\r\n                4 = 'SecureMemoryOverwrite'\r\n                5 = 'UEFICodeReadOnly'\r\n                6 = 'SMMSecurityMitigations1.0'\r\n            }\r\n\r\n            $CodeIntegrityPolicyEnforcementStatusTable = @{\r\n                0 = 'Off'\r\n                1 = 'AuditMode'\r\n                2 = 'EnforcementMode'\r\n            }\r\n\r\n            $SecurityServicesConfiguredTable = @{\r\n                1 = 'CredentialGuard'\r\n                2 = 'HypervisorEnforcedCodeIntegrity'\r\n            }\r\n\r\n            $VirtualizationBasedSecurityStatusTable = @{\r\n                0 = 'Off'\r\n                1 = 'Configured'\r\n                2 = 'Running'\r\n            }\r\n            \r\n            $DeviceGuardStatus = Get-CimInstance -Namespace root\\Microsoft\\Windows\\DeviceGuard -ClassName Win32_DeviceGuard\r\n\r\n            if ($DeviceGuardStatus) \r\n            {\r\n                $AvailableSecurityProperties = $DeviceGuardStatus.AvailableSecurityProperties | ForEach-Object { $AvailableSecurityPropertiesTable[[Int32] $_] }\r\n                $CodeIntegrityPolicyEnforcementStatus = $CodeIntegrityPolicyEnforcementStatusTable[[Int32] $DeviceGuardStatus.CodeIntegrityPolicyEnforcementStatus]\r\n                $RequiredSecurityProperties = $DeviceGuardStatus.RequiredSecurityProperties | ForEach-Object { $AvailableSecurityPropertiesTable[[Int32] $_] }\r\n                $SecurityServicesConfigured = $DeviceGuardStatus.SecurityServicesConfigured | ForEach-Object { $SecurityServicesConfiguredTable[[Int32] $_] }\r\n                $SecurityServicesRunning = $DeviceGuardStatus.SecurityServicesRunning | ForEach-Object { $SecurityServicesConfiguredTable[[Int32] $_] }\r\n                $UsermodeCodeIntegrityPolicyEnforcementStatus = $CodeIntegrityPolicyEnforcementStatusTable[[Int32] $DeviceGuardStatus.UsermodeCodeIntegrityPolicyEnforcementStatus]\r\n                $VirtualizationBasedSecurityStatus = $VirtualizationBasedSecurityStatusTable[[Int32] $DeviceGuardStatus.VirtualizationBasedSecurityStatus]\r\n        \r\n                $ObjectProperties = [Ordered] @{\r\n                    AvailableSecurityProperties = $AvailableSecurityProperties\r\n                    CodeIntegrityPolicyEnforcementStatus = $CodeIntegrityPolicyEnforcementStatus\r\n                    InstanceIdentifier = $DeviceGuardStatus.InstanceIdentifier\r\n                    RequiredSecurityProperties = $RequiredSecurityProperties\r\n                    SecurityServicesConfigured = $SecurityServicesConfigured\r\n                    SecurityServicesRunning = $SecurityServicesRunning\r\n                    UsermodeCodeIntegrityPolicyEnforcementStatus = $UsermodeCodeIntegrityPolicyEnforcementStatus\r\n                    Version = $DeviceGuardStatus.Version\r\n                    VirtualizationBasedSecurityStatus = $VirtualizationBasedSecurityStatus\r\n                }\r\n\r\n                [PSCustomObject] $ObjectProperties\r\n            }\r\n        }\r\n\r\n        $AvailableSecurityProperties = (Get-DeviceGuardStatus | Select-Object -ExpandProperty AvailableSecurityProperties) -join ', '\r\n        $CodeIntegrityPolicyEnforcementStatus = (Get-DeviceGuardStatus | Select-Object CodeIntegrityPolicyEnforcementStatus).CodeIntegrityPolicyEnforcementStatus\r\n        $InstanceIdentifier = (Get-DeviceGuardStatus | Select-Object InstanceIdentifier).InstanceIdentifier\r\n        $RequiredSecurityProperties = (Get-DeviceGuardStatus | Select-Object RequiredSecurityProperties).RequiredSecurityProperties\r\n        $SecurityServicesConfigured = (Get-DeviceGuardStatus | Select-Object SecurityServicesConfigured).SecurityServicesConfigured\r\n        $SecurityServicesRunning = (Get-DeviceGuardStatus | Select-Object SecurityServicesRunning).SecurityServicesRunning\r\n        $UsermodeCodeIntegrityPolicyEnforcementStatus = (Get-DeviceGuardStatus | Select-Object UsermodeCodeIntegrityPolicyEnforcementStatus).UsermodeCodeIntegrityPolicyEnforcementStatus\r\n        $Version = (Get-DeviceGuardStatus | Select-Object Version).Version\r\n        $VirtualizationBasedSecurityStatus = (Get-DeviceGuardStatus | Select-Object VirtualizationBasedSecurityStatus).VirtualizationBasedSecurityStatus\r\n\r\n        Write-Output \"AvailableSecurityProperties                  : $AvailableSecurityProperties\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\DeviceGuard.txt\" -Append\r\n        Write-Output \"CodeIntegrityPolicyEnforcementStatus         : $CodeIntegrityPolicyEnforcementStatus\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\DeviceGuard.txt\" -Append\r\n        Write-Output \"InstanceIdentifier                           : $InstanceIdentifier\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\DeviceGuard.txt\" -Append\r\n        Write-Output \"RequiredSecurityProperties                   : $RequiredSecurityProperties\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\DeviceGuard.txt\" -Append\r\n        Write-Output \"SecurityServicesConfigured                   : $SecurityServicesConfigured\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\DeviceGuard.txt\" -Append\r\n        write-Output \"SecurityServicesRunning                      : $SecurityServicesRunning\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\DeviceGuard.txt\" -Append\r\n        Write-Output \"UsermodeCodeIntegrityPolicyEnforcementStatus : $UsermodeCodeIntegrityPolicyEnforcementStatus\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\DeviceGuard.txt\" -Append\r\n        Write-Output \"Version                                      : $Version\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\DeviceGuard.txt\" -Append\r\n        Write-Output \"VirtualizationBasedSecurityStatus            : $VirtualizationBasedSecurityStatus\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\DeviceGuard.txt\" -Append\r\n    }\r\n}\r\n\r\n# Time Difference\r\n$LocalTime = (Get-Date)\r\n$UniversalTime = [datetime]::Now.ToUniversalTime()\r\n$DiffHours = [math]::Round(($LocalTime - $UniversalTime).TotalHours)\r\n\r\nif ($DiffHours)\r\n{\r\n    if ($DiffHours -like \"*-*\")\r\n    {\r\n        $UTC = (\"UTC\" + $DiffHours + \":00\")\r\n    }\r\n    else\r\n    {\r\n        $UTC = (\"UTC+\" + $DiffHours + \":00\")\r\n    }\r\n}\r\n\r\n# Timezone Info\r\n$TimeZone = ( [TimeZoneInfo]::Local.Id )\r\nWrite-Output \"[Info]  Timezone Info: $TimeZone ($UTC)\"\r\nWrite-Output \"[Info]  Timezone Info: $TimeZone ($UTC)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n# StandardName\r\n(Get-WmiObject -Class Win32_TimeZone).StandardName > \"$OUTPUT_FOLDER\\System-Info\\Timezone-StandardName.txt\" 2> $null\r\n\r\n# DaylightName\r\n(Get-WmiObject -Class Win32_TimeZone).DaylightName > \"$OUTPUT_FOLDER\\System-Info\\Timezone-DaylightName.txt\" 2> $null\r\n\r\n# Caption\r\n(Get-WmiObject -Class Win32_TimeZone).Caption > \"$OUTPUT_FOLDER\\System-Info\\Timezone-Caption.txt\" 2> $null\r\n\r\n# Last Logged On User\r\n$LastLoggedOnUser = ( (Get-WmiObject -Class Win32_ComputerSystem -ErrorAction SilentlyContinue).Username -creplace '(?s)^.*\\\\', '' )\r\nWrite-Output \"[Info]  Last Logged On User: $LastLoggedOnUser\"\r\nWrite-Output \"[Info]  Last Logged On User: $LastLoggedOnUser\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n# Last Boot Up Time (ISO 8601)\r\n# https://www.systanddeploy.com/2022/06/using-powershell-to-get-real-device.html\r\nif (Test-RegistryValue -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power\" -Value \"HiberbootEnabled\")\r\n{\r\n    $FastBoot = (Get-ItemProperty \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power\" -ErrorAction SilentlyContinue).HiberbootEnabled\r\n\r\n    if($FastBoot -eq 0)\r\n    {\r\n        $OS = Get-WmiObject -Class Win32_OperatingSystem -ErrorAction SilentlyContinue\r\n        $Uptime = (Get-Date) - $OS.ConvertToDateTime($OS.LastBootUpTime)\r\n        Write-Output (\"[Info]  Last Boot: \" + $OS.ConvertToDateTime($OS.LastBootUpTime).ToUniversalTime().ToString(\"yyyy-MM-dd HH:mm:ss UTC\") )\r\n        Write-Output (\"[Info]  Uptime: \" + $Uptime.Days + \" Days \" + $Uptime.Hours + \" Hours \" + $Uptime.Minutes + \" Minutes\" )\r\n        Write-Output (\"[Info]  Last Boot: \" + $OS.ConvertToDateTime($OS.LastBootUpTime).ToUniversalTime().ToString(\"yyyy-MM-dd HH:mm:ss UTC\") ) | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        Write-Output (\"[Info]  Uptime: \" + $Uptime.Days + \" Days \" + $Uptime.Hours + \" Hours \" + $Uptime.Minutes + \" Minutes\" ) | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    elseif($FastBoot -eq 1)\r\n    {\r\n        $BootEvent = Get-WinEvent -ProviderName \"Microsoft-Windows-Kernel-Boot\"| Where-Object {$_.ID -eq 27 -and $_.Message -like \"*0x1*\"} # Shutdown with fast boot\r\n        if($null -ne $BootEvent)\r\n        {\r\n            $LastBoot = ($BootEvent[0].TimeCreated).ToUniversalTime().ToString(\"yyyy-MM-dd HH:mm:ss\")\r\n            $Uptime = New-TimeSpan -Start \"$LastBoot\" -End $(Get-Date)\r\n            Write-Output \"[Info]  Last Boot: $LastBoot UTC\"\r\n            Write-Output \"[Info]  Last Boot: $LastBoot UTC\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            Write-Output (\"[Info]  Uptime: \" + $Uptime.Days + \" Days \" + $Uptime.Hours + \" Hours \" + $Uptime.Minutes + \" Minutes\" )\r\n            Write-Output (\"[Info]  Uptime: \" + $Uptime.Days + \" Days \" + $Uptime.Hours + \" Hours \" + $Uptime.Minutes + \" Minutes\" ) | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        }\r\n    }\r\n}\r\nelse\r\n{\r\n    $OS = Get-WmiObject -Class Win32_OperatingSystem -ErrorAction SilentlyContinue\r\n    $Uptime = (Get-Date) - $OS.ConvertToDateTime($OS.LastBootUpTime)\r\n    Write-Output (\"[Info]  Last Boot: \" + $OS.ConvertToDateTime($OS.LastBootUpTime).ToUniversalTime().ToString(\"yyyy-MM-dd HH:mm:ss UTC\") )\r\n    Write-Output (\"[Info]  Uptime: \" + $Uptime.Days + \" Days \" + $Uptime.Hours + \" Hours \" + $Uptime.Minutes + \" Minutes\" )\r\n    Write-Output (\"[Info]  Last Boot: \" + $OS.ConvertToDateTime($OS.LastBootUpTime).ToUniversalTime().ToString(\"yyyy-MM-dd HH:mm:ss UTC\") ) | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    Write-Output (\"[Info]  Uptime: \" + $Uptime.Days + \" Days \" + $Uptime.Hours + \" Hours \" + $Uptime.Minutes + \" Minutes\" ) | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n}\r\n\r\n# Active Connections\r\nif (Get-Command -Name Get-NetTCPConnection -CommandType Function -ErrorAction SilentlyContinue)\r\n{\r\n    $netstat = Get-NetTCPConnection | Select-Object -Property @{N=\"CreationTime UTC\"; E={($_.CreationTime).ToUniversalTime().ToString(\"yyyy-MM-dd HH:mm:ss\")}},@{N=\"CreationTime\"; E={($_.CreationTime).ToString(\"yyyy-MM-dd HH:mm:ss\")}},LocalAddress,LocalPort,RemoteAddress,RemotePort,State\r\n\r\n    if ($netstat)\r\n    {\r\n        $netstat | Export-Csv \"$OUTPUT_FOLDER\\System-Info\\netstat.csv\" -NoTypeInformation\r\n        $netstat | Format-Table -AutoSize | Out-File \"$OUTPUT_FOLDER\\System-Info\\netstat.txt\"\r\n    }\r\n}\r\nelse\r\n{\r\n    netstat | Out-File \"$OUTPUT_FOLDER\\System-Info\\netstat.txt\"\r\n}\r\n\r\n# Opened Files (remotely through a shared folder)\r\nif (Get-Command -Name openfiles -CommandType Application -ErrorAction SilentlyContinue)\r\n{\r\n    # TXT\r\n    openfiles | Out-File \"$OUTPUT_FOLDER\\System-Info\\OpenFiles.txt\" -Encoding UTF8\r\n\r\n    # CSV\r\n    (openfiles) -split \"\\n\" -replace '\\s\\s+', ',' | Out-File \"$OUTPUT_FOLDER\\System-Info\\OpenFiles.csv\" -Encoding UTF8\r\n}\r\n\r\n# DNS Cache (useful for recent web history)\r\nif (Get-Command -Name Get-DnsClientCache -CommandType Function -ErrorAction SilentlyContinue)\r\n{\r\n    $DnsClientCacheEntries = Get-DnsClientCache\r\n\r\n    if ($DnsClientCacheEntries) \r\n    {\r\n        $DnsClientCache = @()\r\n        ForEach($DnsClientCacheEntry in $DnsClientCacheEntries)\r\n        {\r\n            switch ($DnsClientCacheEntry.Section) \r\n            {\r\n                \"1\" { $SectionObject = 'Answer' }\r\n                \"2\" { $SectionObject = 'Authority' }\r\n                \"3\" { $SectionObject = 'Additional' }\r\n            }\r\n\r\n            switch ($DnsClientCacheEntry.Status) \r\n            {\r\n                   \"0\" { $StatusObject = 'Success' }\r\n                \"9003\" { $StatusObject = 'NotExist' }\r\n                \"9701\" { $StatusObject = 'NoRecords' }\r\n            }\r\n\r\n            switch ($DnsClientCacheEntry.Type) \r\n            {\r\n                 \"1\" { $TypeObject = 'A' }\r\n                 \"2\" { $TypeObject = 'NS' }\r\n                 \"5\" { $TypeObject = 'CNAME' }\r\n                 \"6\" { $TypeObject = 'SOA' }\r\n                \"12\" { $TypeObject = 'PTR' }\r\n                \"15\" { $TypeObject = 'MX' }\r\n                \"28\" { $TypeObject = 'AAAA' }\r\n                \"33\" { $TypeObject = 'SRV' }\r\n            }\r\n\r\n            $DCC = @{}\r\n            $DCC.Name    = $DnsClientCacheEntry.Name\r\n            $DCC.Entry   = $DnsClientCacheEntry.Entry\r\n            $DCC.Data    = $DnsClientCacheEntry.Data\r\n            $DCC.Section = $SectionObject\r\n            $DCC.Status  = $StatusObject\r\n            $DCC.TTL     = $DnsClientCacheEntry.TTL\r\n            $DCC.Type    = $TypeObject\r\n\r\n            $DnsClientCache += New-Object -TypeName PSObject -Property $DCC\r\n        }\r\n\r\n        $DnsClientCache | Select-Object -Property Name, Entry, Data, Section, Status, TTL, Type | ConvertTo-Csv -NoTypeInformation -Delimiter \",\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\DnsClientCache.csv\"\r\n    }\r\n}\r\nelse\r\n{\r\n    ipconfig /displaydns | Out-File \"$OUTPUT_FOLDER\\System-Info\\ipconfig-displaydns.txt\" -Encoding UTF8\r\n}\r\n\r\n# Network ARP Info\r\nif (Get-Command -Name Get-NetNeighbor -CommandType Function -ErrorAction SilentlyContinue)\r\n{\r\n    Get-NetNeighbor | Select-Object -Property InterfaceAlias, IPAddress, AddressFamily, LinkLayerAddress, State, Store | Export-Csv \"$OUTPUT_FOLDER\\System-Info\\Network-ARP-Info.csv\" -NoTypeInformation\r\n}\r\nelse\r\n{\r\n    arp -a | Out-File \"$OUTPUT_FOLDER\\System-Info\\Network-ARP-Info.txt\" -Encoding UTF8\r\n}\r\n\r\n# IP Routing Info\r\nif (Get-Command -Name Get-NetRoute -CommandType Function -ErrorAction SilentlyContinue)\r\n{\r\n    Get-NetRoute | Select-Object -Property DestinationPrefix, NextHop, RouteMetric, ifIndex, Store, State, Protocol, InterfaceAlias | Export-Csv \"$OUTPUT_FOLDER\\System-Info\\IP-Routing-Info.csv\" -NoTypeInformation\r\n}\r\nelse\r\n{\r\n    route print | Out-File \"$OUTPUT_FOLDER\\System-Info\\IP-Routing-Info.txt\" -Encoding UTF8\r\n}\r\n\r\n# Prefetch Settings\r\nWrite-Output \"[Info]  Checking Prefetch Settings ... \"\r\nWrite-Output \"[Info]  Checking Prefetch Settings ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n$CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\n\r\nif (Test-RegistryValue -Path \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Control\\Session Manager\\Memory Management\\PrefetchParameters\" -Value \"EnablePrefetcher\")\r\n{\r\n    $PrefetchParameters = (Get-ItemProperty -Path \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Control\\Session Manager\\Memory Management\\PrefetchParameters\" -Name EnablePrefetcher).EnablePrefetcher\r\n    if ($PrefetchParameters -match \"0\")\r\n    {\r\n        Write-Output \"[Info]  Prefetching is disabled (0)\"\r\n        Write-Output \"        Note: The default value is 3.\"\r\n        Write-Output \"[Info]  Prefetching is disabled (0)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        Write-Output \"        Note: The default value is 3.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    \r\n    if ($PrefetchParameters -match \"1\")\r\n    {\r\n        Write-Output \"[Info]  Application launch prefetching is enabled (1)\"\r\n        Write-Output \"        Note: The default value is 3.\"\r\n        Write-Output \"[Info]  Application launch prefetching is enabled (1)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        Write-Output \"        Note: The default value is 3.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    \r\n    if ($PrefetchParameters -match \"2\")\r\n    {\r\n        Write-Output \"[Info]  Boot prefetching is enabled (2)\"\r\n        Write-Output \"        Note: The default value is 3.\"\r\n        Write-Output \"[Info]  Boot prefetching is enabled (2)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        Write-Output \"        Note: The default value is 3.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    \r\n    if ($PrefetchParameters -match \"3\")\r\n    {\r\n        Write-Output \"[Info]  Both application launch and boot prefetching is enabled (3)\"\r\n        Write-Output \"        Note: The default value is 3.\"\r\n\r\n        Write-Output \"[Info]  Both application launch and boot prefetching is enabled (3)\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        Write-Output \"        Note: The default value is 3.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n# Prefetch List\r\n# Win 7 - The Prefetch directory is self cleaning at 128 entries. When the 128 limit is reached Windows will keep the 32 most used Prefetch files.\r\n# Windows 8 and above: Limited to 1024 Prefetch files.\r\nif (Test-Path \"$env:SystemDrive\\Windows\\Prefetch\\*.pf\")\r\n{\r\n    # Count Prefetch Files\r\n    $Count = (Get-ChildItem -Path \"$env:SystemDrive\\Windows\\Prefetch\" -Filter \"*.pf\" | Measure-Object).Count\r\n    \r\n    # Total Size\r\n    $TotalSize = Get-FileSize((Get-ChildItem -Path \"$env:SystemDrive\\Windows\\Prefetch\" -Filter \"*.pf\" | Measure-Object Length -Sum).Sum)\r\n\r\n    Write-Output \"[Info]  $Count Prefetch Files found ($TotalSize).\"\r\n\r\n    # Prefetch Files\r\n    New-Item \"$OUTPUT_FOLDER\\System-Info\\Prefetch\" -ItemType Directory -Force | Out-Null\r\n\r\n    # TXT\r\n    Get-ChildItem -Path \"$env:SystemDrive\\Windows\\Prefetch\" -Filter \"*.pf\" | Select-Object Name | Out-File \"$OUTPUT_FOLDER\\System-Info\\Prefetch\\Prefetch-List.txt\"\r\n\r\n    # CSV\r\n    Get-ChildItem -Path \"$env:SystemDrive\\Windows\\Prefetch\" -Filter \"*.pf\" | Select-Object Name, Length, @{Name=\"Size\";Expression={ Get-FileSize ($_.Length) }},CreationTime,LastAccessTime,LastWriteTime,CreationTimeUtc,LastAccessTimeUtc,LastWriteTimeUtc | Export-Csv \"$OUTPUT_FOLDER\\System-Info\\Prefetch\\Prefetch-List.csv\" -NoTypeInformation\r\n}\r\nelse\r\n{\r\n    Write-Output \"[Info]  No Prefetch Files found.\"\r\n}\r\n\r\n# Roaming User Profiles\r\n\r\n# Roaming User Profiles redirects user profiles to a file share so that users receive the same operating system and application settings on multiple computers. \r\n# When a user signs in to a computer by using an account that is set up with a file share as the profile path, the user's profile is downloaded to the local computer and merged with the local profile (if present).\r\n# When the user signs out of the computer, the local copy of their profile, including any changes, is merged with the server copy of the profile. Typically, a network administrator enables Roaming User Profiles on domain accounts. \r\n\r\nFunction Get-RoamingProfile {\r\n\r\nGet-WmiObject -Class Win32_UserProfile | Select-Object LocalPath,\r\n    @{N=\"LastUseTime UTC\"; E={$_.ConvertToDateTime($_.LastUseTime).ToUniversalTime().ToString(\"yyyy-MM-dd HH:mm:ss\")}},\r\n    @{N=\"LastUseTime\"; E={$_.ConvertToDateTime($_.LastUseTime).ToString(\"yyyy-MM-dd HH:mm:ss\")}},\r\n    Status,\r\n    @{N=\"Description\"; E={switch($_.Status){\r\n    \"0\" {'Undefined - The status of the profile is not set.'}\r\n    \"1\" {'Temporary - The profile is a temporary profile and will be deleted after the user logs off.'}\r\n    \"2\" {'Roaming - The profile is set to roaming. If this bit is not set, the profile is set to local.'}\r\n    \"4\" {'Mandatory - The profile is a mandatory profile.'}\r\n    \"8\" {'Corrupted - The profile is corrupted and is not in use.'}\r\n    }}},\r\n    RemotePath,\r\n    SID\r\n}\r\n\r\nNew-Item \"$OUTPUT_FOLDER\\System-Info\\Get-RoamingProfile\" -ItemType Directory -Force | Out-Null\r\nGet-RoamingProfile | Export-Csv -Delimiter \"`t\" -Path \"$OUTPUT_FOLDER\\System-Info\\Get-RoamingProfile\\RoamingProfile.csv\" -NoTypeInformation\r\n\r\n# CentralProfile\r\n$SID_LIST = ((Get-ChildItem \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\" -Force -Exclude 'S-1-5-18', 'S-1-5-19', 'S-1-5-20').Name).split('\\')[-1]\r\n$SID_LIST | Out-File \"$OUTPUT_FOLDER\\System-Info\\Get-RoamingProfile\\SecurityIdentifer-List.txt\"\r\n$Count = ($SID_LIST | Measure-Object).Count\r\nWrite-Output \"[Info]  $Count Security Identifier (SID) found\"\r\nWrite-Output \"[Info]  $Count Security Identifier (SID) found\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\nForEach( $SID in $SID_LIST )\r\n{\r\n    $RID = $SID.split('-')[-1]\r\n    $User = ((Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\$SID\").ProfileImagePath).split('\\')[2]\r\n    (Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\$SID\" | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\System-Info\\Get-RoamingProfile\\CentralProfile-$RID.txt\"\r\n\r\n    # Check if CentralProfile value exists\r\n    if (!(Get-Content \"$OUTPUT_FOLDER\\System-Info\\Get-RoamingProfile\\CentralProfile-$RID.txt\" | Select-String \"CentralProfile\" -Quiet))\r\n    {\r\n        Write-Output \"[Info]  $SID ($User) is a Local User Profile.\"\r\n        Write-Output \"[Info]  $SID ($User) is a Local User Profile.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Info]  $SID ($User) is a Roaming User Profile\"\r\n        Write-Output \"[Info]  $SID ($User) is a Roaming User Profile\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n#############################################################################################################################################################################################\r\n\r\n# Folder Redirection (Current User ONLY)\r\n\r\n# Folder Redirection enables users and administrator to redirect the path of a known folder to a new location, manually or by using Group Policy. \r\n# The new location can be a folder on the local computer or a directory on a file share. Users interact with files in the redirected folder as if it still existed on the local drive. \r\n\r\n# Shell Folders\r\n# In Windows, each user account has associated personal folders, typically known as 'My Documents', 'My Music', and so on. The Windows shell records each user's personal folders, in the following registry keys:\r\n# HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\r\n# HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\r\n\r\n# User Shell Folders\r\n# The User Shell Folders subkey stores the paths to Windows Explorer folders for the current user of the computer. \r\n\r\n# Shell Folders vs. User Shell Folders\r\n# The entries can appear in both the older 'Shell Folders' subkey and the 'User Shell Folders' subkey. \r\n\r\n# HKCU vs. HKLM\r\n# The entries can appear in both HKCU and HKLM. The entries that appear in HKCU take precedence over those in HKLM.\r\n\r\nFunction Get-FolderRedirection {\r\n\r\nNew-Item \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\" -ItemType Directory -Force | Out-Null\r\n\r\n# Shell Folders (HKCU)\r\nif (Test-Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\")\r\n{\r\n    (Get-ItemProperty \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\" | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKCU_Shell-Folders.txt\"\r\n}\r\nelse\r\n{\r\n    Write-Output '\"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\" does NOT exist.' | Out-File \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKCU_Shell-Folders.txt\"\r\n}\r\n\r\n# Check for Network Paths (HKCU)\r\nif (Test-Path \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKCU_Shell-Folders.txt\")\r\n{\r\n    if (Get-Content \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKCU_Shell-Folders.txt\" | Select-String -Pattern \": \\\\\\\\\" -Quiet)\r\n    {\r\n        $Count = (Get-Content \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKCU_Shell-Folders.txt\" | Select-String -Pattern \": \\\\\\\\\").Count\r\n        Write-Output \"[Info]  $Count Folder Redirection(s) detected (HKCU Shell Folders): Network Path\"\r\n        Write-Output \"[Info]  $Count Folder Redirection(s) detected (HKCU Shell Folders): Network Path\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Info]  0 Folder Redirection(s) detected (HKCU Shell Folders): Network Path\"\r\n        Write-Output \"[Info]  0 Folder Redirection(s) detected (HKCU Shell Folders): Network Path\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n# Shell Folders (HKLM)\r\n(Get-ItemProperty \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\" | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKLM_Shell-Folders.txt\"\r\n\r\n# Check for Network Paths (HKLM)\r\nif (Test-Path \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKLM_Shell-Folders.txt\")\r\n{\r\n    if (Get-Content \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKLM_Shell-Folders.txt\" | Select-String -Pattern \": \\\\\\\\\" -Quiet)\r\n    {\r\n        $Count = (Get-Content \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKLM_Shell-Folders.txt\" | Select-String -Pattern \": \\\\\\\\\").Count\r\n        Write-Output \"[Info]  $Count Folder Redirection(s) detected (HKLM Shell Folders): Network Path\"\r\n        Write-Output \"[Info]  $Count Folder Redirection(s) detected (HKLM Shell Folders): Network Path\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Info]  0 Folder Redirection(s) detected (HKLM Shell Folders): Network Path\"\r\n        Write-Output \"[Info]  0 Folder Redirection(s) detected (HKLM Shell Folders): Network Path\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n# User Shell Folders (HKCU)\r\n(Get-ItemProperty \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKCU_User-Shell-Folders.txt\"\r\n\r\n# Check for Network Paths (HKCU)\r\nif (Test-Path \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKCU_User-Shell-Folders.txt\")\r\n{\r\n    if (Get-Content \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKCU_User-Shell-Folders.txt\" | Select-String -Pattern \": \\\\\\\\\" -Quiet)\r\n    {\r\n        $Count = (Get-Content \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKCU_User-Shell-Folders.txt\" | Select-String -Pattern \": \\\\\\\\\").Count\r\n        Write-Output \"[Info]  $Count Folder Redirection(s) detected (HKCU User Shell Folders): Network Path\"\r\n        Write-Output \"[Info]  $Count Folder Redirection(s) detected (HKCU User Shell Folders): Network Path\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Info]  0 Folder Redirection(s) detected (HKCU User Shell Folders): Network Path\"\r\n        Write-Output \"[Info]  0 Folder Redirection(s) detected (HKCU User Shell Folders): Network Path\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n# User Shell Folders (HKLM)\r\n(Get-ItemProperty \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKLM_User-Shell-Folders.txt\"\r\n\r\n# Check for Network Paths (HKLM)\r\nif (Test-Path \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKLM_User-Shell-Folders.txt\")\r\n{\r\n    if (Get-Content \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKLM_User-Shell-Folders.txt\" | Select-String -Pattern \": \\\\\\\\\" -Quiet)\r\n    {\r\n        $Count = (Get-Content \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\HKLM_User-Shell-Folders.txt\" | Select-String -Pattern \": \\\\\\\\\").Count\r\n        Write-Output \"[Info]  $Count Folder Redirection(s) detected (HKLM User Shell Folders): Network Path\"\r\n        Write-Output \"[Info]  $Count Folder Redirection(s) detected (HKLM User Shell Folders): Network Path\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Info]  0 Folder Redirection(s) detected (HKLM User Shell Folders): Network Path\"\r\n        Write-Output \"[Info]  0 Folder Redirection(s) detected (HKLM User Shell Folders): Network Path\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\n\r\n# Enumerate Mapped Drives\r\nGet-WmiObject Win32_MappedLogicalDisk | Select-Object Name, ProviderName, VolumeName, FileSystem, @{Name=\"Total Size (GB)\";Expression={\"{0:N2}\" -F ($_.Size / 1GB)}}, @{Name=\"Free Space (GB)\";Expression={\"{0:N2}\" -F ($_.FreeSpace / 1GB)}} | Format-Table -AutoSize | Out-File \"$OUTPUT_FOLDER\\System-Info\\Get-FolderRedirection\\Mapped-Drives.txt\"\r\n\r\n}\r\n\r\nGet-FolderRedirection\r\n\r\n# BitLocker Drive Encryption (BDE)\r\nWrite-Output \"[Info]  Checking for Encrypted Volumes ...\"\r\nWrite-Output \"[Info]  Checking for Encrypted Volumes ...\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\nNew-Item \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\" -ItemType Directory -Force | Out-Null\r\n\r\nif (Test-Path \"$env:SystemDrive\\Windows\\System32\\manage-bde.exe\") \r\n{\r\n    $BDE = \"$env:SystemDrive\\Windows\\System32\\manage-bde.exe\"\r\n    & $BDE -protectors -get $env:SystemDrive > \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\Bitlocker-Protectors.txt\" 2> $null\r\n    & $BDE -status $env:SystemDrive > \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\Bitlocker-Status.txt\" 2> $null\r\n\r\n    # BitLocker (SystemDrive)\r\n    # Note: Bitlocker-Status.txt --> System Language\r\n    if ( Get-Content \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\Bitlocker-Status.txt\" | Select-String \"$env:SystemDrive\" | Select-String \"Volume\" -Quiet )\r\n    {\r\n        if (( Select-String \"100 %\" -Path \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\Bitlocker-Status.txt\" -Quiet ) -Or ( Select-String \"100,0%\" -Path \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\Bitlocker-Status.txt\" -Quiet ) -Or ( Select-String \"100,0 %\" -Path \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\Bitlocker-Status.txt\" -Quiet ))\r\n        {\r\n            Write-Output \"[Info]  Detection Method 1: Volume $env:SystemDrive is encrypted using BitLocker.\"\r\n            Write-Output \"[Info]  Detection Method 1: Volume $env:SystemDrive is encrypted using BitLocker.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        }\r\n    }\r\n}\r\n\r\n# Magnet Forensics Encrypted Disk Detector (e.g. TrueCrypt, PGP, Bitlocker, SafeBoot, BestCrypt, Check Point, Sophos, or Symantec) --> Doesn't detect BitLocker on AntAnalyzer (XTS-AES 128)\r\n# Note: Encrypted Disk Detector is a command-line tool that can quickly and non-intrusively check for encrypted volumes on a computer system during incident response.\r\nif (Test-Path \"$EDD\") \r\n{\r\n    # .NET 4.0 Framework\r\n    if (Test-Path \"HKLM:SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\")\r\n    {\r\n        if (!($ProductName -like \"*Windows 7*\"))\r\n        {\r\n            # EDD\r\n            & $EDD /accepteula /batch > \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\EDD.txt\" 2> $null\r\n    \r\n            # Encrypted volumes and/or processes were detected by EDD\r\n            if ( Select-String \"Encrypted volumes and/or processes were detected by EDD\" -Path \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\EDD.txt\" -Quiet )\r\n            {\r\n                Write-Output \"[Info]  Encrypted volumes and/or processes were detected by EDD.\"\r\n                Write-Output \"[Info]  Encrypted volumes and/or processes were detected by EDD.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n            else\r\n            {\r\n                Write-Output \"[Info]  No encrypted volumes were found by EDD.\"\r\n                Write-Output \"[Info]  No encrypted volumes were found by EDD.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n\r\n            # Bitlocker (SystemDrive)\r\n            if (( Select-String \"Volume $env:SystemDrive\" -Path \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\EDD.txt\" -Quiet ) -And ( Select-String \"Bitlocker\" -Path \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\EDD.txt\" -Quiet ))\r\n            {\r\n                Write-Output \"[Info]  Detection Method 2: Volume $env:SystemDrive is encrypted using BitLocker.\"\r\n                Write-Output \"[Info]  Detection Method 2: Volume $env:SystemDrive is encrypted using BitLocker.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n\r\n            # Bitlocker (SystemVolume)\r\n            if (Select-String \"is a Bitlocker encrypted volume\" -Path \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\EDD.txt\" -Quiet)\r\n            {\r\n                $EncryptedVolume = (((Get-Content \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\EDD.txt\" | Select-String \"is a Bitlocker encrypted volume\") -replace \"is a Bitlocker encrypted volume.$\", \"\") -replace \"Partition \", \"Partition #\" | Out-String).Trim()\r\n\r\n                # Check if SystemDrive is a Bitlocker encrypted volume\r\n                if (Get-Content \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\EDD.txt\" | Select-String \"$EncryptedVolume\" | Select-String \"$env:SystemDrive\" -Quiet)\r\n                {\r\n                    Write-Output \"[Info]  Detection Method 2: Volume $env:SystemDrive is encrypted using BitLocker.\"\r\n                    Write-Output \"[Info]  Detection Method 2: Volume $env:SystemDrive is encrypted using BitLocker.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                }\r\n            }\r\n\r\n            # VeraCrypt (Processes)\r\n            if (Select-String \"VeraCrypt processes were located\" -Path \"$OUTPUT_FOLDER\\System-Info\\Get-EncryptedVolumes\\EDD.txt\" -Quiet)\r\n            {\r\n                Write-Output \"[Info]  VeraCrypt processes were located.\"\r\n                Write-Output \"[Info]  Note: Check 'System-Info\\EDD.txt' for further informartion.\"\r\n                Write-Output \"[Info]  VeraCrypt processes were located.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n                Write-Output \"[Info]  Note: Check 'System-Info\\EDD.txt' for further informartion.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n            }\r\n        }\r\n        else\r\n        {\r\n            Write-Output \"[Info]  Magnet Forensics Encrypted Disk Detector will be skipped ...\"\r\n            Write-Output \"[Info]  Magnet Forensics Encrypted Disk Detector will be skipped ...\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        }\r\n    }\r\n    else\r\n    {\r\n        Write-Output \"[Info]  NET Framework v4 NOT found. Magnet Forensics Encrypted Disk Detector will be skipped ...\"\r\n        Write-Output \"[Info]  NET Framework v4 NOT found. Magnet Forensics Encrypted Disk Detector will be skipped ...\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n    }\r\n}\r\nelse\r\n{\r\n    Write-Output \"[Error] EDD.exe NOT found.\"\r\n    Write-Output \"[Error] EDD.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n}\r\n\r\n# R&S Trusted Disk\r\n$Service = Get-WmiObject -Class Win32_Service -Filter \"Name='TrustedDiskService'\"\r\n$State = $Service.State\r\nif ($State -eq \"Running\")\r\n{\r\n    $PathName = ((Get-WmiObject -Class Win32_Service | Where-Object {$_.Name -eq \"TrustedDiskService\"} | Select-Object PathName).PathName) -replace '\"', \"\"\r\n    $Version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($PathName).FileVersion\r\n    Write-Output \"[Info]  R&S Trusted Disk ($Version) was found\"\r\n    Write-Output \"[Info]  R&S Trusted Disk ($Version) was found\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n}\r\n\r\n# PhysicalDisk\r\n(Get-WmiObject -Class Win32_DiskDrive | Select-Object DeviceID,Model,SerialNumber,Size,Partitions,MediaType,Description | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\PhysicalDisk.txt\" 2> $null\r\n\r\n# Windows 10 Class\r\n# https://docs.microsoft.com/en-us/previous-versions/windows/desktop/stormgmt/msft-physicaldisk\r\n$Class = Get-WmiObject -List -Namespace \"root\\Microsoft\\Windows\\Storage\" -ErrorAction SilentlyContinue | Where-Object { $_.Name -eq 'MSFT_PhysicalDisk' }\r\nif ( $null -ne $Class )\r\n{\r\n    (Get-WmiObject -Class MSFT_PhysicalDisk -Namespace root\\Microsoft\\Windows\\Storage -ErrorAction SilentlyContinue | Select-Object FriendlyName, SerialNumber, MediaType, HealthStatus, LogicalSectorSize, Size, SpindleSpeed | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\MSFT_PhysicalDisk.txt\" 2> $null\r\n}\r\n\r\n# MediaType\r\n#\r\n# Value Meaning\r\n# 0     Unspecified\r\n# 3     HDD\r\n# 4     SSD\r\n# 5     SCM\r\n\r\n# Correlate Physical Device ID to Volume Device ID\r\n$ImageSource = (Get-WmiObject Win32_DiskDrive | ForEach-Object {\r\n  $disk = $_\r\n  $partitions = \"ASSOCIATORS OF \" +\r\n                \"{Win32_DiskDrive.DeviceID='$($disk.DeviceID)'} \" +\r\n                \"WHERE AssocClass = Win32_DiskDriveToDiskPartition\"\r\n  Get-WmiObject -Query $partitions | ForEach-Object {\r\n    $partition = $_\r\n    $drives = \"ASSOCIATORS OF \" +\r\n              \"{Win32_DiskPartition.DeviceID='$($partition.DeviceID)'} \" +\r\n              \"WHERE AssocClass = Win32_LogicalDiskToPartition\"\r\n    Get-WmiObject -Query $drives | ForEach-Object {\r\n      $driveLetter = $_.DeviceID\r\n      $fltr        = \"DriveLetter='$driveLetter'\"\r\n      New-Object -Type PSCustomObject -Property @{\r\n        Disk        = $disk.DeviceID\r\n        DriveLetter = $driveLetter\r\n        VolumeName  = $_.VolumeName\r\n        VolumeID    = Get-WmiObject -Class Win32_Volume -Filter $fltr |\r\n                      Select-Object -Expand DeviceID\r\n      }\r\n    }\r\n  }\r\n})\r\n\r\n$ImageSource | Out-File \"$OUTPUT_FOLDER\\System-Info\\Source-Drive-Selection.txt\"\r\n$ImageSource | Export-Csv \"$OUTPUT_FOLDER\\System-Info\\Source-Drive-Selection.csv\" -Delimiter \"`t\" -NoTypeInformation\r\n\r\n# Volume\r\n(Get-WmiObject -Class Win32_Volume | Select-Object DriveLetter,Label,FileSystem,Capacity,FreeSpace,SerialNumber,DeviceID | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\Volume.txt\" 2> $null\r\n\r\n# LogicalDisk\r\n(Get-WmiObject -Class Win32_LogicalDisk | Select-Object DeviceID,VolumeName,FreeSpace,Size,VolumeSerialNumber,MediaType,DriveType,FileSystem | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\LogicalDisk.txt\" 2> $null\r\n\r\n# DiskPartition\r\n(Get-WmiObject -Class Win32_DiskPartition | Select-Object DeviceID,Description,BlockSize,Bootable,Size,StartingOffset | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\DiskPartition.txt\" 2> $null\r\n\r\n# Shared Folders\r\n(Get-WmiObject -Class Win32_Share | Format-Table Name,Path,Description,Type -AutoSize | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\SharedFolders.txt\" 2> $null\r\n\r\n# Network Adapter Configuration\r\n(Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = \"true\"' | Select-Object -Property Description, @{name='IPAddress';Expression={($_.IPAddress[0])}}, MacAddress, DHCPEnabled | Out-String).Trim() > \"$OUTPUT_FOLDER\\System-Info\\NetworkAdapterConfiguration.txt\" 2> $null\r\nGet-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = \"true\"' | Select-Object -Property Description, @{name='IPAddress';Expression={($_.IPAddress[0])}}, MacAddress, DHCPEnabled, DefaultIPGateway, @{name='IPSubnet';Expression={($_.IPSubnet[0])}} | Export-Csv \"$OUTPUT_FOLDER\\System-Info\\NetworkAdapterConfiguration.csv\" -Delimiter \"`t\" -NoTypeInformation\r\n\r\n# System Environment Variables (set for everyone)\r\n$CurrentControlSet = (Get-ItemProperty \"HKLM:\\SYSTEM\\Select\" -Name Current).Current\r\n(Get-ItemProperty \"HKLM:\\SYSTEM\\ControlSet00$CurrentControlSet\\Control\\Session Manager\\Environment\" | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\System-Info\\System-Environment-Variables.txt\"\r\n\r\n# User Environment Variables (set for current user)\r\n(Get-ItemProperty \"HKCU:\\Environment\" | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\System-Info\\User-Environment-Variables_HKCU.txt\"\r\n\r\n# PCSystemType\r\n$PCSystemType = (Get-Wmiobject -Class Win32_ComputerSystem -ComputerName $env:COMPUTERNAME).PCSystemType\r\n\r\nswitch($PCSystemType) \r\n{\r\n    \"1\" { $EnumPCSystemType = 'Desktop' }\r\n    \"2\" { $EnumPCSystemType = 'Mobile / Laptop' }\r\n    \"3\" { $EnumPCSystemType = 'Workstation' }\r\n    \"4\" { $EnumPCSystemType = 'Enterprise Server' }\r\n    \"5\" { $EnumPCSystemType = 'Small Office and Home Office (SOHO) Server' }\r\n    \"6\" { $EnumPCSystemType = 'Appliance PC' }\r\n    \"7\" { $EnumPCSystemType = 'Performance Server' }\r\n    \"8\" { $EnumPCSystemType = 'Maximum' }\r\n\r\n    default { $EnumPCSystemType = 'PCSystemType is unspecified'}\r\n}\r\n\r\nWrite-Output \"$EnumPCSystemType\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\PCSystemType.txt\"\r\n\r\n# Shadow Copies\r\nif (Get-Command -CommandType Cmdlet Get-CimInstance -ErrorAction SilentlyContinue)\r\n{\r\n    Get-CimInstance Win32_ShadowCopy | Out-File \"$OUTPUT_FOLDER\\System-Info\\ShadowCopies.txt\" -Encoding UTF8\r\n    Get-CimInstance Win32_ShadowCopy | ConvertTo-Csv -NoTypeInformation | Out-File \"$OUTPUT_FOLDER\\System-Info\\ShadowCopies.csv\" -Encoding UTF8\r\n}\r\n\r\n# Plug and Play (PnP) Devices\r\nif (Get-Command -CommandType Function Get-PnpDevice -ErrorAction SilentlyContinue)\r\n{\r\n    Get-PnpDevice | Export-Csv -Path \"$OUTPUT_FOLDER\\System-Info\\Get-PnpDevice.csv\" -NoTypeInformation -Encoding UTF8 2> $null\r\n}\r\n\r\n# Domain\r\nif ((Get-WmiObject -Class Win32_ComputerSystem).PartOfDomain -eq $true)\r\n{\r\n    (Get-WmiObject Win32_ComputerSystem).Domain | Out-File \"$OUTPUT_FOLDER\\System-Info\\Domain.txt\" -Encoding UTF8\r\n}\r\n\r\n# DomainRole\r\n$DomainRole = (Get-Wmiobject -Class Win32_ComputerSystem -ComputerName $env:COMPUTERNAME).DomainRole\r\n\r\nswitch($DomainRole) \r\n{\r\n    \"0\" { $EnumDomainRole = 'Standalone Workstation' }\r\n    \"1\" { $EnumDomainRole = 'Member Workstation' }\r\n    \"2\" { $EnumDomainRole = 'Standalone Server' }\r\n    \"3\" { $EnumDomainRole = 'Member Server' }\r\n    \"4\" { $EnumDomainRole = 'Backup Domain Controller' }\r\n    \"5\" { $EnumDomainRole = 'Primary Domain Controller' }\r\n}\r\n\r\nWrite-Output \"$EnumDomainRole\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\DomainRole.txt\"\r\n\r\n# Enumerate Active SMB Sessions \r\nif (Get-Command Get-SmbSession -CommandType Function -ErrorAction SilentlyContinue) \r\n{\r\n    Get-SmbSession | Out-File \"$OUTPUT_FOLDER\\System-Info\\Get-SmbSession.txt\" -Encoding UTF8\r\n}\r\n\r\n# RDP Sessions\r\nif (Get-Command -CommandType Application qwinsta -ErrorAction SilentlyContinue)\r\n{\r\n    qwinsta /server:localhost > \"$OUTPUT_FOLDER\\System-Info\\RDP-Sessions.txt\"\r\n    (qwinsta /server:localhost) -split \"\\n\" -replace '\\s\\s+', ',' | Out-File \"$OUTPUT_FOLDER\\System-Info\\RDP-Sessions.csv\" -Encoding UTF8\r\n}\r\n\r\n# IPv4\r\n$IPv4 = Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Where-Object {$_.IPAddress} | Select-Object -ExpandProperty IPAddress | Where-Object {$_ -notlike \"*:*\"}\r\nWrite-Output \"$IPv4\" | Out-File \"$OUTPUT_FOLDER\\System-Info\\IPv4.txt\" -Encoding UTF8\r\n\r\n# IP Address Configuration\r\nif (Get-Command Get-NetIPAddress -CommandType Function -ErrorAction SilentlyContinue) \r\n{\r\n    Get-NetIPAddress | ConvertTo-Csv -NoTypeInformation | Out-File \"$OUTPUT_FOLDER\\System-Info\\Get-NetIPAddress.csv\" -Encoding UTF8\r\n}\r\n\r\n# Microsoft Protection Logs\r\nWrite-Output \"[Info]  Collecting Microsoft Protection Logs (MPLogs) ...\"\r\nNew-Item \"$OUTPUT_FOLDER\\System-Info\\MPLogs\" -ItemType Directory -Force | Out-Null\r\n\r\n# MPLogs\r\nif (Test-Path \"$env:ALLUSERSPROFILE\\Microsoft\\Windows Defender\\Support\\*MPLog-*.log\")\r\n{\r\n    Copy-Item \"$env:ALLUSERSPROFILE\\Microsoft\\Windows Defender\\Support\\*MPLog-*.log\" -Destination \"$OUTPUT_FOLDER\\System-Info\\MPLogs\"\r\n                \r\n    # Count\r\n    $Count = (Get-ChildItem -Path \"$OUTPUT_FOLDER\\System-Info\\MPLogs\" -Filter \"*MPLog-*.log\" | Measure-Object).Count\r\n    Write-Output \"[Info]  $Count MPLog(s) found\"\r\n}\r\n\r\n# MPDetection\r\nif (Test-Path \"$env:ALLUSERSPROFILE\\Microsoft\\Windows Defender\\Support\\*MPDetection-*.log\")\r\n{\r\n    Copy-Item \"$env:ALLUSERSPROFILE\\Microsoft\\Windows Defender\\Support\\*MPDetection-*.log\" -Destination \"$OUTPUT_FOLDER\\System-Info\\MPLogs\"\r\n}\r\n\r\n# Windows Installer\r\nif (Get-Command -CommandType Cmdlet Get-WinEvent -ErrorAction SilentlyContinue)\r\n{\r\n    # TXT\r\n    Get-WinEvent -ProviderName MsiInstaller | Where-Object Id -eq \"1033\"  | Select-Object TimeCreated,Message | Format-List * | Out-File \"$OUTPUT_FOLDER\\System-Info\\WindowsInstaller.txt\" -Encoding UTF8\r\n\r\n    # Custom CSV\r\n    $Installations = Get-WinEvent -ProviderName MsiInstaller | Where-Object Id -eq \"1033\"\r\n    \r\n    $Results = [Collections.Generic.List[PSObject]]::new()\r\n    ForEach($Installation in $Installations)\r\n    {\r\n        $TimeCreated = $Installation | Select-Object -ExpandProperty TimeCreated\r\n        $Message     = $Installation | Select-Object -ExpandProperty Message\r\n\r\n        $Line = [PSCustomObject]@{\r\n        \"TimeCreated\"    = (Get-Date $TimeCreated).ToString(\"yyyy-MM-dd HH:mm:ss\")\r\n        \"UserId\"         = $Installation.UserId\r\n        \"Manufacturer\"   = $Message | ForEach-Object{($_ -split \":\\s+\")[4]} | ForEach-Object{($_ -split \"\\.\\s+\")[0]}\r\n        \"ProductName\"    = $Message | ForEach-Object{($_ -split \":\\s+\")[1]} | ForEach-Object{($_ -split \"\\.\\s+\")[0]}\r\n        \"Version\"        = $Message | ForEach-Object{($_ -split \":\\s+\")[2]} | ForEach-Object{($_ -split \"\\.\\s+\")[0]}\r\n        \"Language\"       = $Message | ForEach-Object{($_ -split \":\\s+\")[3]} | ForEach-Object{($_ -split \"\\.\")[0]}\r\n        \"Status\"         = $Message | ForEach-Object{($_ -split \":\\s+\")[5]} | ForEach-Object{($_ -split \"\\.\")[0]}\r\n        \"Message\"        = $Message\r\n        }\r\n\r\n        $Results.Add($Line)\r\n    }\r\n\r\n    $Results | Export-Csv -Path \"$OUTPUT_FOLDER\\System-Info\\WindowsInstaller.csv\" -NoTypeInformation -Encoding UTF8\r\n}\r\n\r\n#endregion SystemInfo\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region fsutil\r\n\r\n# Check if fsutil exists\r\nif (Get-Command \"fsutil\" -ErrorAction SilentlyContinue)\r\n{\r\n    # fsutil\r\n    # https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil\r\n    New-Item \"$OUTPUT_FOLDER\\FileSystem\\fsutil\" -ItemType Directory -Force | Out-Null\r\n\r\n    # Drives\r\n    fsutil fsInfo drives > \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\Drives.txt\" 2> $null\r\n\r\n    if ((Test-Path \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\Drives.txt\") -And ((Get-Item \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\Drives.txt\").length -gt 0kb))\r\n    {\r\n        (Get-Content \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\Drives.txt\" | ForEach-Object{($_ -split \"\\s+\")} | Select-String -Pattern \":\\\\\" | ForEach-Object{($_ -replace \"\\\\\",\"\")} | Out-String).Trim() | Out-File \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\All-Drives.txt\"\r\n\r\n        $Drives = Get-Content \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\All-Drives.txt\"\r\n\r\n        ForEach( $Drive in $Drives )\r\n        {\r\n            $DriveLetter = \"$Drive\" | ForEach-Object{($_ -replace \":\",\"\")}\r\n\r\n            New-Item \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\$DriveLetter\" -ItemType Directory -Force | Out-Null\r\n\r\n            # DriveType\r\n            fsutil fsInfo driveType $Drive > \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\$DriveLetter\\DriveType.txt\" 2> $null\r\n\r\n            # Volume Info\r\n            fsutil fsInfo volumeInfo $Drive > \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\$DriveLetter\\VolumeInfo.txt\" 2> $null\r\n\r\n            # NTFS Info\r\n            fsutil fsInfo ntfsInfo $Drive > \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\$DriveLetter\\NTFS-Info.txt\" 2> $null\r\n\r\n            # Statistics\r\n            fsutil fsInfo statistics $Drive > \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\$DriveLetter\\Statistics.txt\" 2> $null\r\n\r\n            # Determining amount of free space on a drive\r\n            fsutil volume diskfree $Drive > \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\$DriveLetter\\DiskFree.txt\" 2> $null\r\n\r\n            # allocationreport - Displays information about how storage is used on a given volume\r\n            fsutil volume allocationreport $Drive > \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\$DriveLetter\\AllocationReport.txt\" 2> $null\r\n\r\n            # USN Info\r\n            fsutil usn queryjournal $Drive > \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\$DriveLetter\\USN-Info.txt\" 2> $null\r\n        }\r\n\r\n        # Cleaning up\r\n        Remove-Item \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\All-Drives.txt\" -Force\r\n    }\r\n\r\n    # TRIM (SSD)\r\n    fsutil behavior query DisableDeleteNotify NTFS > \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\SSD-TRIM.txt\" 2> $null\r\n\r\n    # 0 = TRIM Enabled\r\n    # 1 = TRIM Disabled\r\n\r\n    # NTFS Pagefile Encryption --> Encrypting File System (EFS)\r\n    fsutil behavior query encryptpagingfile > \"$OUTPUT_FOLDER\\FileSystem\\fsutil\\Pagefile-Encryption.txt\" 2> $null\r\n}\r\n\r\n#endregion fsutil\r\n\r\n#############################################################################################################################################################################################\r\n\r\n#region Footer\r\n\r\n# Error Log\r\n$Error | Out-File \"$OUTPUT_FOLDER\\Error.txt\"\r\n$Error.Clear()\r\n\r\n# Creating Secure Archive\r\nif (Test-Path \"$7za\") \r\n{\r\n    if (Test-Path \"$OUTPUT_FOLDER\") \r\n    {\r\n        Write-Output \"[Info]  Preparing Secure Archive Container [time-consuming task] ... \"\r\n        Write-Output \"[Info]  Preparing Secure Archive Container [time-consuming task] ... \" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n        & $7za a -mx5 -mhe \"-p$PASSWORD\" -t7z \"$OUTPUT_FOLDER.7z\" \"$OUTPUT_FOLDER\\*\" > $null 2>&1\r\n                            \r\n        # Archive Size\r\n        $Length = (Get-Item -Path \"$OUTPUT_FOLDER.7z\").Length\r\n        $Size = Get-FileSize($Length)\r\n        Write-Output \"[Info]  Archive Size: $Size\"\r\n        Write-Output \"[Info]  Archive Size: $Size\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n        # Cleaning up\r\n        if (Test-Path \"$OUTPUT_FOLDER\")\r\n        {\r\n            Get-ChildItem -Path \"$OUTPUT_FOLDER\" -Recurse | Remove-Item -Force -Recurse\r\n            Remove-Item \"$OUTPUT_FOLDER\" -Force\r\n        }\r\n    }\r\n}\r\nelse\r\n{\r\n    Write-Output \"[Error] 7za.exe NOT found.\"\r\n    Write-Output \"[Error] 7za.exe NOT found.\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n}\r\n\r\n# Get End Time\r\n$endTime = (Get-Date)\r\n$AcquisitionEndTime = [datetime]::Now.ToUniversalTime().ToString(\"yyyy-MM-dd HH:mm:ss\")\r\n\r\n# Echo Time elapsed\r\nWrite-Output \"\"\r\nWrite-Output \"\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\nWrite-Output \"FINISHED!\"\r\nWrite-Output \"FINISHED!\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n$Time = ($endTime-$startTime)\r\n$ElapsedTime = ('Overall acquisition duration: {0} h {1} min {2} sec' -f $Time.Hours, $Time.Minutes, $Time.Seconds)\r\nWrite-Output \"$ElapsedTime\"\r\nWrite-Output \"$ElapsedTime\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n# Acquisition Duration (ISO 8601)\r\nWrite-Output \"\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\nWrite-Output \"Acquisition Start    : $AcquisitionStartTime UTC\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\nWrite-Output \"Acquisition Finished : $AcquisitionEndTime UTC\" | Out-File \"$LOG_DIR\\$Timestamp-Logfile.txt\" -Append\r\n\r\n# MessageBox UI\r\nif ($Pagefile -eq \"--Pagefile\")\r\n{\r\n    if (Get-Content -Path \"$LOG_DIR\\$Timestamp-Logfile.txt\" | Select-String -Pattern \"\\[Error\\]\" -Quiet)\r\n    {\r\n        $ErrorCount = (Get-Content -Path \"$LOG_DIR\\$Timestamp-Logfile.txt\" | Select-String -Pattern \"\\[Error\\]\" | Measure-Object).Count\r\n        $MessageBody = \"Memory Acquisition completed w/ $ErrorCount error(s).`nPlease check Logfile for further information!\"\r\n        $MessageTitle = \"Collect-MemoryDump.ps1 (https://lethal-forensics.com/)\"\r\n        $ButtonType = \"OK\"\r\n        $MessageIcon = \"Error\"\r\n        $Result = [System.Windows.Forms.MessageBox]::Show($MessageBody, $MessageTitle, $ButtonType, $MessageIcon)\r\n    }\r\n    else\r\n    {\r\n        if ($Triage -eq \"--Triage\")\r\n        {\r\n            # Memory Snapshot + Pagefile Collection (Optional) + Triage Collection (Optional)\r\n            $MessageBody = \"Memory Snapshot created successfully.`nPagefile Collection completed.`nTriage Collection completed.\"\r\n        }\r\n        else\r\n        {\r\n            # Memory Snapshot + Pagefile Collection (Optional)\r\n            $MessageBody = \"Memory Snapshot created successfully.`n`nPagefile Collection completed.\"\r\n        }\r\n\r\n        $MessageTitle = \"Collect-MemoryDump.ps1 (https://lethal-forensics.com/)\"\r\n        $ButtonType = \"OK\"\r\n        $MessageIcon = \"Information\"\r\n        $Result = [System.Windows.Forms.MessageBox]::Show($MessageBody, $MessageTitle, $ButtonType, $MessageIcon)\r\n    }\r\n}\r\nelse\r\n{\r\n    if (Get-Content -Path \"$LOG_DIR\\$Timestamp-Logfile.txt\" | Select-String -Pattern \"\\[Error\\]\" -Quiet)\r\n    {\r\n        $MessageBody = \"Memory Acquisition completed with $ErrorCount error(s).`nPlease check Logfile for further information!\"\r\n        $MessageTitle = \"Collect-MemoryDump.ps1 (https://lethal-forensics.com/)\"\r\n        $ButtonType = \"OK\"\r\n        $MessageIcon = \"Error\"\r\n        $Result = [System.Windows.Forms.MessageBox]::Show($MessageBody, $MessageTitle, $ButtonType, $MessageIcon)\r\n    }\r\n    else\r\n    {\r\n        if ($Triage -eq \"--Triage\")\r\n        {\r\n            # Triage Collection (Optional)\r\n            $MessageBody = \"Status: Memory Snapshot created successfully.`n`nTriage Collection completed.\"\r\n        }\r\n        else\r\n        {\r\n            # Memory Snapshot\r\n            $MessageBody = \"Status: Memory Snapshot created successfully.\"\r\n        }\r\n        \r\n        $MessageTitle = \"Collect-MemoryDump.ps1 (https://lethal-forensics.com/)\"\r\n        $ButtonType = \"OK\"\r\n        $MessageIcon = \"Information\"\r\n        $Result = [System.Windows.Forms.MessageBox]::Show($MessageBody, $MessageTitle, $ButtonType, $MessageIcon)\r\n    }\r\n}\r\n\r\nif ($Result -eq \"OK\" ) \r\n{\r\n    # Set Windows Title back to default\r\n    $Host.UI.RawUI.WindowTitle = \"$DefaultWindowsTitle\"\r\n\r\n    # Exit\r\n    Exit\r\n}\r\n\r\n#endregion Footer\r\n\r\n#############################################################################################################################################################################################\r\n#############################################################################################################################################################################################\r\n\r\n# SIG # Begin signature block\r\n# MIIrxQYJKoZIhvcNAQcCoIIrtjCCK7ICAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB\r\n# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR\r\n# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUFKhV4Zpeb7Zuk4Y1Ll35ZmHy\r\n# 8xO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content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "README.md",
    "content": "<p align=\"center\"><a href=\"https://github.com/PowerShell/PowerShell\"><img src=\"https://img.shields.io/badge/Language-Powershell-blue\" style=\"text-align:center;display:block;\"></a> <a href=\"https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/releases/latest\"><img src=\"https://img.shields.io/github/v/release/LETHAL-FORENSICS/Collect-MemoryDump?label=Release\" style=\"text-align:center;display:block;\"></a> <a href=\"https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/releases/latest\"><img src=\"https://img.shields.io/badge/Maintenance%20Level-Actively%20Developed-brightgreen\" style=\"text-align:center;display:block;\"></a> <a href=\"https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/releases/latest\"><img src=\"https://img.shields.io/badge/Digital%20Signature-Valid-brightgreen\" style=\"text-align:center;display:block;\"></a> <a href=\"https://x.com/LETHAL_DFIR\"><img src=\"https://img.shields.io/twitter/follow/LETHAL_DFIR?style=social\" style=\"text-align:center;display:block;\"></a></p>\n\n# Collect-MemoryDump\nCollect-MemoryDump - Automated Creation of Windows Memory Snapshots for DFIR\n\nCollect-MemoryDump.ps1 is a PowerShell script utilized to collect a Memory Snapshot from a live Windows system (including Pagefile Collection) in a forensically sound manner.\n\nFeatures:\n* ARM64 Support (MAGNET DumpIt for Windows and MAGNET Response)\n* Checks for Hostname and Physical Memory Size before starting memory acquisition\n* Checks if you have enough free disk space to save memory dump file\n* Collects a Microsoft Crash Dump w/ MAGNET DumpIt for Windows\n* Collects a Raw Physical Memory Dump w/ MAGNET DumpIt, MAGNET RAM Capture, Belkasoft Live RAM Capturer and WinPMEM\n* Pagefile Collection w/ MAGNET Response &#8594; very useful when dealing with reflective PE injection techniques\n* Triage-Collection w/ MAGNET Response (Optional)\n* Collects Running Process/Module Information w/ MAGNET Response\n* Checks for Encrypted Volumes w/ MAGNET Encrypted Disk Detector (EDD)\n* Collects BitLocker Recovery Key\n* Checks for installed Endpoint Security Tools (AntiVirus and EDR)\n* Enumerates all necessary information from the target host to enrich your DFIR workflow\n* Creates a password-protected Secure Archive Container (PW: IncidentResponse)\n\n> [!TIP]\n> Automated Forensic Analysis of Windows Memory Dumps and corresponding Pagefiles w/ [MemProcFS-Analyzer](https://github.com/evild3ad/MemProcFS-Analyzer)\n\n## First Public Release    \nMAGNET Talks - Frankfurt, Germany (July 27, 2022)  \nPresentation Title: Modern Digital Forensics and Incident Response Techniques  \nhttps://www.magnetforensics.com/  \n\n## Download  \nDownload the latest version of **Collect-MemoryDump** from the [Releases](https://github.com/evild3ad/Collect-MemoryDump/releases/latest) section.  \n\n> [!NOTE]\n> Collect-MemoryDump does not include all external tools by default.  \n\nYou have to download following dependencies:  \n* [Belkasoft Live RAM Capturer](https://belkasoft.com/ram-capturer)\n* [MAGNET DumpIt for Windows](https://www.magnetforensics.com/resources/magnet-dumpit-for-windows/)\n* [MAGNET Encrypted Disk Detector](https://www.magnetforensics.com/resources/encrypted-disk-detector/)\n* [MAGNET RAM Capture](https://www.magnetforensics.com/resources/magnet-ram-capture/)\n* [MAGNET Response](https://www.magnetforensics.com/resources/magnet-response/)\n\nCopy the required files to following file locations:\n\n**Belkasoft Live RAM Capturer**  \n`$SCRIPT_DIR\\Tools\\RamCapturer\\x64\\msvcp110.dll`  \n`$SCRIPT_DIR\\Tools\\RamCapturer\\x64\\msvcr110.dll`  \n`$SCRIPT_DIR\\Tools\\RamCapturer\\x64\\RamCapture64.exe`  \n`$SCRIPT_DIR\\Tools\\RamCapturer\\x64\\RamCaptureDriver64.sys`  \n`$SCRIPT_DIR\\Tools\\RamCapturer\\x86\\msvcp110.dll`  \n`$SCRIPT_DIR\\Tools\\RamCapturer\\x86\\msvcr110.dll`  \n`$SCRIPT_DIR\\Tools\\RamCapturer\\x86\\RamCapture.exe`  \n`$SCRIPT_DIR\\Tools\\RamCapturer\\x86\\RamCaptureDriver.sys`  \n  \n**MAGNET DumpIt for Windows**  \n`$SCRIPT_DIR\\Tools\\DumpIt\\ARM64\\DumpIt.exe`  \n`$SCRIPT_DIR\\Tools\\DumpIt\\x64\\DumpIt.exe`  \n`$SCRIPT_DIR\\Tools\\DumpIt\\x86\\DumpIt.exe`  \n  \n**MAGNET Encrypted Disk Detector**  \n`$SCRIPT_DIR\\Tools\\EDD\\EDDv310.exe`  \n\n**MAGNET Ram Capture**  \n`$SCRIPT_DIR\\Tools\\MRC\\MRCv120.exe`  \n\n**MAGNET Response**  \n`$SCRIPT_DIR\\Tools\\MagnetRESPONSE\\MagnetRESPONSE.exe`  \n\nCheck out: [Wiki: How-to-add-or-update-dependencies](https://github.com/evild3ad/Collect-MemoryDump/wiki/How-to-add-or-update-dependencies)\n\n## Usage  \n```powershell\n.\\Collect-MemoryDump.ps1 [-Tool] [--Pagefile] [--Triage]\n```\n\nExample 1 - Collect Microsoft Crash Dump and Pagefile  \n```powershell\n.\\Collect-MemoryDump.ps1 -Comae --Pagefile  \n```\n\nExample 2 - Collect Raw Physical Memory Dump and Pagefile  \n```powershell\n.\\Collect-MemoryDump.ps1 -DumpIt --Pagefile\n```\n\nExample 3 - Collect Raw Physical Memory Dump    \n```powershell\n.\\Collect-MemoryDump.ps1 -WinPMEM  \n```\n\nExample 4 - Collect Microsoft Crash Dump, Pagefile and Forensic Artifacts\n```powershell\n.\\Collect-MemoryDump.ps1 -Comae --Pagefile --Triage\n```  \n</br>\n\n> [!IMPORTANT]  \n> Microsoft .NET Framework 4 (or later) must be installed on target system for MAGNET Encrypted Disk Detector and MAGNET Response. Simply skip the Pagefile Collection or download and install Microsoft .NET Framework 4 (Standalone Installer) from the Microsoft download site:  \nhttps://www.microsoft.com/en-us/download/details.aspx?id=17718\n\n> [!IMPORTANT]  \n> MAGNET DumpIt for Windows does NOT support Windows 7 target systems. Please use any of the other memory acquisition tools when dealing with Windows 7. \n  \n![Help-Message](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/01.jpg)  \n**Fig 1:** Help Message  \n\n![AvailableSpace](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/02.jpg)  \n**Fig 2:** Check Available Space\n\n![DumpIt - Microsoft Crash Dump](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/03.jpg)  \n**Fig 3:** Automated Creation of Windows Memory Snapshot w/ MAGNET DumpIt for Windows (incl. Pagefile)\n\n![DumpIt - Raw Physical Memory Dump](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/04.jpg)  \n**Fig 4:** Automated Creation of Windows Memory Snapshot w/ MAGNET DumpIt for Windows (incl. Pagefile)\n\n![WinPMEM](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/05.jpg)  \n**Fig 5:** Automated Creation of Windows Memory Snapshot w/ WinPMEM (incl. Pagefile)\n\n![Belkasoft](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/06.jpg)  \n**Fig 6:** Automated Creation of Windows Memory Snapshot w/ Belkasoft Live RAM Capturer (incl. Pagefile)\n\n![Pagefile Collection](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/07.jpg)  \n**Fig 7:** Pagefile Collection w/ MAGNET Response\n\n![Process-Module Information](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/08.jpg)  \n**Fig 8:** Collecting Running Process/Module Information w/ MAGNET Response\n\n![MessageBox](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/09.jpg)  \n**Fig 9:** Message Box\n\n![MAGNET RAM Capture GUI](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/10.jpg)  \n**Fig 10:** MAGNET RAM Capture\n\n![MAGNET RAM Capture](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/11.jpg)  \n**Fig 11:** Automated Creation of Windows Memory Snapshot w/ MAGNET RAM Capture\n\n![MessageBox - Memory Snapshot created successfully](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/12.jpg)  \n**Fig 12:** Message Box\n\n![Triage Collection](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/13.jpg)  \n**Fig 13:** Triage Collection w/ MAGNET Response\n\n![Full Collection](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/14.jpg)  \n**Fig 14:** Windows Memory Snapshot w/ MAGNET DumpIt (incl. Pagefile) + Triage Collection\n\n![MessageBox - Full Collection](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/15.jpg)  \n**Fig 15:** Message Box\n\n![SecureArchive](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/16.jpg)  \n**Fig 16:** Secure Archive Container (PW: IncidentResponse) and Logfile.txt\n\n![OutputDirectories](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/17.png)  \n**Fig 17:** Output Directories\n\n![MemoryDirectories](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/18.png)  \n**Fig 18:** Memory Directories (DumpIt and Pagefile)\n\n![Memory](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/19.png)  \n**Fig 19:** Memory Snapshot (in a forensically sound manner)\n\n![PageFileInfo](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/20.png)  \n**Fig 20:** Pagefile and PageFileInfo\n\n![Pagefile Collection](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/21.png)  \n**Fig 21:** Pagefile Collection (in a forensically sound manner)\n\n![SystemInfo](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/22.png)  \n**Fig 22:** Collected System Information\n\n![ProcessesAndModules-Extended_Info.tsv](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/23.jpg)  \n**Fig 23:** Automated Processing of 'ProcessesAndModules-Extended_Info.tsv' (MAGNET Response)\n\n![ProcessesAndModules-Extended_Info.ps1](https://github.com/LETHAL-FORENSICS/Collect-MemoryDump/blob/6b9d9900266a08b668d385501f0745f330d1d067/Screenshots/24.jpg)  \n**Fig 24:** 'ProcessesAndModules-Extended_Info.ps1' &#8594; [MemProcFS-Analyzer](https://github.com/LETHAL-FORENSICS/MemProcFS-Analyzer/blob/main/Scripts/ProcessesAndModules-Extended_Info.ps1)\n\n## Dependencies  \n7-Zip 24.09 Standalone Console (2024-11-29)  \nhttps://www.7-zip.org/download.html  \n\nBelkasoft Live RAM Capturer (2018-10-22)  \nhttps://belkasoft.com/ram-capturer  \n\nMAGNET DumpIt for Windows (2023-01-17) &#8594; Comae-Toolkit-v20230117  \nhttps://www.magnetforensics.com/resources/magnet-dumpit-for-windows/    \n\nMAGNET Encrypted Disk Detector v3.1.0 (2022-06-19)  \nhttps://www.magnetforensics.com/resources/encrypted-disk-detector/     \n\nMAGNET RAM Capture v1.2.0 (2019-07-24)  \nhttps://www.magnetforensics.com/resources/magnet-ram-capture/    \n\nMagnet RESPONSE v1.7.1 (2024-09-07)  \nhttps://www.magnetforensics.com/resources/magnet-response/  \n\nPsLoggedOn v1.35 (2016-06-29)  \nhttps://docs.microsoft.com/de-de/sysinternals/downloads/psloggedon  \n\nWinPMEM 4.0 RC2 (2020-10-13)  \nhttps://github.com/Velocidex/WinPmem/releases  \n\n## Links\n[Belkasoft Live RAM Capturer](https://belkasoft.com/ram-capturer)  \n[MAGNET DumpIt for Windows](https://www.magnetforensics.com/resources/magnet-dumpit-for-windows/)  \n[MAGNET Encrypted Disk Detector](https://www.magnetforensics.com/resources/encrypted-disk-detector/)  \n[MAGNET RAM Capture](https://www.magnetforensics.com/resources/magnet-ram-capture/)  \n[MAGNET Response](https://www.magnetforensics.com/resources/magnet-response/)  \n[WinPMEM](https://github.com/Velocidex/WinPmem)  \n"
  },
  {
    "path": "SECURITY.md",
    "content": "# Security Policy\n\n## Reporting Security Issues\n\nLETHAL-FORENSICS takes the security of our software products seriously. If you believe you have found a security vulnerability in any LETHAL-FORENSICS owned repository, please report it to us as described below.\n\n### Reporting Process\n\n1. Please do not report security vulnerabilities through public GitHub issues.\n2. Instead, please contact us directly via:\n   - LinkedIn: [LETHAL-FORENSICS](https://linkedin.com/company/lethal-forensics)\n   - You can reach out through LinkedIn's messaging system first, and we can establish a secure communication channel if needed.\n3. Also, please be aware that there is no bug bounty program in place where you can expect a reward for your report.\n\n### Requested Information\n\nWhen reporting a security issue, please include:\n\n- A clear description of the security vulnerability\n- Step-by-step instructions to reproduce the issue\n- Impact of the issue, including how an attacker might exploit the issue\n- System/environment where the vulnerability was discovered\n- Version affected\n\nThis information will help us triage your report more quickly.\n\n## Preferred Languages\nWe prefer all communications to be in English or German.\n\nThank you very much!\n"
  }
]