Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/321.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
powershell正在删除特定的注册表项_Powershell - Fatal编程技术网

powershell正在删除特定的注册表项

powershell正在删除特定的注册表项,powershell,Powershell,我是PowerShell新手,正在尝试从运行注册表项中删除特定值。我正在使用remove item命令,但是,我没有看到指定单个值的开关。我不想删除整个键,只删除一个值 作为参考,我尝试执行的批处理等效操作: reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v SunJavaUpdateSched /f 使用cmdletremove-itempropertyremove-itemproperty-Name'nam

我是PowerShell新手,正在尝试从运行注册表项中删除特定值。我正在使用
remove item
命令,但是,我没有看到指定单个值的开关。我不想删除整个键,只删除一个值

作为参考,我尝试执行的批处理等效操作:

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v SunJavaUpdateSched /f

使用cmdlet
remove-itemproperty
remove-itemproperty-Name'nameofkeyentry'-Path'pathtothekey'

例如,键“HKCU:\Accessibility\AudioDescription”有3个值



假设我们要删除第三个值“On”-我们将按如下操作


删除ItemProperty-Name'On'-Path'HKCU:\Accessibility\AudioDescription'


HKCU代表HKEY\U当前用户,每个根的缩写直观上是相同的(例如HKEY\U CLASSES\U根=HKCR:\等)

您试图删除的是注册表值,而不是注册表项:)
(Default) REG_SZ (value not set)
Locale    REG_SZ [blank]
On        REG_SZ 0