I want to run this Test-Path registry path in PowerShell, but it contains an asterisk that is valid in the registry, but not in Windows paths.
The problem is that when I pass it, Test-Path treats the asterisk as a wild card, so it takes a very, very long time because it checks all the helper paths of Classes and doesn't look like what I want to test anyway.
Can this star be conveyed correctly? Some evacuation mechanism?
Write-Host "Begin" Test-Path "HKLM:\SOFTWARE\Classes\*\shell\Some shell extension" Write-Host "End"
source share