该提供程序未实现 IDynamicPropertyCmdletProvider 接口

aym*_*man 5 registry

我正在尝试添加注册表项,但出现以下错误:

New-ItemProperty:无法使用接口。该提供程序未实现 IDynamicPropertyCmdletProvider 接口

禁用IE首次弹出窗口

$registryPath = "HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main"

$Name =“禁用FirstRunCustomize”

$值=“00000001”

新项目 -Path $registryPath -Force | 出零

New-ItemProperty -Path $registryPath -Name $name -Value $value ` -PropertyType DWORD

小智 3

你的$registryPath不正确。正确的语法是:

$registryPath = "HKCU:\Software\Policies\Microsoft\Internet Explorer\Main"
Run Code Online (Sandbox Code Playgroud)

请参阅使用 PowerShell 更新或添加注册表项值