ndalmolin_13
asked on
Help using test-path to check for the existence of a registry key in Powershell
Hello All,
I'm trying to test for the existence of a registry key using the test-path command. Here is what I'm doing:
test-path -Path 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F66F74D4-ACF1-48EE-BF6F-2C6629581859}'
I know for a fact this exists, but the test-path is coming up as "False".
Any help would be appreciated.
Thanks,
Nick
I'm trying to test for the existence of a registry key using the test-path command. Here is what I'm doing:
test-path -Path 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F66F74D4-ACF1-48EE-BF6F-2C6629581859}'
I know for a fact this exists, but the test-path is coming up as "False".
Any help would be appreciated.
Thanks,
Nick
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
Or if you're already in the registry drive, so that the cmdlet knows to use the registry provider, your original command will work.
Open in new window