$startprocessParams = @{
    FilePath     = "$Env:SystemRoot\REGEDIT.exe"
    ArgumentList = '/s', 'c:\temp\restore_windows_photoviewer.reg'
    Verb         = 'RunAs'
    PassThru     = $true
    Wait         = $true
}
$proc = Start-Process @startprocessParams

if ($proc.ExitCode -eq 0) {
    'Success!'
}
else {
    "Fail! Exit code: $($Proc.ExitCode)"
}

Ссылки