PowerShell script exchange
Post Reply
masonit
Service Provider
Posts: 327
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Requested registry access is not allowed

Post by masonit »

Hi

After uppgrading from Veeam 7 to 8 I get this error when running Veeam commands (requested registry access is not allowed). I am logged in on the vbr server with a domain account that is part of the local administrator group. Other powershell commands work fine but not Veeam commands. If I choose to start powershell as administrator or if I starts powershell from vbr console then it works fine. But that is not always possible... It worked in veeam 7 so something has changed. Powershell is version 4.

\Masonit
rccl_ecain
Influencer
Posts: 12
Liked: 14 times
Joined: Jan 06, 2015 10:46 pm
Full Name: Ethan Cain
Location: Miramr, FL
Contact:

Re: Requested registry access is not allowed

Post by rccl_ecain »

Any update on this? Having the issue on a new 2012 R2 VM. Works when launched from Veeam, but NOT when run as Admin or otherwise.
Retired 'Cloud Admiral'. Might actually be on a ship.
jcgam
Novice
Posts: 5
Liked: never
Joined: Mar 02, 2011 3:48 pm
Full Name: John
Contact:

Re: Requested registry access is not allowed

Post by jcgam »

I have the same problem too.
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Requested registry access is not allowed

Post by veremin »

Ethan, John,

May I ask you to describe the issue in more details? Are those scripts specified as pre-,post job commands, or as pre-freeze, post-thaw VM commands? What permissions does the Veeam service account have? You're saying that the only way to make the scripts work is to run them from VB&R?

Thanks.
Damien84
Lurker
Posts: 1
Liked: never
Joined: Sep 10, 2015 8:06 pm
Full Name: Damien H Dyell
Contact:

Re: Requested registry access is not allowed

Post by Damien84 »

cloud00hawk
Novice
Posts: 5
Liked: never
Joined: Mar 17, 2015 2:38 pm
Contact:

Re: Requested registry access is not allowed

Post by cloud00hawk »

Does this issue get resolved ? Running into the same issue. It works for adding a VM to a job and remove a VM from job. It fails for Get-VBRBackup command.
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Requested registry access is not allowed

Post by veremin »

Kindly, avoid posting the same question in the multiple discussions for the purpose of convenience.

In most case the root cause of the experienced issue is the given account lacking required permissions. What happens if you try to run the script manually, using Administrator account, or use the self-elevated approach mentioned above?

Thanks.
ccatlett1984
Enthusiast
Posts: 83
Liked: 9 times
Joined: Oct 31, 2013 5:11 pm
Full Name: Chris Catlett
Contact:

Re: Requested registry access is not allowed

Post by ccatlett1984 » 1 person likes this post

Edit the permissions on the following registry key:
HKLM\Software\Veeam
Grant "Full Control" to "Users" and you will have your scripts running without issue (without running as admin.)

I had the same issues with a script I run via scheduled task to get the # of free tapes in my autoloader.
For some unknown reason, the Veeam snap-in needs to write to some key in this location. (Even if you are only running "Get" or "Find" cmdlets)
cesarniemeyer
Lurker
Posts: 2
Liked: never
Joined: Jan 22, 2018 4:45 pm
Full Name: Cesar Augusto Niemeyer Rodrigues
Contact:

[MERGED] After the Update

Post by cesarniemeyer »

After the VeeamBackup & Replication_9.5.0.1536.Update3 update, my scripts stopped working, displaying the following error:
Connect-VBRServer: Access to the registry key 'HKEY_LOCAL_MACHINE \ SOFTWARE \ Veeam \ Veeam Backup Replication'is denied

What can I do to resolve this issue?

Thank you so much
cesarniemeyer
Lurker
Posts: 2
Liked: never
Joined: Jan 22, 2018 4:45 pm
Full Name: Cesar Augusto Niemeyer Rodrigues
Contact:

Re: Requested registry access is not allowed

Post by cesarniemeyer »

231/5000
I reinstalled the software
The problem persists, when I run the script through powershell the following error occurs:
Start-VBRZip: Access denied
at C: \ Backups \ microcpd.ps1: 36 char: 1
...
What can I do, I already gave permission in regedit
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Requested registry access is not allowed

Post by veremin »

Still looks like permission issue to me; what happens if you execute script you try to run under Administrator account or use the self-elevated approach above?

If nothing helps, kindly, reach our support team and ask for assistance.

Thanks.
very_best
Novice
Posts: 4
Liked: 1 time
Joined: Oct 07, 2013 9:54 am
Full Name: Hannes
Contact:

[MERGED] Access to registry key is denied

Post by very_best »

Hello!

I want to start a VeeamZIP with powershell.
But I get the Error:

Code: Select all

Get-VBRServer : Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Veeam\Veeam Backup and Replication' is denied.
At C:\bat\Start_VeeamZIP.ps1:125 char:17
+     $VCServer = Get-VBRServer -name $VCenter -ErrorAction SilentlyContinue -Erro ...
+                 ~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], UnauthorizedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException

If I start it with runas Administrator I have no problem.
Also when I start the Veeam-PS-Console I have no problem.

What can I do, that I can start my script without error?

rg
Hansi
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Requested registry access is not allowed

Post by veremin »

What happens if you try this:
v.eremin wrote:what happens if you execute script you try to run under Administrator account or use the self-elevated approach above?
very_best
Novice
Posts: 4
Liked: 1 time
Joined: Oct 07, 2013 9:54 am
Full Name: Hannes
Contact:

Re: Requested registry access is not allowed

Post by very_best »

Hello

OK i have tested a lot and found an error in uac-configuration!
Uac was shown as disabled, but their was a problem with shutting down the uac.
after a reboot i enabled and disabled it again and now i don*t have any problems.

rg
hansi
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Requested registry access is not allowed

Post by veremin »

Got it, thank you for coming back and sharing the resolution; appreciated.
william.scholes
Service Provider
Posts: 11
Liked: 6 times
Joined: Nov 24, 2020 2:30 am
Full Name: William Scholes
Contact:

Re: Requested registry access is not allowed

Post by william.scholes » 1 person likes this post

I had this issue with Veeam 11 after changing the account used to connect to the DB by running "C:\Program Files\Common Files\Veeam\Backup and Replication\DBConfig\Veeam.Backup.DBConfig.exe"
After that I was getting as error when opening the console "Unable to upgrade plug-ins under the current user. Please open the console under an account with local administrator privileges" but the account I was using was local admin... I rebooted and still issue remained... I checked event logs and found the error
"
Alternative log directory setting error :
System.UnauthorizedAccessException: Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Veeam\Veeam Backup and Replication' is denied.
at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
.... this goes on a bit ...
"

After finding this forum post I confirmed UAC was disabled, enabling UAC back to the default level via msconfig.exe resolved the issue, no reboot required.

Thanks @very_best !
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests