I am currently very annoyed by Dropbox and Nextcloud, which both battle the ShellIconOverlayIdentifier list. A problem which many people seem to have, when you search the internet.
Now I want to combine my annoyance with my intent to learn powershell (7.2.0).
I started with the following script, which shall retrieve all keys. And later I want to use regex via -match
to find the entries I want to delete. For now I work with both Remove-Item -WhatIf
and Get-ItemProperty
to test it.
Currently my problem is that I can create my list as intended. But when I feed the list into the remove command I get that the path cannot be found. What am I doing wrong?
Push-Location -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers
$list = Get-ChildItem -Path .
$filteredList = $list -match "DropboxExt10"
$filteredList
# Remove-Item -WhatIf -Recurse $filteredList
Get-ItemProperty $filteredList
Pop-Location
The error is Cannot find path 'Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\ DropboxExt10' because it does not exist.
Apparantly it adds the path as relative path to the current location. Why doesn't it interpret as an absolute path? When I ommit the push-location part it trys to add the registry path to my current working directory in which the script lives. But this is wrong as well.
Thanks for your help in advance.