

Since you are looking for removal in one single shot with subkeys and everything, then you can use -Force for the same: Remove-Item -Path HKLM:\SOFTWARE\Sonicwall -recurse -Force However, if you do not wish to get the prompt and delete first all the items within but the HKLM:\SOFTWARE\Sonicwall, then what you can do is : Remove-Item -Path HKLM:\SOFTWARE\Sonicwall\* -Recurse So you need to choose according to the options that would prompt. This item has children and since you have not given -recurse. Remove-Item -Path HKLM:\SOFTWARE\Sonicwall You can remove contained items by using Remove-Item, but you will be prompted to confirm the removal if the item contains anything else. The next thing you can do after confirming is pipe it further to Remove-item. Would help you to atleast list down all the items that you want to delete.

Get-ChildItem can perform complex filtering capabilities Get-ChildItem -Path "HKLM:\SOFTWARE\Sonicwall -Recurse Yes, you can remove the subkeys recursively using it.
