From 6bf8a98aeda2cbc8aa9a1d92b01b3b0200e621fd Mon Sep 17 00:00:00 2001 From: Matt Graeber Date: Tue, 26 Jul 2022 01:12:36 -0400 Subject: [PATCH] Adding Virtualization-Based Security feature names to Get-ComputerInfo (#16415) --- .../management/GetComputerInfoCommand.cs | 17 ++++++++++++++++- .../Get-ComputerInfo.Tests.ps1 | 3 ++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetComputerInfoCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetComputerInfoCommand.cs index 9379927b5a..a57756bbf7 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetComputerInfoCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetComputerInfoCommand.cs @@ -3684,7 +3684,22 @@ namespace Microsoft.PowerShell.Commands /// /// Secure Memory Overwrite. /// - SecureMemoryOverwrite = 4 + SecureMemoryOverwrite = 4, + + /// + /// UEFI Code Readonly. + /// + UEFICodeReadonly = 5, + + /// + /// SMM Security Mitigations 1.0. + /// + SMMSecurityMitigations = 6, + + /// + /// Mode Based Execution Control. + /// + ModeBasedExecutionControl = 7 } /// diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ComputerInfo.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ComputerInfo.Tests.ps1 index fd62292eb3..8962cdc617 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ComputerInfo.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ComputerInfo.Tests.ps1 @@ -1304,7 +1304,8 @@ try { "3" = "DMAProtection" "4" = "SecureMemoryOverwrite" "5" = "UEFICodeReadonly" - "6" = "SMMSecurityMitigations1.0" + "6" = "SMMSecurityMitigations" + "7" = "ModeBasedExecutionControl" } $smartStatusValues = @{ "0" = "Off"