Arbelac
Arbelac

Reputation: 1904

Removing regedit key via powershell

I have been removing powershell and/or command line like below. My question is : Is there any equivalent inside powershell for /reg:64 parameter ?

CMD version:

reg delete HKEY_LOCAL_MACHINE\SOFTWARE\TEST /v PropertyToRemove /f /reg:64

powershell version:

Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\SMS\Mobile Client" -Name "PropertyToRemove"

thanks,

Upvotes: 1

Views: 3305

Answers (1)

Wyatt_LandWalker
Wyatt_LandWalker

Reputation: 309

It looks like it's not implemented.

Reading this question: Querying via powershell both 32bit and 64bit registry

it seems you should just be checking whether the os is x32 or x64 first or run a check if the 64bit registry keys exists

Different topic, same question.. here's stated it's not implemented: How to access the 64-bit registry from a 32-bit Powershell instance? look at whenrybruce's reply on the marked answer

Upvotes: 1

Related Questions