, . , , , - . , . , .
$KeyPath = 'HKCU:\Software\Policies\Google\Chrome\RestoreOnStartupURLs'
$ChromeKey = Get-Item $KeyPath
Microsoft.Win32.RegistryKey , . , , GetValueNames(), () , :
(default)
1
2
, Where, , Foo, . , , :
$ChromeKey.GetValueNames() | Where {$ChromeKey.GetValue($_) -match "foo"}
, 1. , , - Remove-ItemProperty...
$ChromeKey.GetValueNames() | Where {$ChromeKey.GetValue($_) -match "foo"} | ForEach{ Remove-ItemProperty -Path $KeyPath -Name $_ }
, , "foo" .