Hello,
I want to restore the data disk E: from the production VM xxx-SQL to a test VM xxx-SQL-TEST every day.
I found how to do it from the Veeam console but I would like to automate the task with a script. https://helpcenter.veeam.com/docs/backu ... ml?ver=110
I found some commands but I don't know how to select the E: disk and restore it to the xxx-SQL-TEST VM
You mean you want to find a way to correlate disk label with vSphere disk info that gets references when using Get-VBRViVirtualDevice? If that's the case, I don't think we query that data on VBR side from vSphere. What you could do is use PowerCLI to get disk labels:
Hello,
I try to do the Powershell commands from the SQL VM but I get an error message:
"Get-VM You are not currently connected to any servers. Please connect first using a connect cmdlet"
I need to be connected to the Vcenter to run the commands and the script should contain the user and password for it to run automatically.
I could make an encrypted file to store the user and password but I don't know how to do it.
Thanks for your help but I don't have enough knowledge to do this job.
Please consult VMware PowerCLI official guide for that. You'll especially need Managing vSphere with VMware PowerCLI part.
For encryption part try CredentialManager module. It saves your creds in Windows Credential Manager in a type acceptable by PowerCLI cmdlets.