Help Center
Choose product document...
Veeam Backup & Replication 9.5
PowerShell Reference

Set-VBREPPermission

Short Description

Applies user access permissions to backup repositories for Endpoint jobs.

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 Endpoint jobs.

By default, the backup repositories are configured to have no permissions for writing Endpoint backups. To start using a Veeam backup repository as target for Endpoint backups, you need to change the access permissions to Everyone or OnlySelectedUsers.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Repository

Specifies the repository for which you want to set permissions.

Accepts backup repository object or string (repository name) type.

NOTE: You cannot use cloud repositories for Endpoint backups.

True

Named

True (by Value
FromPipeline,
ValueFromPipeline
ByPropertyName)

False

Type

Specifies the permission type:

  • Everyone: everyone has permissions.
  • NoOne: no one has permissions.
  • OnlySelectedUsers: the selected users have permissions. Use the User parameter to specify the users.

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 Endpoint backups.

You can specify usernames or names of Active Directory groups.

False

Named

False

False

Enable
Encryption

Indicates that the repository must encrypt the Endpoint backups written to it.

Use the EncryptionKey parameter to specify the encryption key.

False

Named

False

False

Encryption
Key

Used to specify the encryption key for the EnableEncryption parameter.

Accepts 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 about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Return Type

VBREPPermission

Example 1

This command grants permission to access the WinLocal repository to Administrator.

  1. Run Get-VBRBackupRepository to get the repository. Save it to the $repository variable.
  2. Run Set-VBREPPermission with the $repository variable.

PS C:\PS> $repository = Get-VBRBackupRepository -Name "WinLocal"

PS C:\PS> Set-VBREPPermission -Repository $repository -Type OnlySelectedUsers -User "VEEAM\Administrator"

RepositoryId        : 88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec
PermissionType      : OnlySelectedUsers
Users               : {VEEAM\Administrator1, VEEAM\Administrator2}
IsEncryptionEnabled : False
EncryptionKey       :

Example 2

This command enables encryption for WinLocal repository.

  1. Run Get-VBREncryptionKey to get the encryption key. Save it to the $encryptionkey variable.
  2. Run Get-VBRBackupRepository to get the repository. Save it to the $repository variable
  3. Run Set-VBREPPermission with the $encryptionkey and $repository variables.

PS C:\PS> $encryptionkey = Get-VBREncryptionKey -Description "Veeam Administrator"

PS C:\PS> $repository = Get-VBRBackupRepository -Name "WinLocal"

PS C:\PS> Set-VBREPPermission -Repository $repository -EnableEncryption -EncryptionKey $encryptionkey

RepositoryId        : 88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec
PermissionType      : OnlySelectedUsers
Users               : {VEEAM\Administrator}
IsEncryptionEnabled : True
EncryptionKey       : ac87709d-b1a9-4c2e-8d55-557f8e49f639

Example 3

This example shows how to grant user access permissions to everyone and enable encryption for the WinLocal repository.

  1. Run Get-VBREncryptionKey to get the encryption key. Save it to the $encryptionkey variable.
  2. Run Get-VBRBackupRepository to get the repository. Save it to the $repository variable
  3. Run Set-VBREPPermission with the $encryptionkey and $repository variables.

PS C:\PS> $encryptionkey = Get-VBREncryptionKey -Description "Veeam Administrator"

PS C:\PS> $repository = Get-VBRBackupRepository -Name "WinLocal"

PS C:\PS> Set-VBREPPermission -Repository $repository -Type Everyone -EnableEncryption -EncryptionKey $encryptionkey

RepositoryId        : 88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec
PermissionType      : Everyone
Users               : {VEEAM\Administrator}
IsEncryptionEnabled : True
EncryptionKey       : ac87709d-b1a9-4c2e-8d55-557f8e49f639

Related Commands

Get-VBRBackupRepository

Get-VBREncryptionKey

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation