PowerShell script exchange
- Posts: 1
- Liked: never
- Joined: Dec 28, 2022 2:00 pm
- Full Name: Robert Wykoff
The below script is what i am trying to use to setup a linux repository with a one time password. When the script is ran it creates a normal password, but fails to successfully backup anything to the repository and tells me the Linux server needs to be rescanned but is not able to complete the scan. Not sure if i am missing something or if it is not possible to create the immutable repository from PS. if i create it in the GUI it works fine.
Code: Select all
$repostoryName = Read-Host -Prompt 'Enter name of repository '
$Server = Read-Host -Prompt 'Enter Linux Server IP Address '
$Password = Read-host -Prompt 'Enter Username Password ' -AsSecureString
$Repostory = Read-host -Prompt 'Enter the backup repository name '
$ImmutabilityPeriod = Read-Host -Prompt 'Enter Immutability period days (Must be more then 7) '
$linsrv = Add-VBRLinux -Name $Server -SSHUser username -SSHPassword $plainPwd -SSHElevateToRoot
Add-VBRBackupRepository -Name "CAR Server" -Server $linsrv -EnableBackupImmutability -ImmutabilityPeriod $ImmutabilityPeriod -DecompressDataBlocks -UsePerVMFile -EnableXFSFastClone -Type LinuxLocal -Folder $Repostory
- Product Manager
- Posts: 7610
- Liked: 1978 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
Welcome to the forum.
It should work, but you need to use the parameter -SSHTempCredentials $True
for the command Add-VBRLinux
I missing it in your sample script.
https://helpcenter.veeam.com/docs/backu ... ml?ver=110
To add a Linux server that will be used as a hardened repository.
Defines that the cmdlet will use single-use credentials to access a Linux server.
Product Management Analyst @ Veeam Software
Users browsing this forum: No registered users and 7 guests