PowerShell script exchange
Post Reply
DanielJ
Service Provider
Posts: 243
Liked: 44 times
Joined: Jun 10, 2019 12:19 pm
Full Name: Daniel Johansson
Contact:

Connect-VBRServer: Execution environment cannot be initialized to Remote

Post by DanielJ »

Simple question: where and how can I see why Connect-VBRServer fails with the message in the subject? I'm using the same account on both servers (no difference if I pass along the credentials or not) and there is no firewall between the servers.
laurentG
Veeam Software
Posts: 26
Liked: 5 times
Joined: Jan 09, 2020 2:17 pm
Full Name: Laurent Godet
Contact:

Re: Connect-VBRServer: Execution environment cannot be initialized to Remote

Post by laurentG »

Hi Daniel,
I had the same situation yesterday.
What made my day was simply running ISE "as an administrator"
I don't know where you can see why it failed, but this helped me so I hope it will help you too.
Laurent
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Connect-VBRServer: Execution environment cannot be initialized to Remote

Post by oleg.feoktistov »

Hi Daniel,

Logs for the errors regarding Powershell are located here - C:\Users\<userName>\AppData\Local\Veeam\Backup\VeeamPowershell.log
I do remember a relevant case, but it is hard to say for sure without reviewing logs. Please open support ticket for the issue in the subject and share its id here for further follow-up.

Thanks,
Oleg
DanielJ
Service Provider
Posts: 243
Liked: 44 times
Joined: Jun 10, 2019 12:19 pm
Full Name: Daniel Johansson
Contact:

Re: Connect-VBRServer: Execution environment cannot be initialized to Remote

Post by DanielJ »

Thanks, it was simply this:

> Backup server has an earlier version (10.0.1.4854) than this console (11.0.0.837). Please logon to the server locally and update it to the latest version using the local console, then try again.

It would of course be helpful if VBR presented this error message instead of the other, generic one. They are both in the same log.
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Connect-VBRServer: Execution environment cannot be initialized to Remote

Post by oleg.feoktistov » 1 person likes this post

Hi Daniel,

I tested this scenario with different environments and here are my findings:
  • Console v10.0.0.4461 P1 + Server v11.0.0.837 P20210525 - the actual message that the server is of a later version than the console is shown in the cmdlet output.
  • Console v11.0.0.837 P20210525 + Server v10.0.0.4461 - Execution environment cannot be initialized to remote, like in your case.
  • Console v10.0.0.4461 P1 + Server v9.5.42866 - Failed to connect to Veeam Backup & Replication server: The logon attempt failed
If I would dare to guess - in case console libraries have later version than the server's, the remoting exception is thrown before the versions check happens. Anyways, it looks inconsistent and needs to be investigated, so I brought that up internally. Will follow-up on this thread once we tested it further.

Thanks,
Oleg
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Connect-VBRServer: Execution environment cannot be initialized to Remote

Post by oleg.feoktistov » 1 person likes this post

Confirmed my suspicion with QA, we created a bug on that one. Thanks for noticing it!
Matt@Work
Enthusiast
Posts: 51
Liked: 14 times
Joined: May 29, 2013 7:41 am
Full Name: Matt Collier
Location: South Coast
Contact:

Re: Connect-VBRServer: Execution environment cannot be initialized to Remote

Post by Matt@Work »

Any update on this, just had the same issue setting up a script today for auto scanning VTL tape additions.
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Connect-VBRServer: Execution environment cannot be initialized to Remote

Post by oleg.feoktistov »

Yes, as I wrote above we submitted a bug. The fix is scheduled for v12. Thanks!
Matt@Work
Enthusiast
Posts: 51
Liked: 14 times
Joined: May 29, 2013 7:41 am
Full Name: Matt Collier
Location: South Coast
Contact:

Re: Connect-VBRServer: Execution environment cannot be initialized to Remote

Post by Matt@Work »

OK thanks, but why v12 instead of the next 11 patch?
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Connect-VBRServer: Execution environment cannot be initialized to Remote

Post by oleg.feoktistov »

It is quite a minor bug, so we decided to postpone it and concentrate on more major ones. Also, this bug is only for "Execution environment cannot be initialized to Remote" message not being informative in case distinct versions of console and server are used. If you encounter this message in some other scenarios, that could be a whole other issue worth mentioning here and investigating separately. Thanks!
Matt@Work
Enthusiast
Posts: 51
Liked: 14 times
Joined: May 29, 2013 7:41 am
Full Name: Matt Collier
Location: South Coast
Contact:

Re: Connect-VBRServer: Execution environment cannot be initialized to Remote

Post by Matt@Work »

I think I will log this with support as we aren't using distinct versions. Everything is the same.
marco.luvisi
Service Provider
Posts: 5
Liked: 2 times
Joined: May 23, 2022 12:19 pm
Full Name: Marco Luvisi
Contact:

Re: Connect-VBRServer: Execution environment cannot be initialized to Remote

Post by marco.luvisi »

Hi all,
I had the same problem and solved it by running the PowerShell console from the Veeam Console.
Veeam Leader User Group Italy
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 4 guests