Set-VBREPPermission
Short Description
Applies user access permissions to backup repositories used by Veeam Agent operating in a standalone mode.
Syntax
Set-VBREPPermission -Repository <CBackupRepository> [-Type <VBREPPermissionType> {Everyone | NoOne | OnlySelectedUsers}] [-User <string[]>] [-EnableEncryption] [-EncryptionKey <VBREncryptionKey>] [-PassThru] [<CommonParameters>] |
Detailed Description
This cmdlet applies user access permissions to a selected repository that is used as a target by Veeam Agent operating in a standalone mode.
By default, the backup repositories are configured to have no permissions for writing backups created by a Veeam Agent. To start using a Veeam backup repository as target for backups created by a Veeam Agent, you need to change the access permissions to Everyone or OnlySelectedUsers.
Parameters
Parameter | Description | Required | Position | Accept | Accept |
---|---|---|---|---|---|
Repository | Specifies the repository for which you want to set permissions. Accepts the backup repository object or string (repository name) type. NOTE: You cannot use cloud repositories for backups created by a Veeam Agent. | True | Named | True (ByValue, | False |
Type | Specifies the permission type:
Default: the permissions type that is currently set for the selected repository. | False | Named | False | False |
User | Used to set users for OnlySelectedUsers option. Specifies names of users allowed to use the repository for backups created by a Veeam Agent. You can specify user names or names of Active Directory groups. | False | Named | False | False |
EnableEncryption | Indicates that the repository must encrypt the backups created by a Veeam Agent. Use the EncryptionKey parameter to specify the encryption key. | False | Named | False | False |
EncryptionKey | Used to specify the encryption key for the EnableEncryption parameter. Accepts the VBREncryptionKey type. | False | Named | False | False |
PassThru | Indicates that the command returns the output object to the Windows PowerShell console. | False | Named | False | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
Return Type
Example 1
This command grants permission to access the WinLocal repository to Administrator.
- Run Get-VBRBackupRepository to get the repository. Save it to the $repository variable.
- Run Set-VBREPPermission with the $repository variable.
$repository = Get-VBRBackupRepository -Name "WinLocal" Set-VBREPPermission -Repository $repository -Type OnlySelectedUsers -User "VEEAM\Administrator" RepositoryId : 88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec |
Example 2
This command enables encryption for WinLocal repository.
- Run Get-VBREncryptionKey to get the encryption key. Save it to the $encryptionkey variable.
- Run Get-VBRBackupRepository to get the repository. Save it to the $repository variable
- Run Set-VBREPPermission with the $encryptionkey and $repository variables.
$encryptionkey = Get-VBREncryptionKey -Description "Veeam Administrator" $repository = Get-VBRBackupRepository -Name "WinLocal" Set-VBREPPermission -Repository $repository -EnableEncryption -EncryptionKey $encryptionkey RepositoryId : 88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec |
Example 3
This example shows how to grant user access permissions to everyone and enable encryption for the WinLocal repository.
- Run Get-VBREncryptionKey to get the encryption key. Save it to the $encryptionkey variable.
- Run Get-VBRBackupRepository to get the repository. Save it to the $repository variable
- Run Set-VBREPPermission with the $encryptionkey and $repository variables.
$encryptionkey = Get-VBREncryptionKey -Description "Veeam Administrator" $repository = Get-VBRBackupRepository -Name "WinLocal" Set-VBREPPermission -Repository $repository -Type Everyone -EnableEncryption -EncryptionKey $encryptionkey RepositoryId : 88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec |
Related Commands