SoFunction
Updated on 2025-03-10

Powershell reads all software-associated extensions in the native registry

Available for all versions.

The following code output is extremely dense, and this code can obtain the associated extensions of all software from the registry.

Copy the codeThe code is as follows:

Get-ItemProperty Registry::HKCR\.* |
  Select-Object -Property PSChildName, '(default)', ContentType, PerceivedType

Note the use of commands: Here, Get-ItemProperty uses the "Registry::" method to replace the original registry driver path of Powershell. In this way, you can use the default registry path and also access some registries without a driver path (such as HKEY_CLASSES_ROOT).

Note that using Select-Object to select the value to be retrieved, where "(default)" represents the default registry key name, and "PSChildName" represents the value contained in the registry key.

Since the path name has a * number, the command will automatically obtain all key values ​​containing "." in all HKCRs.