https://login.veeam.com/en/oauth?client_id=nXojRrypJ8&redirect_uri=https%3A%2F%2Fwww.veeam.com%2Fservices%2Fauthentication%2Fredirect_url&response_type=code&scope=profile&state=eyJmaW5hbFJlZGlyZWN0TG9jYXRpb24iOiJodHRwczovL3d3dy52ZWVhbS5jb20va2IyMDY3IiwiaGFzaCI6ImM4MTViZmJlLTUxYjItNDdmZC04M2Q1LWJkYmYwOGMwNzhhZiJ9
1-800-691-1991 | 9am - 8pm ET
EN

Remote execution of a PowerShell script fails when the VeeamBackup SQL database is on a remote SQL Server.

Challenge

When using a PowerShell script that is intended to remotely execute a command upon the Veeam server, it may fail if the SQL instance that Veeam Backup & Replication is configured to use is on a different server.
 
This KB article applies only if the following two statements are true.
  1. A PowerShell script is attempting to run on the Veeam server from a machine that is not the Veeam server.
  2. The SQL instance where the VeeamBackup database is located is on separate server from the Veeam server.
The following error may also occur for other reasons, this KB only applies if it related to above stated intent.

Error: Microsoft SQL server hosting the configuration database is currently unavailable. Possible reasons are heavy load, networking issue, server reboot, or hot backup. Please wait, and try again later. Error information: SQL server is not available

Cause

CredSSP is not being used to delegate credentials which is causing the query to time out.

Solution

The following cmdlets need to be run in an elevated PowerShell prompt: 
  1. On the server, where PS script is running please do the following:
         Enable-WSManCredSSP -role Client -DelegateComputer "FQDN of the Veeam server"
  2. On the Veeam server please run the following command in PowerShell: 
         Enable-WSManCredSSP -Role Server 
 After this is configured, all scripts run from the remote server must contain the following line:
      $ses = New-PSSession -ComputerName "FQDN of the Veeam server" -Credential $creds -Authentication CredSSP

More information

Here is an article that discusses how to configure delegated credentials with CredSS:  http://www.ravichaganti.com/blog/powershell-2-0-remoting-guide-part-12-%E2%80%93-using-credssp-for-multi-hop-authentication/
 
KB ID:
2067
Product:
Veeam Backup & Replication
Version:
6.x, 7.x, 8.x
Published:
2015-10-02
Last Modified:
2020-08-13
Please rate how helpful this article was to you:
5 out of 5 based on 1 ratings
Thank you for helping us improve!
An error occurred during voting. Please try again later.

Couldn't find what you were looking for?

Below you can submit an idea for a new knowledge base article.
Report a typo on this page:

Please select a spelling error or a typo on this page with your mouse and press CTRL + Enter to report this mistake to us. Thank you!

Spelling error in text

Knowledge base content request
By submitting, you agree that your personal data will be managed by Veeam in accordance with the Privacy Policy.
Your report was sent to the responsible team. Our representative will contact you by email you provided.
We're working on it please try again later