Title: Get-ComputerInfo is not updated to reflect current DeviceGuardAvailableSecurityProperties · Issue #16357 · PowerShell/PowerShell · GitHub
Open Graph Title: Get-ComputerInfo is not updated to reflect current DeviceGuardAvailableSecurityProperties · Issue #16357 · PowerShell/PowerShell
X Title: Get-ComputerInfo is not updated to reflect current DeviceGuardAvailableSecurityProperties · Issue #16357 · PowerShell/PowerShell
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/16357
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Get-ComputerInfo is not updated to reflect current DeviceGuardAvailableSecurityProperties","articleBody":"### Prerequisites\n\n- [X] Write a descriptive title.\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [X] Search the existing issues.\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nOn a system that has support for Windowd Defender Application Control (WDAC), `Get-ComputerInfo` will return available Virtualization-Based Security (VBS) features via the `DeviceGuardAvailableSecurityProperties` property. The [DeviceGuardHardwareSecure](https://github.com/PowerShell/PowerShell/blob/0f2f23f67a2c3ec53cf82c8d1a67b479f62934e4/src/Microsoft.PowerShell.Commands.Management/commands/management/GetComputerInfoCommand.cs#L3670-L3691) enum does not support the latest features, however.\r\n\r\nTo reproduce, run the following:\r\n\r\n```powershell\r\nGet-ComputerInfo | Select-Object -ExpandProperty DeviceGuardAvailableSecurityProperties\r\n```\r\n\r\nThe issue is surfaced when returned values are output as numbers instead of human-readable strings.\r\n\r\nTo fix the issue, all that is needed is to add the following enum values to [DeviceGuardHardwareSecure](https://github.com/PowerShell/PowerShell/blob/0f2f23f67a2c3ec53cf82c8d1a67b479f62934e4/src/Microsoft.PowerShell.Commands.Management/commands/management/GetComputerInfoCommand.cs#L3670-L3691):\r\n\r\n```csharp\r\n /// \u003csummary>\r\n /// UEFI Code Readonly.\r\n /// \u003c/summary>\r\n UEFICodeReadonly = 5,\r\n\r\n /// \u003csummary>\r\n /// SMM Security Mitigations 1.0.\r\n /// \u003c/summary>\r\n SMMSecurityMitigations = 6,\r\n\r\n /// \u003csummary>\r\n /// Mode Based Execution Control.\r\n /// \u003c/summary>\r\n ModeBasedExecutionControl = 7\r\n```\r\n\r\nThese human-readable values were obtained from `msinfo32.exe` (System Summary->Virtualization-based security Available Security Properties)\r\n\r\nThe `Get-ComputerInfo` cmdlet obtains this information from the `Win32_DeviceGuard` class which was updated to support additional enum values:\r\n\r\n```\r\nPS> ([WmiClass] 'root\\Microsoft\\Windows\\DeviceGuard:Win32_DeviceGuard').GetText('mof')\r\n[dynamic: ToInstance, provider(\"Win32_DeviceGuard\"): ToInstance, locale(1033)]\r\nclass Win32_DeviceGuard\r\n{\r\n [key] string InstanceIdentifier;\r\n string Version;\r\n [ValueMap{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"}: ToSubClass, ArrayType(\"Indexed\"): DisableOverride ToSubClass] uint32 RequiredSecurityProperties[];\r\n [ValueMap{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\"}: ToSubClass, ArrayType(\"Indexed\"): DisableOverride ToSubClass] uint32 AvailableSecurityProperties[];\r\n [ValueMap{\"0\", \"1\", \"2\"}: ToSubClass] uint32 VirtualizationBasedSecurityStatus;\r\n [ValueMap{\"1\", \"2\", \"3\", \"4\"}: ToSubClass, ArrayType(\"Indexed\"): DisableOverride ToSubClass] uint32 SecurityServicesConfigured[];\r\n [ValueMap{\"1\", \"2\", \"3\", \"4\", \"5\"}: ToSubClass, ArrayType(\"Indexed\"): DisableOverride ToSubClass] uint32 SecurityServicesRunning[];\r\n [ValueMap{\"0\", \"1\", \"2\"}: ToSubClass] uint32 CodeIntegrityPolicyEnforcementStatus;\r\n [ValueMap{\"0\", \"1\", \"2\"}: ToSubClass] uint32 UsermodeCodeIntegrityPolicyEnforcementStatus;\r\n boolean VirtualMachineIsolation;\r\n [ValueMap{\"1\", \"2\"}: ToSubClass, ArrayType(\"Indexed\"): DisableOverride ToSubClass] uint32 VirtualMachineIsolationProperties[];\r\n};\r\n```\r\n\r\nThis issue is also applicable to Windows PowerShell.\n\n### Expected behavior\n\n```console\nPS> Get-ComputerInfo | Select-Object -ExpandProperty DeviceGuardAvailableSecurityProperties\r\n\r\nBaseVirtualizationSupport\r\nSecureBoot\r\nDMAProtection\r\nSecureMemoryOverwrite\r\nUEFICodeReadonly\r\nSMMSecurityMitigations\r\nModeBasedExecutionControl\n```\n\n\n### Actual behavior\n\n```console\nPS> Get-ComputerInfo | Select-Object -ExpandProperty DeviceGuardAvailableSecurityProperties\r\n\r\nBaseVirtualizationSupport\r\nSecureBoot\r\nDMAProtection\r\nSecureMemoryOverwrite\r\n5\r\n6\r\n7\n```\n\n\n### Error details\n\n_No response_\n\n### Environment data\n\n```powershell\nPS> $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 7.1.5\r\nPSEdition Core\r\nGitCommitId 7.1.5\r\nOS Microsoft Windows 10.0.22000\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\n```\n\n\n### Visuals\n\n_No response_","author":{"url":"https://github.com/mattifestation","@type":"Person","name":"mattifestation"},"datePublished":"2021-11-02T10:43:42Z","url":"https://github.com/PowerShell/PowerShell/issues/16357"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:dace5e68-8f33-316a-e38b-67c27f2658b6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D810:128588:AC8906:F90385:6AFDA421 |
| html-safe-nonce | 1ddfc37bc22008f3a2fff697e7869291ebc3e0d735e487cf241ec5a873b1e10d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODEwOjEyODU4ODpBQzg5MDY6RjkwMzg1OjZBRkRBNDIxIiwidmlzaXRvcl9pZCI6IjYwODg3MTIyODk2MzA2NTk2MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d0f49111d4a97a7599feebd3551ca278dcf3cc655effd14b6f8c7c6d34451612 |
| hovercard-subject-tag | issue:1042157322 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/16357/issue_layout |
| twitter:image | https://opengraph.githubassets.com/76a1521f624fd5d02aec73112c22b874e1d6920e854945c6c94dd1e57d8918b9/PowerShell/PowerShell/issues/16357 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/76a1521f624fd5d02aec73112c22b874e1d6920e854945c6c94dd1e57d8918b9/PowerShell/PowerShell/issues/16357 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mattifestation |
| hostname | github.com |
| expected-hostname | github.com |
| None | bc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0ddf53eb35c87f1f8df13dbf75c3bdadbfc6e969 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width