Skip to main content

Boot Environment Audit

Summary

This ConnectWise RMM script performs a comprehensive security and boot environment audit on Windows devices. It acts as an automated health check, looking deep into the system to verify that critical security measures are in place and up to date.

Specifically, the script gathers information on:

  • Secure Boot & Certificates: Checks if Secure Boot is enabled and verifies if the device has the latest security certificates (such as the UEFI CA 2023 update) required to keep the boot process secure.
  • Hardware & BIOS Updates: Identifies the device manufacturer (like Dell, HP, or Lenovo) and counts how many hardware driver updates are available. It also logs the current BIOS version and checks if the system's hardware is capable of supporting newer security standards.
  • System Boot Configuration: Scans the boot setup to detect if the machine is configured to boot from a network (PXE) or if it has alternative operating systems installed (Dual-Boot/Linux environments).
  • Recovery & Telemetry: Checks if the built-in Windows Recovery Environment (WinRE) is active and verifies if Windows diagnostic data collection (telemetry) is turned on or off.
  • Windows Updates: Identifies the most recently installed cumulative Windows update and checks if the system meets specific update baselines (November 2025 or newer).

Once the audit is complete, the script automatically saves all this valuable data directly into designated custom fields on the endpoint within your ConnectWise RMM environment. This allows for easy filtering, reporting, and visibility across your entire fleet of managed devices.

Sample Run

Image1

Dependencies

Custom Fields

NameExampleLevelTypeEditableDescription
SB_OEM_Updates_Count3EndpointText BoxNoNumber of available drivers, Firmware, BIOS updates from the OEM (Dell Command Update, HP Image Assistant, Lenovo Updates, or Windows Update).
SB_SecureBoot_StatusEnabledEndpointText BoxNoCurrent Secure Boot state: Enabled, Disabled, or Unknown.
SB_Telemetry_StatusDisabledEndpointText BoxNoWindows telemetry setting: Enabled or Disabled (based on registry and DiagTrack service).
SB_DB_Certificate_StatusUpdatedEndpointText BoxNoUEFI db certificate status: Updated (CA 2023), Out of date, or Not present.
SB_KEK_Certificate_StatusUpdatedEndpointText BoxNoUEFI KEK certificate status: Updated (Microsoft KEK 2K CA 2023), Out of date, or Not present.
SB_DBDefault_Certificate_StatusOut of dateEndpointText BoxNoDefault db certificate status: Updated (CA 2023), Out of date, or Not present.
SB_Current_Cumulative_UpdateKB5012345EndpointText BoxNoLatest installed Windows cumulative update identifier.
SB_Nov_2025_CU_InstalledTrueEndpointText BoxNoTrue if the November 2025 or newer cumulative update is installed; False otherwise.
SB_BiosVersion1.15.2EndpointText BoxNoBIOS/firmware version string collected from the system.
SB_CA2023_Supported_BIOS_Version1.16.0EndpointText BoxNoMinimum BIOS version required for CA 2023 Secure Boot support per the OEM; 'Not listed' if the model is not found in the lookup.
SB_PXE_PresentFalseEndpointText BoxNoTrue if firmware boot entries include PXE/network boot options; False otherwise.
SB_DualBoot_Or_NonWindowsEFIFalseEndpointText BoxNoTrue if non-Windows EFI boot entries are detected (Ubuntu, Debian, GRUB, rEFInd, etc.); False otherwise.
SB_WinRE_EnabledTrueEndpointText BoxNoTrue if the Windows Recovery Environment is enabled; False otherwise.
SB_Present_ConditionsWinREEnabledEndpointText BoxNoComma-separated summary of detected boot conditions (e.g., 'PXE, DualBoot/NonWindowsEFI, WinREEnabled').
SB_PXE_EvidenceIPv4 NetworkEndpointText BoxNoDetailed boot firmware entries indicating PXE/network boot (extracted from system data).
SB_DualBoot_EvidenceEFI\ubuntu\grubx64.efiEndpointText BoxNoDetailed boot firmware entries indicating non-Windows EFI loaders (extracted from system data).
SB_Available_UpdatesNot existEndpointText BoxNoSecure Boot registry value for available UEFI updates; 'Not exist' if the key is not present.
SB_UEFICA2023_StatusNot existEndpointText BoxNoSecure Boot servicing registry value indicating CA 2023 enrollment status; 'Not exist' if the key is not present.
SB_UEFICA2023_ErrorNot existEndpointText BoxNoSecure Boot servicing registry value showing CA 2023 enrollment errors; 'Not exist' if the key is not present.
SB_WindowsUEFICA2023_CapableNot existEndpointText BoxNoSecure Boot servicing registry value indicating device hardware CA 2023 capability; 'Not exist' if the key is not present.
SB_Confidence_LevelNot existEndpointText BoxNoSecure Boot servicing registry confidence level for CA 2023 enrollment; 'Not exist' if the key is not present.
SB_Confidence_Update_TypeNot existEndpointText BoxNoSecure Boot servicing registry update type for CA 2023; 'Not exist' if the key is not present.
SB_BucketHashNot existEndpointText BoxNoSecure Boot servicing registry bucket hash for troubleshooting; 'Not exist' if the key is not present.
SB_Data_Collection_Time2026-05-14 17:51:24EndpointText BoxNoTimestamp (yyyy-MM-dd HH:mm:ss) when the data was collected.
Boot Environment Audit1EndpointText BoxYesSets this custom field to 1 when the script runs successfully, indicating that the boot environment has been audited and data is available in the other custom fields.

