copying registry key

Home Forums Scripting PowerShell copying registry key

This topic contains 3 replies, has 3 voices, and was last updated by Avatar gogi100 2 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Avatar

    i have powrshell script that find key that contains POP3 server, but i don’t know how found the key copying on same location and rename them

    my script is

    $destination= ‘hkcu:SoftwareMicrosoftWindows NTCurrentVersionWindows Messaging SubsystemProfilesTEST9375CFF0413111d3B88A00104B2A66766000000g’

    gci ‘hkcu:SoftwareMicrosoftWindows NTCurrentVersionWindows Messaging SubsystemProfilesTEST9375CFF0413111d3B88A00104B2A6676’ -recurse -ErrorAction SilentlyContinue |
    % { if((get-itemproperty -Path $_.PsPath) -match “POP3 Server”) { $_.Name; reg.exe copy $_.Name $destination /s /f} }

    I receive error message

    ERROR: Invalid key name


    Have you checked that precise registry key exists?


    i have in outlook 2010 one account. i want to create in outlook 2010 one more account that is same like previous account with different pop3/smtp settings because i have backup mail server. i thinked that this work do over registry


    That key won’t exist for all users as it is a user key, hkcu is HKEY_CURRENT_USER so the actual key will be different for each user on each PC.

    Wouldn’t it be easier to do this as part of the office installation?? run setup.exe /admin and generate a custom installation file which will contain your accounts.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Register for this Petri Webinar!

Want to Make Your Backup Storage Unlimited & Ready for the Cloud? – Free Thurrott Premium Account with Webinar Registration!

Tuesday, August 27, 2019 @ 1:00 pm EDT

A Scale-Out Backup storage infrastructure is a must-have technology for your backups. In this webinar, join expert Rick Vanover for a look on what real-world problems are solved by the Scale-Out Backup Repository.

Register Now

Sponsored By