Me again with yet another question.
I’m trying to create a new registry item in the HKCR:*\shell\ environment.
Sadly though, I can’t get Powershell to accept the wildcard character as a normal character.
I’ve tried using the backtick and other escape characters, but it just doesn’t seem to work.
What doesn’t work:
New-Item -Path 'HKCR:\*\shell\takeownership\' -Name test –Force
What does work:
Set-Location -LiteralPath 'HKCR:\*\shell' New-Item -Name 'takeownership'
I really would like to get the first one working, because it’s part of a function I created for creating registry keys.
If anyone has a solution to this problem, please let me know.
Thanks in advance & regards,