Task Setup Path

  • Tasks Path: AUTOMATIONTasks
  • Task Type: Script Editor

Task Creation

Description

  • Name: Boot Environment Audit
  • Description: The script audits Windows boot security and populates 24 custom fields (SB_ prefix) with critical data: Secure Boot status, UEFI CA 2023 certificate enrollment, OEM driver updates, cumulative update readiness, BIOS versions, firmware boot entries, WinRE status, telemetry configuration, and registry servicing values. It downloads and executes the core audit script, transforms output for RMM database compatibility, and exports JSON results for custom field integration, enabling administrators to track boot security posture and compliance across managed endpoints.
  • Category: Data Collection

Image2

Script Editor

Row 1: PowerShell script

  • Notes: Data Collection Script
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 1800
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 1

Image3

Row 2: Script Log

  • Notes: Data Collection Script Log
  • Continue on Failure: True
  • Operating System: Windows
  • Script Log Message: %Output%

Image4

Row 3: PowerShell script

  • Notes: Result File Check
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: False
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 2

Image5

Row 4: PowerShell script

  • Notes: SB_OEM_Updates_Count
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 3

Image6

Row 5: Set Custom Field ( SB_OEM_Updates_Count = %Output% )

  • Notes: SB_OEM_Updates_Count
  • Custom Field: SB_OEM_Updates_Count
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image7

Row 6: PowerShell script

  • Notes: SB_SecureBoot_Status
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 4

Image8

Row 7: Set Custom Field ( SB_SecureBoot_Status = %Output% )

  • Notes: SB_SecureBoot_Status
  • Custom Field: SB_SecureBoot_Status
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image9

Row 8: PowerShell script

  • Notes: SB_Telemetry_Status
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 5

Image10

Row 9: Set Custom Field ( SB_Telemetry_Status = %Output% )

  • Notes: SB_Telemetry_Status
  • Custom Field: SB_Telemetry_Status
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image11

Row 10: PowerShell script

  • Notes: SB_DB_Certificate_Status
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 6

Image12

Row 11: Set Custom Field ( SB_DB_Certificate_Status = %Output% )

  • Notes: SB_DB_Certificate_Status
  • Custom Field: SB_DB_Certificate_Status
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image13

Row 12: PowerShell script

  • Notes: SB_KEK_Certificate_Status
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 7

Image14

Row 13: Set Custom Field ( SB_KEK_Certificate_Status = %Output% )

  • Notes: SB_KEK_Certificate_Status
  • Custom Field: SB_KEK_Certificate_Status
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image15

Row 14: PowerShell script

  • Notes: SB_DBDefault_Certificate_Status
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 8

Image16

Row 15: Set Custom Field ( SB_DBDefault_Certificate_Status = %Output% )

  • Notes: SB_DBDefault_Certificate_Status
  • Custom Field: SB_DBDefault_Certificate_Status
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image17

Row 16: PowerShell script

  • Notes: SB_Current_Cumulative_Update
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 9

Image18

Row 17: Set Custom Field ( SB_Current_Cumulative_Update = %Output% )

  • Notes: SB_Current_Cumulative_Update
  • Custom Field: SB_Current_Cumulative_Update
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image19

Row 18: PowerShell script

  • Notes: SB_Nov_2025_CU_Installed
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 10

Image20

Row 19: Set Custom Field ( SB_Nov_2025_CU_Installed = %Output% )

  • Notes: SB_Nov_2025_CU_Installed
  • Custom Field: SB_Nov_2025_CU_Installed
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image21

Row 20: PowerShell script

  • Notes: SB_BiosVersion
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 11

Image22

Row 21: Set Custom Field ( SB_BiosVersion = %Output% )

  • Notes: SB_BiosVersion
  • Custom Field: SB_BiosVersion
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image23

Row 22: PowerShell script

  • Notes: SB_CA2023_Supported_BIOS_Version
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 12

Image24

Row 23: Set Custom Field ( SB_CA2023_Supported_BIOS_Version = %Output% )

  • Notes: SB_CA2023_Supported_BIOS_Version
  • Custom Field: SB_CA2023_Supported_BIOS_Version
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image25

