copying registry key

Home Forums Scripting PowerShell copying registry key

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    gogi100
    Member
    #166922

    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

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.