我正在尝试添加注册表项,但出现以下错误:
New-ItemProperty:无法使用接口(interface)。此提供程序未实现 IDynamicPropertyCmdletProvider 接口(interface)
Disable IE first pop up
$registryPath = "HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main"
$Name = "DisableFirstRunCustomize"
$value = "00000001"
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $name -Value $value ` -PropertyType DWORD
最佳答案
您的 $registryPath
是不正确的。正确的语法是:
$registryPath = "HKCU:\Software\Policies\Microsoft\Internet Explorer\Main"
见 Update or Add Registry Key Value with PowerShell
关于registry - 此提供程序未实现 IDynamicPropertyCmdletProvider 接口(interface),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52370519/