Row 24: PowerShell script

  • Notes: SB_PXE_Present
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 13

Image26

Row 25: Set Custom Field ( SB_PXE_Present = %Output% )

  • Notes: SB_PXE_Present
  • Custom Field: SB_PXE_Present
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image27

Row 26: PowerShell script

  • Notes: SB_DualBoot_Or_NonWindowsEFI
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 14

Image28

Row 27: Set Custom Field ( SB_DualBoot_Or_NonWindowsEFI = %Output% )

  • Notes: SB_DualBoot_Or_NonWindowsEFI
  • Custom Field: SB_DualBoot_Or_NonWindowsEFI
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image29

Row 28: PowerShell script

  • Notes: SB_WinRE_Enabled
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 15

Image30

Row 29: Set Custom Field ( SB_WinRE_Enabled = %Output% )

  • Notes: SB_WinRE_Enabled
  • Custom Field: SB_WinRE_Enabled
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image31

Row 30: PowerShell script

  • Notes: SB_Present_Conditions
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 16

Image32

Row 31: Set Custom Field ( SB_Present_Conditions = %Output% )

  • Notes: SB_Present_Conditions
  • Custom Field: SB_Present_Conditions
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image33

Row 32: PowerShell script

  • Notes: SB_PXE_Evidence
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 17

Image34

Row 33: Set Custom Field ( SB_PXE_Evidence = %Output% )

  • Notes: SB_PXE_Evidence
  • Custom Field: SB_PXE_Evidence
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image35

Row 34: PowerShell script

  • Notes: SB_DualBoot_Evidence
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 18

Image36

Row 35: Set Custom Field ( SB_DualBoot_Evidence = %Output% )

  • Notes: SB_DualBoot_Evidence
  • Custom Field: SB_DualBoot_Evidence
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image37

Row 36: PowerShell script

  • Notes: SB_Available_Updates
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 19

Image38

Row 37: Set Custom Field ( SB_Available_Updates = %Output% )

  • Notes: SB_Available_Updates
  • Custom Field: SB_Available_Updates
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image39

Row 38: PowerShell script

  • Notes: SB_UEFICA2023_Status
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 20

Image40

Row 39: Set Custom Field ( SB_UEFICA2023_Status = %Output% )

  • Notes: SB_UEFICA2023_Status
  • Custom Field: SB_UEFICA2023_Status
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image41

Row 40: PowerShell script

  • Notes: SB_UEFICA2023_Error
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 21

Image42

Row 41: Set Custom Field ( SB_UEFICA2023_Error = %Output% )

  • Notes: SB_UEFICA2023_Error
  • Custom Field: SB_UEFICA2023_Error
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image43

Row 42: PowerShell script

  • Notes: SB_WindowsUEFICA2023_Capable
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 22

Image44

Row 43: Set Custom Field ( SB_WindowsUEFICA2023_Capable = %Output% )

  • Notes: SB_WindowsUEFICA2023_Capable
  • Custom Field: SB_WindowsUEFICA2023_Capable
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image45

Row 44: PowerShell script

  • Notes: SB_Confidence_Level
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 23

Image46

Row 45: Set Custom Field ( SB_Confidence_Level = %Output% )

  • Notes: SB_Confidence_Level
  • Custom Field: SB_Confidence_Level
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image47

Row 46: PowerShell script

  • Notes: SB_Confidence_Update_Type
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 24

Image48

Row 47: Set Custom Field ( SB_Confidence_Update_Type = %Output% )

  • Notes: SB_Confidence_Update_Type
  • Custom Field: SB_Confidence_Update_Type
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image49

Row 48: PowerShell script

  • Notes: SB_BucketHash
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 25

Image50

Row 49: Set Custom Field ( SB_BucketHash = %Output% )

  • Notes: SB_BucketHash
  • Custom Field: SB_BucketHash
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image51

Row 50: PowerShell script

  • Notes: SB_Data_Collection_Time
  • Use Generative AI Assist for script creation: False
  • Expected time of script execution in seconds: 300
  • Continue on Failure: True
  • Run As: System
  • Operating System: Windows
  • PowerShell Script Editor:

PowerShell Script 26

Image52

Row 51: Set Custom Field ( SB_Data_Collection_Time = %Output% )

  • Notes: SB_Data_Collection_Time
  • Custom Field: SB_Data_Collection_Time
  • Value: %Output%
  • Continue on Failure: True
  • Operating System: Windows

Image53

Row 52: Set Custom Field ( Boot Environment Audit = 1 )

  • Notes: Boot Environment Audit
  • Custom Field: Boot Environment Audit
  • Value: 1
  • Continue on Failure: True
  • Operating System: Windows

Image54

Completed Script

Image55

Output

  • Script Log
  • Custom Fields

Changelog

2026-05-14

  • Initial version of the document