Hello all!
I'm trying to clone some BE-Servers using BEMCLI.
Export the definition works fine:
export-master.cmd contains:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe C:\script\export-master.ps1
export-master.ps1 contains:
Get-BEBackupDefinition "wi-master-Backup" | Export-BEBackupDefinition > c:\script\master.ps1
convert-script.exe contains:
change some settings in master.ps1 using substitution
Now, i would like to import via import-cmd:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe c:\script\master.ps1 -AgentServer srv-clone1 | Save-BEBackupDefinition
But this doesn't work. "Can't find Save-BEBackupDefinition"
When i open BEMCLI in a cmd-windows i can use
c:\script\master.ps1 -AgentServer srv-clone1 | Save-BEBackupDefinition
And it works. How can i script this in one cmd-file?
Best regards
Peter