This is an archive version of the document. To get the most up-to-date information, see the current version.

Set-VBREPPermission

In this article

    Short Description

    Applies user access permissions to backup repositories used by Endpoint backup jobs.

    Syntax

    Set-VBREPPermission -Repository <CBackupRepository> [-Type <VBREPPermissionType> {Everyone | NoOne | OnlySelectedUsers}] [-User <string[]>] [-EnableEncryption] [-EncryptionKey <VBREncryptionKey>] [-PassThru] [<CommonParameters>]

    Related Commands

    Get-VBRBackupRepository

    Get-VBREncryptionKey

    Return Type

    VBREPPermission

    Detailed Description

    This cmdlet applies user access permissions to a selected repository for writing Endpoint backup jobs data.

    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. The OnlySelectedUsers option allows you to submit usernames or names of Active Directory groups.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    Repository

    Specifies the repository for which you want to set permissions.

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

    NOTE: You cannot use cloud repositories for Endpoint backups.

    True

    Named

    True (by Value
    FromPipeline,
    ValueFromPipeline
    ByPropertyName)

    False

    Type

    Specifies the type of the permission: Everyone, NoOne, OnlySelectedUsers.

    Set the selected users with the User parameter.

    If not set, Veeam Backup & Replication will use the permissions type that is currently set for the selected repository.

    False

    Named

    False

    False

    User

    Used to set users for OnlySelectedUsers option of the Type parameter.

    Specifies names of users allowed to use the repository for Endpoint backups, or AD user groups.

    Accepts string type.

    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 PSCryptoKey object.

    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.

    Example 1

    This command sets permission to access WinLocal repository to administrator.

    • The repository is obtained by Get-VBRBackupRepository and assigned to the '$repository' variable.
    • The type of permission is set to 'OnlySelectedUsers' and the User parameter is used to indicate the Veeam administrators as permitted users.
    • The encryption is not set.
    • The PassThru parameter is set to view the command output.

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

    PS C:\PS> Set-VBREPPermission -Repository $repository -Type OnlySelectedUsers -User "VEEAM\Administrator1", "VEEAM\Administrator2" -PassThru

    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.

    • The encryption key is obtained with Get-VBREncryptionKey and assigned to an '$encryptionkey' variable.
    • The repository is obtained by Get-VBRBackupRepository and piped down.
    • The EnableEncryption switch and the EncryptionKey parameter are used to enable encryption.
    • The PassThru parameter is set to view the command output.

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

    PS C:\PS> Get-VBRBackupRepository -Name 'WinLocal' | Set-VBREPPermission -EnableEncryption -EncryptionKey $encryptionkey -PassThru

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

    Example 3

    This command sets both user access permissions and encryption for WinLocal repository.

    • The encryption key is obtained with Get-VBREncryptionKey and assigned to an '$encryptionkey' variable.
    • The repository is obtained by Get-VBRBackupRepository and piped down.
    • The type of permission is set to 'Everyone'.
    • The EnableEncryption switch and the EncryptionKey parameter with the '$encryptionkey' variable are used to enable encryption.
    • The PassThru parameter is set to view the command output.

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

    PS C:\PS> Get-VBRBackupRepository -Name 'WinLocal' | Set-VBREPPermission -Type Everyone -EnableEncryption -EncryptionKey $encryptionkey -PassThru

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