elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.


Tema destacado: Como proteger una cartera - billetera de Bitcoin


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [APORTE] [PowerShell] Boot Security Diagnostic — Diagnóstico de seguridad de arranque.
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [APORTE] [PowerShell] Boot Security Diagnostic — Diagnóstico de seguridad de arranque.  (Leído 360 veces)
Eleкtro
Ex-Staff
*
Desconectado Desconectado

Mensajes: 9.985



Ver Perfil
[APORTE] [PowerShell] Boot Security Diagnostic — Diagnóstico de seguridad de arranque.
« en: 13 Abril 2026, 17:57 pm »

El siguiente script, desarrollado en PowerShell (y apoyado en soluciones de IAs), sirve para realizar un diagnóstico específico del estado de seguridad del sistema durante el arranque (boot), verificando múltiples mecanismos críticos de protección en Windows y mostrando su estado de forma clara y estructurada.

Este script está diseñado como una herramienta de auditoría simple y rápida que permite identificar ciertas configuraciones inseguras, protecciones deshabilitadas o mecanismos vulnerables que puedan comprometer la integridad del sistema.





Boot Security Diagnostic.ps1
Código
  1. # Boot Security Diagnostic v1.0 by ElektroStudios
  2.  
  3. $Host.UI.RawUI.WindowTitle = "Boot Security Diagnostic v1.0 by ElektroStudios"
  4.  
  5. # Set window size (Width, Height)
  6. $Host.UI.RawUI.WindowSize = New-Object System.Management.Automation.Host.Size(85, 50)
  7. $Host.UI.RawUI.BufferSize = New-Object System.Management.Automation.Host.Size(150, 300)
  8.  
  9. # Check for Admin Privileges
  10. if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
  11.    Write-Host "ERROR: RUN AS ADMINISTRATOR" -ForegroundColor Red
  12.    pause
  13.    exit
  14. }
  15.  
  16. # --- Helper Functions ---
  17.  
  18. function Write-Separator {
  19.    Write-Host ("=" * 66) -ForegroundColor DarkCyan
  20. }
  21.  
  22. function Write-SectionHeader {
  23.    param([string]$Title)
  24.    Write-Host ""
  25.    Write-Host "[$Title]" -ForegroundColor Yellow
  26.    Write-Host ""
  27. }
  28.  
  29. function Write-Field {
  30.    param(
  31.        [string]$Label,
  32.        [string]$Value,
  33.        [string]$Color = "White"
  34.    )
  35.    $padding = 37 - $Label.Length
  36.    if ($padding -lt 1) { $padding = 1 }
  37.    $spaces = " " * $padding
  38.    Write-Host "  $Label$spaces : " -NoNewline
  39.    Write-Host $Value -ForegroundColor $Color
  40. }
  41.  
  42. # ============================================================
  43. # HEADER
  44. # ============================================================
  45.  
  46. Write-Separator
  47. Write-Host ("BOOT SECURITY DIAGNOSTIC").PadLeft(44).PadRight(66) -ForegroundColor Cyan
  48. Write-Separator
  49.  
  50. # ============================================================
  51. # OPERATING SYSTEM
  52. # ============================================================
  53.  
  54. Write-SectionHeader "OPERATING SYSTEM"
  55. $os = Get-CimInstance Win32_OperatingSystem
  56. Write-Field "Caption" $os.Caption.Trim() "White"
  57. Write-Field "Version" $os.Version.Trim() "White"
  58. try {
  59.    $displayVersion = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name "DisplayVersion" -ErrorAction SilentlyContinue).DisplayVersion.Trim()
  60.    if ($displayVersion) {
  61.        Write-Field "Display Version" $displayVersion "White"
  62.    }
  63. } catch {}
  64. Write-Field "Architecture" $os.OSArchitecture.Trim() "White"
  65. Write-Field "Boot Device" $os.BootDevice.Trim() "White"
  66. Write-Field "System Device" $os.SystemDevice.Trim() "White"
  67. Write-Field "System Drive" $os.SystemDrive.Trim() "White"
  68. Write-Field "Windows Directory" $os.WindowsDirectory.Trim() "White"
  69. Write-Field "Last Boot Up Time" $os.LastBootUpTime "White"
  70.  
  71. # ============================================================
  72. # CPU
  73. # ============================================================
  74.  
  75. Write-SectionHeader "CPU"
  76. $cpu = Get-CimInstance Win32_Processor
  77. Write-Field "Caption" $cpu.Name.Trim() "White"
  78.  
  79. $brand = "Virtualization"
  80. if ($cpu.Caption -match "AMD") {
  81.    $brand = "Virtualization (AMD-V)"
  82. } elseif ($cpu.Caption -match "Intel") {
  83.    $brand = "Virtualization (Intel VT-X)"
  84. }
  85. if ($cpu.VirtualizationFirmwareEnabled) {
  86.    Write-Field "$($brand)" "ENABLED" "Green"
  87. } else {
  88.    Write-Field "$($brand)" "DISABLED" "Red"
  89. }
  90.  
  91. try {
  92.    if ($cpu.Caption -match "AMD") {
  93.        Write-Field "KVA Shadow (Meltdown Mitigation)" "NOT REQUIRED FOR AMD CPU" "Green"
  94.    } elseif ($cpu.Caption -match "Intel") {
  95.        $kva = Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "FeatureSettingsOverride" -ErrorAction SilentlyContinue
  96.        $kvaShadowDisabled = ($null -ne $kva.FeatureSettingsOverride) -and (($kva.FeatureSettingsOverride -band 0x02) -ne 0)
  97.  
  98.        if ($kvaShadowDisabled) {
  99.            Write-Field "KVA Shadow (Meltdown Mitigation)" "DISABLED (UNPROTECTED)" "Red"
  100.        } else {
  101.            Write-Field "KVA Shadow (Meltdown Mitigation)" "ENABLED (PROTECTED)" "Green"
  102.        }
  103.    }
  104. } catch {
  105.    Write-Field "KVA Shadow" "QUERY FAILED" "Yellow"
  106. }
  107.  
  108. # ============================================================
  109. # BIOS
  110. # ============================================================
  111.  
  112. Write-SectionHeader "BIOS"
  113.  
  114. # Firmware Type (UEFI vs Legacy)
  115. try {
  116.    Add-Type -TypeDefinition @"
  117.        using System;
  118.        using System.Runtime.InteropServices;
  119.        public class FW {
  120.            [DllImport("kernel32.dll", SetLastError=true)]
  121.            public static extern uint GetFirmwareType(ref uint FirmwareType);
  122.        }
  123. "@ -ErrorAction SilentlyContinue
  124.    [uint32]$fwResult = 0
  125.    [FW]::GetFirmwareType([ref]$fwResult) | Out-Null
  126.    switch ($fwResult) {
  127.        1 { Write-Field "Firmware Type" "BIOS (Legacy)" "Yellow" }
  128.        2 { Write-Field "Firmware Type" "UEFI" "Green" }
  129.        default { Write-Field "Firmware Type" "UNKNOWN ($fwResult)" "Yellow" }
  130.    }
  131. } catch {
  132.    Write-Field "Firmware Type" "QUERY FAILED" "Yellow"
  133. }
  134.  
  135. # Secure Boot
  136. try {
  137.    $secureBootState = Confirm-SecureBootUEFI
  138.    if ($secureBootState) {
  139.        Write-Field "Secure Boot" "ENABLED" "Green"
  140.    } else {
  141.        Write-Field "Secure Boot" "DISABLED" "Red"
  142.    }
  143. } catch {
  144.    Write-Field "Secure Boot" "NOT SUPPORTED / LEGACY BIOS" "Red"
  145. }
  146.  
  147. # ============================================================
  148. # DRIVER SIGNATURE ENFORCEMENT (DSE)
  149. # ============================================================
  150.  
  151. Write-SectionHeader "DRIVER SIGNATURE ENFORCEMENT (DSE)"
  152.  
  153. $bcdOutput = ""
  154. try {
  155.    $bcdOutput = bcdedit /enum "{current}" 2>&1 | Out-String
  156. } catch {}
  157.  
  158. # bcdedit testsigning
  159. try {
  160.    if ($bcdOutput -match "testsigning\s+Yes") {
  161.        Write-Field "Test Signing     (Boot Option)" "ENABLED (Test Mode / DSE partial bypass)" "Red"
  162.    } else {
  163.        Write-Field "Test Signing     (Boot Option)" "DISABLED" "Green"
  164.    }
  165.  
  166. } catch {
  167.    Write-Field "Test Signing     (Boot Option)" "bcdedit QUERY FAILED" "Red"
  168. }
  169.  
  170. # bcdedit nointegritychecks
  171. try {
  172.    if (-not ($bcdOutput -match "nointegritychecks\s+Yes")) {
  173.        Write-Field "Integrity Checks (Boot Option)" "ENABLED" "Green"
  174.    } else {
  175.        Write-Field "Integrity Checks (Boot Option)" "DISABLED (DSE full bypass)" "Red"
  176.    }
  177.  
  178. } catch {
  179.    Write-Field "Integrity Checks (Boot Option)" "bcdedit QUERY FAILED" "Red"
  180. }
  181.  
  182. # Live kernel query via NtQuerySystemInformation
  183. $CodeIntegrityDefinition = @"
  184.    using System;
  185.    using System.Runtime.InteropServices;
  186.  
  187.    public class CI {
  188.        [StructLayout(LayoutKind.Sequential)]
  189.        public struct SYSTEM_CODEINTEGRITY_INFORMATION {
  190.            public uint Length;
  191.            public uint CodeIntegrityOptions;
  192.        }
  193.  
  194.        [DllImport("ntdll.dll")]
  195.        public static extern int NtQuerySystemInformation(int SystemInformationClass, ref SYSTEM_CODEINTEGRITY_INFORMATION SystemInformation, uint SystemInformationLength, out uint ReturnLength);
  196.  
  197.        public static uint GetOptions() {
  198.            SYSTEM_CODEINTEGRITY_INFORMATION info = new SYSTEM_CODEINTEGRITY_INFORMATION();
  199.            info.Length = (uint)Marshal.SizeOf(typeof(SYSTEM_CODEINTEGRITY_INFORMATION));
  200.            uint retLen;
  201.            NtQuerySystemInformation(103, ref info, info.Length, out retLen);
  202.            return info.CodeIntegrityOptions;
  203.        }
  204.    }
  205. "@
  206.  
  207. Add-Type -TypeDefinition $CodeIntegrityDefinition -ErrorAction SilentlyContinue
  208.  
  209. # Flag Constants:
  210. # 0x01 = CODE_INTEGRITY_OPTION_ENABLED
  211. # 0x02 = CODE_INTEGRITY_OPTION_TESTSIGNING
  212.  
  213. # NtQuerySystemInformation testsigning
  214. try {
  215.    $options = [CI]::GetOptions()
  216.    $testSigningEnabled = ($options -band 0x02) -ne 0
  217.    if ($testSigningEnabled) {
  218.        Write-Field "Test Signing     (Live System)" "ENABLED (Test Mode / DSE partial bypass)" "Red"
  219.  
  220.    } else {
  221.        Write-Field "Test Signing     (Live System)" "DISABLED" "Green"
  222.    }
  223. } catch {
  224.    Write-Field "Test Signing     (Live System)" "NtQuerySystemInformation QUERY FAILED" "Red"
  225. }
  226.  
  227. # NtQuerySystemInformation nointegritychecks
  228. try {
  229.    $options = [CI]::GetOptions()
  230.    $ciEnabled = ($options -band 0x01) -ne 0
  231.    if ($ciEnabled) {
  232.        Write-Field "Integrity Checks (Live System)" "ENABLED" "Green"
  233.    } else {
  234.        Write-Field "Integrity Checks (Live System)" "DISABLED (DSE full bypass)" "Red"
  235.    }
  236. } catch {
  237.    Write-Field "Integrity Checks (Live System)" "NtQuerySystemInformation QUERY FAILED" "Red"
  238. }
  239.  
  240. # ============================================================
  241. # WINDOWS HYPERVISOR
  242. # ============================================================
  243.  
  244. Write-SectionHeader "WINDOWS HYPERVISOR"
  245.  
  246. # Hypervisor-Enforced Code Integrity (HVCI)
  247. try {
  248.    $hvciReg = (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" -Name "Enabled" -ErrorAction SilentlyContinue).Enabled
  249.    if ($hvciReg -eq 1) {
  250.        Write-Field "HV-Enforced Code Integrity (HVCI)" "ENABLED" "Green"
  251.    } elseif ($hvciReg -eq 0) {
  252.        Write-Field "HV-Enforced Code Integrity (HVCI)" "DISABLED" "Red"
  253.    } else {
  254.        Write-Field "HV-Enforced Code Integrity (HVCI)" "NOT DETECTED" "Red"
  255.    }
  256. } catch {
  257.    Write-Field "HV-Enforced Code Integrity (HVCI)" "REGISTRY QUERY FAILED" "Red"
  258. }
  259.  
  260. # Virtualization Based Security (VBS)
  261. try {
  262.    $regVbs = (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "EnableVirtualizationBasedSecurity" -ErrorAction SilentlyContinue).EnableVirtualizationBasedSecurity
  263.    if ($regVbs -eq 1) {
  264.        Write-Field "Virtualization Based Security (VBS)" "ENABLED" "Green"
  265.    } elseif ($regVbs -eq 0) {
  266.        Write-Field "Virtualization Based Security (VBS)" "DISABLED" "Red"
  267.    } else {
  268.        Write-Field "Virtualization Based Security (VBS)" "NOT DETECTED" "Red"
  269.    }
  270. } catch {
  271.    Write-Field "Virtualization Based Security (VBS)" "REGISTRY QUERY FAILED" "Red"
  272. }
  273.  
  274. # Credential Guard
  275. try {
  276.    $credGuard = (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\CredentialGuard" -Name "Enabled" -ErrorAction SilentlyContinue).Enabled
  277.    if ($credGuard -eq 1) {
  278.        Write-Field "Credential Guard" "ENABLED" "Green"
  279.    } elseif ($credGuard -eq 0) {
  280.        Write-Field "Credential Guard" "DISABLED" "Red"
  281.    } else {
  282.        Write-Field "Credential Guard" "NOT DETECTED" "Red"
  283.    }
  284. } catch {
  285.    Write-Field "Credential Guard" "REGISTRY QUERY FAILED" "Red"
  286. }
  287.  
  288. # Device Guard
  289. try {
  290.    $dg = Get-CimInstance -ClassName Win32_DeviceGuard -Namespace "root\Microsoft\Windows\DeviceGuard" -ErrorAction SilentlyContinue
  291.    if ($dg) {
  292.        switch ($dg.VirtualizationBasedSecurityStatus) {
  293.            0 { Write-Field "Device Guard" "DISABLED" "Red" }
  294.            1 { Write-Field "Device Guard" "ENABLED (NOT RUNNING)" "Yellow" }
  295.            2 { Write-Field "Device Guard" "ENABLED AND RUNNING" "Green" }
  296.            default { Write-Field "Device Guard" "UNKNOWN ($($dg.VirtualizationBasedSecurityStatus))" "Red" }
  297.        }
  298.    } else {
  299.        Write-Field "Device Guard" "NOT DETECTED" "Red"
  300.    }
  301. } catch {
  302.    Write-Field "Device Guard" "WMI QUERY FAILED" "Red"
  303. }
  304.  
  305. # ============================================================
  306. # TRUSTED PLATFORM MODULE (TPM)
  307. # ============================================================
  308.  
  309. Write-SectionHeader "TRUSTED PLATFORM MODULE (TPM)"
  310.  
  311. try {
  312.    $tpm = Get-CimInstance -Namespace "root\CIMv2\Security\MicrosoftTpm" -ClassName Win32_Tpm -ErrorAction SilentlyContinue
  313.    if ($tpm) {
  314.        Write-Field "TPM Present" "YES" "Green"
  315.        # Write-Field "TPM Activated" $(if ($tpm.IsActivated_InitialValue) { "YES" } else { "NO" }) $(if ($tpm.IsActivated_InitialValue) { "Green" } else { "Red" })
  316.        Write-Field "TPM Enabled" $(if ($tpm.IsEnabled_InitialValue) { "YES" } else { "NO" }) $(if ($tpm.IsEnabled_InitialValue) { "Green" } else { "Red" })
  317.        Write-Field "TPM Version" $tpm.SpecVersion.Split(',')[0].Trim() "White"
  318.    } else {
  319.        Write-Field "TPM Present" "NOT DETECTED" "Red"
  320.    }
  321. } catch {
  322.    Write-Field "TPM Present" "WMI QUERY FAILED" "Red"
  323. }
  324.  
  325. # ============================================================
  326. # KERNEL DIRECT MEMORY ACCESS (DMA) PROTECTION
  327. # ============================================================
  328.  
  329. Write-SectionHeader "KERNEL DIRECT MEMORY ACCESS (DMA) PROTECTION"
  330.  
  331. # DMA Group Policy
  332. $dmaPolicy = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Kernel DMA Protection" -Name "ExternalDeviceEnumeration" -ErrorAction SilentlyContinue).ExternalDeviceEnumeration
  333.  
  334. if ($null -ne $dmaPolicy) {
  335.    switch ($dmaPolicy) {
  336.        0 {
  337.            $policyText = "BLOCK ALL"
  338.            $policyColor = "Green"
  339.        }
  340.        1 {
  341.            $policyText = "BLOCK UNTIL USER LOG-IN"
  342.            $policyColor = "Green"
  343.        }
  344.        2 {
  345.            $policyText = "ALLOW ALL"
  346.            $policyColor = "Red"
  347.        }
  348.        default {
  349.            $policyText = "UNKNOWN ($dmaPolicy)"
  350.            $policyColor = "Yellow"
  351.        }
  352.    }
  353.    Write-Field "Kernel DMA Group Policy (GPO)" $policyText $policyColor
  354. } else {
  355.    Write-Field "Kernel DMA Group Policy (GPO)" "NOT DEFINED" "Red"
  356. }
  357.  
  358. # Check if hardware and kernel are actually executing it
  359. try {
  360.    $dg = Get-CimInstance -ClassName Win32_DeviceGuard -Namespace "root\Microsoft\Windows\DeviceGuard" -ErrorAction SilentlyContinue
  361.  
  362.    if ($dg.DMAProtectionInUse) {
  363.        Write-Field "Kernel DMA Protection Service" "RUNNING / ACTIVE" "Green"
  364.    } else {
  365.        # If not running, VT-d / AMD-Vi is likely missing or disabled in BIOS
  366.        Write-Field "Kernel DMA Protection Service" "NOT RUNNING / INACTIVE" "Red"
  367.    }
  368. } catch {
  369.    Write-Field "Kernel DMA Protection Service" "WMI QUERY FAILED" "Red"
  370. }
  371.  
  372. Write-SectionHeader "EARLY LAUNCH ANTI-MALWARE (ELAM)"
  373.  
  374. try {
  375.    $elamDrivers = Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\EarlyLaunch" -Name "BackupPath" -ErrorAction SilentlyContinue
  376.    if ($elamDrivers) {
  377.        Write-Field "ELAM Backup Path" $elamDrivers.BackupPath.Trim() "White"
  378.    }
  379. } catch {}
  380.  
  381. try {
  382.    $bootDrivers = Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\EarlyLaunch" -ErrorAction SilentlyContinue
  383.    $elamPolicy = (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\CI" -Name "BootDriverPolicy" -ErrorAction SilentlyContinue).BootDriverPolicy
  384.    switch ($elamPolicy) {
  385.        $null   { Write-Field "Boot Driver Policy" "NOT SET (OS default)" "Yellow" }
  386.        8       { Write-Field "Boot Driver Policy" "GOOD AND UNKNOWN" "Green" }
  387.        1       { Write-Field "Boot Driver Policy" "GOOD ONLY" "Green" }
  388.        3       { Write-Field "Boot Driver Policy" "GOOD AND BAD (permissive)" "Red" }
  389.        7       { Write-Field "Boot Driver Policy" "ALL DRIVERS" "Red" }
  390.        default { Write-Field "Boot Driver Policy" "CUSTOM ($elamPolicy)" "Yellow" }
  391.    }
  392. } catch {
  393.    Write-Field "Boot Driver Policy" "QUERY FAILED" "Red"
  394. }
  395.  
  396. # ============================================================
  397. # LOCAL SECURITY AUTHORITY (LSA) PROTECTION
  398. # ============================================================
  399.  
  400. Write-SectionHeader "LOCAL SECURITY AUTHORITY (LSA) PROTECTION"
  401.  
  402. try {
  403.    $lsa = (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name "RunAsPPL" -ErrorAction SilentlyContinue).RunAsPPL
  404.    switch ($lsa) {
  405.        1       { Write-Field "Run As Protected Process Light (PPL)" "ENABLED" "Green" }
  406.        2       { Write-Field "Run As Protected Process Light (PPL)" "ENABLED (UEFI Lock)" "Green" }
  407.        0       { Write-Field "Run As Protected Process Light (PPL)" "DISABLED (credential dumping risk)" "Red" }
  408.        $null   { Write-Field "Run As Protected Process Light (PPL)" "NOT CONFIGURED (default = disabled)" "Red" }
  409.        default { Write-Field "Run As Protected Process Light (PPL)" "UNKNOWN ($lsa)" "Yellow" }
  410.    }
  411. } catch {
  412.    Write-Field "Run As Protected Process Light (PPL)" "REGISTRY QUERY FAILED" "Red"
  413. }
  414.  
  415. # ============================================================
  416. # DATA EXECUTION PREVENTION (DEP)
  417. # ============================================================
  418.  
  419. Write-SectionHeader "DATA EXECUTION PREVENTION (DEP)"
  420. try {
  421.    if ($os.DataExecutionPrevention_Available) {
  422.        switch ($os.DataExecutionPrevention_SupportPolicy) {
  423.            0 { Write-Field "DEP Policy" "Always Off (vulnerable)" "Red" }
  424.            1 { Write-Field "DEP Policy" "Always On (maximum protection)" "Green" }
  425.            2 { Write-Field "DEP Policy" "Opt-In (limited protection)" "Yellow" }
  426.            3 { Write-Field "DEP Policy" "Opt-Out (protected with exclusions)" "Green" }
  427.            default { Write-Field "DEP Policy" "UNKNOWN ($($os.DataExecutionPrevention_SupportPolicy))" "Yellow" }
  428.        }
  429.    } else {
  430.        Write-Field "DEP Hardware Support" "NOT SUPPORTED BY CPU" "Red"
  431.    }
  432. } catch {
  433.    Write-Field "DEP Hardware Support" "QUERY FAILED" "Red"
  434. }
  435.  
  436. # ============================================================
  437. # BITLOCKER ENCRYPTION
  438. # ============================================================
  439.  
  440. Write-SectionHeader "BITLOCKER ENCRYPTION"
  441.  
  442. try {
  443.    $volumes = Get-BitLockerVolume -ErrorAction SilentlyContinue
  444.    if ($volumes) {
  445.        foreach ($vol in $volumes) {
  446.            $status = $vol.ProtectionStatus
  447.            $color = if ($status -eq "On") { "Green" } else { "Red" }
  448.            $label = "Volume $($vol.MountPoint)"
  449.            Write-Field $label "$($vol.VolumeStatus) (Protection: $status)" $color
  450.        }
  451.    } else {
  452.        Write-Field "BitLocker" "NO VOLUMES FOUND" "Yellow"
  453.    }
  454. } catch {
  455.    Write-Field "BitLocker" "NOT AVAILABLE / QUERY FAILED" "Red"
  456. }
  457.  
  458. # ============================================================
  459. # FOOTER
  460. # ============================================================
  461.  
  462. Write-Host ""
  463. Write-Separator
  464. Write-Host ("END OF DIAGNOSTIC").PadLeft(44).PadRight(66) -ForegroundColor Cyan
  465. Write-Separator
  466. Write-Host ""
  467. Write-Host "Press any key to exit..."
  468. $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")

Nota: Solo he tenido oportunidad de probarlo en una CPU AMD, y con la configuración actual de mi sistema, por lo que no puedo asegurar algún posible error o falso positivo en la información mostrada al usar este script bajo una CPU Intel, aunque en principio no debería.


En línea



Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
No me aparece el arranque de dual boot « 1 2 »
Windows
Tobi_Emotic 12 17,983 Último mensaje 29 Febrero 2020, 04:45 am
por Tobi_Emotic
USB arranque con Hirens Boot « 1 2 3 »
Software
RogerSmith 20 10,695 Último mensaje 25 Octubre 2018, 09:25 am
por RogerSmith
[APORTE] [PowerShell] Truncate Log Files
Scripting
Eleкtro 0 1,936 Último mensaje 3 Marzo 2024, 22:14 pm
por Eleкtro
[APORTE] [PowerShell] RAR.exe | Test RAR Files
Scripting
Eleкtro 0 10,211 Último mensaje 5 Abril 2024, 00:39 am
por Eleкtro
[APORTE] [PowerShell] [VBS] Mostrar el tiempo transcurrido desde el último arranque del sistema.
Scripting
Eleкtro 0 4,779 Último mensaje 8 Septiembre 2025, 00:57 am
por Eleкtro
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines