在注册表中找到一个字符串并导出该键名

时间:2019-04-08 22:05:47

标签: powershell

我希望搜索注册表的一个特定键,该键包含大约20个子键,以查找一部分已知字符串。我不需要能够在注册表中的其他位置进行搜索。找到它后,我需要能够将完整路径的键导出到变量。

1 个答案:

答案 0 :(得分:0)

此用例的脚本存在。只需在网上和MS PowerShellGallery.com上搜索它们。如果您在尝试失败时遇到问题,请与他们联系,并回来。

Get-Command -Name '*registry*' | 
Format-Table -AutoSize

CommandType Name                                          Version Source
----------- ----                                          ------- ------
...
Function    Get-RemoteRegistryChildItem                   1.3.6   PowerShellCookbook
Function    Get-RemoteRegistryKeyProperty                 1.3.6   PowerShellCookbook
Function    Grant-RegistryAccessFullControl               1.3.6   PowerShellCookbook
Function    Search-Registry                               1.3.6   PowerShellCookbook
Function    Set-RemoteRegistryKeyProperty                 1.3.6   PowerShellCookbook
...

Find-Module -Name '*registry*' | Format-Table -AutoSize

Version Name                      Repository Description
------- ----                      ---------- -----------
...
0.0.2   PoshRegistry              PSGallery  This module contains functions to create, modify or delete registry subkeys and values on local or remote c...
...
1.0.0.1 xRegistryAccess           PSGallery  Manage registry permissions
...
相关问题