New-Item recursive registry keys
I was just missing the -force
parameter
New-Item hklm:software/classes/firefoxhtml/shell/edit/command -Force
Using -Force
will also remove everything under the key if it already exists so a better option would be
if(!(Test-Path $path)){ New-Item $path -Force;}