0

Is this posssible? For example i have a entry with the Name "DefaultProfile" and the Value "test". How can i export only this one entry not the full tree?

I was thinking about somethign like reg export HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\DefaultProfile

But this doesen't work.

I have managed to write a script to at least read the entry for further use. My code:

$query = reg query HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\ /f DefaultProfile /s
[array]$rest = $query | select -first 3
$rest -split " " | Select -last 1
7
  • Have you tried these suggestions? May 7, 2019 at 12:25
  • Why would it not work ? It definitely is possible to export one entry with one value.
    – Overmind
    May 7, 2019 at 12:59
  • Unfortunate this didin't work out for my need. (I mena the SetX thing) @Overmind then how? At least not with the above showed command
    – seyo -IV
    May 7, 2019 at 13:18
  • So, if you have the values you need in a variable and that's what you need why don't you pipe it to a file?
    – duenni
    May 7, 2019 at 14:39
  • When you say 'doesn't work', what error do you encounter or what exactly is happening ?
    – Overmind
    May 8, 2019 at 5:28

1 Answer 1

2

You can use Get-ItemProperty to get the name and value of a Registry Key.

Working with Registry Entries

Get-ItemProperty

Sample Code:

Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine | Select PowerShellVersion

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.