How to delete registry Key using PowerShell?

PowerShellMicrosoft TechnologiesSoftware & Coding

To delete the registry key using PowerShell, we can use the Remove-Item command. Remove-Item command removes the registry key from the path specified. For example, we have the registry key name NodeSoftware stored at the path HKLM, under the Software key.

To delete the key we will use the below command.

Remove-Item -Path HKLM:\SOFTWARE\NodeSoftware -Force -Verbose

We can also use the Get-Item command to retrieve the Key name and then use the Remove-Item after pipeline.

Get-Item HKLM:\SOFTWARE\NodeSoftware | Remove-Item -Force -Verbose
raja
Published on 08-Feb-2021 07:29:46
Advertisements