小编Tau*_*vis的帖子

无法使用 powershell 映射 HKU 注册表配置单元

我有一个关于从注册表项 HKU (HKEY_USERS) 中删除的问题。如果我用 powershell 运行它,我会收到一个错误:

Invoke-Command -ComputerName $inputPC -ScriptBlock { Remove-Item -Path 'HKU:\S-1-5-25\Software\Microsoft\Windows\CurrentVersion\RunOnce'}
Run Code Online (Sandbox Code Playgroud)

错误:

Cannot find drive. A drive with the name 'HKU' does not exist.
    + CategoryInfo          : ObjectNotFound: (HKU:String) [Remove-Item], DriveNotFoundException
    + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    + PSComputerName        : clt64792
Run Code Online (Sandbox Code Playgroud)

但是,如果HKU:我将HKLM:它交换为例如它可以工作并删除注册表项,我该如何访问HKU?我尝试了不同的方法来删除注册表项,并且所有方法都相同,但它们都没有映射 HKU 注册表项。

registry powershell

2
推荐指数
1
解决办法
4671
查看次数

标签 统计

powershell ×1

registry ×1