New-VBRComputerDestinationOptions

In this article

    Short Description

    Creates the target location settings for backup policies.

    Applies to

    Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License

    Syntax

    This cmdlet provides the following parameter sets:

    • To store backups in the following locations:
    • On a removable storage device attached to the protected computer
    • On a local drive of the protected computer

    New-VBRComputerDestinationOptions -LocalPath <string> -OSPlatform <VBRAgentType> {Windows | Linux | Mac} [<CommonParameters>]

    • To store backups in a network shared folder

    New-VBRComputerDestinationOptions -OSPlatform <VBRAgentType> {Windows | Linux | Mac} -NetworkFolderPath <string> [-TargetShareType <VBRDestinationTargetShareType> {Smb | Nfs}] [-UseNetworkCredentials] [-NetworkCredentials <CCredentials>]  [<CommonParameters>]

    • To store backups on the following types of backup repositories:
    • Backup repository managed by the Veeam backup server.
    • Veeam Cloud Connect repository.

    New-VBRComputerDestinationOptions -OSPlatform <VBRAgentType> {Windows | Linux | Mac} -BackupRepository <CBackupRepository> [-BackupServerName <string>]  [<CommonParameters>]

    Detailed Description

    This cmdlet creates the VBRComputerDestinationOptions object that contains the target location settings for the backup policy. Veeam Backup & Replication applies this policy to the protected computers.

    Run Get-VBRBackupRepository to get the repository.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    OSPlatform

    Specifies the OS of the protected computers:

    • Windows: for Windows computers.
    • Linux: for Linux computers.
    • Mac: for macOS computers
      Note: Indexing for macOS computers is not supported in current version of Veeam PowerShell.

    True

    Named

    False

     

    LocalPath

    Use this parameter if you want to keep backups on the following target locations:

    • On a removable storage device attached to a protected computer.
    • On a local drive of a protected computer.

    True

    Named

    False

     

    NetworkFolderPath

    Use this option if you want to keep backups in a network shared folder.

    True

    Named

    False

     

    BackupRepository

    Use this option if you want to save a backup on either of the following types of a backup repository:

    • Backup repository managed by the Veeam backup server.
    • Veeam Cloud Connect repository.
      Note: Cloud repositories added from vCD tenant are not supported.

    Accepts the BackupRepository type.

    True

    Named

    True (ByValue)

     

    TargetShareType

    Specifies the protocol that you will use to keep backups on shared folders.

    • SMB
    • NFS

    NOTE: The NFS protocol type does not work for Windows computers.

    Default: SMB

    False

    Named

    False

     

    UseNetworkCredentials

    Indicates that the network shared folder requires authentication.

    False

    Named

    False

     

    NetworkCredentials

    Specifies the credentials which Veeam Agent will use to authenticate to the network shared folder.

    False

    Named

    False

     

    BackupServerName

    Specifies the DNS name or an external IP address of the Veeam backup server that manages the target backup repository.

    NOTE: You can use only the Veeam backup server where the Veeam Agent backup job is configured.

    False

    Named

    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

    Example 1

    This command creates target location settings for the backup policy that Veeam Agent job applies to the protected computers. The job will save the backups to a local drive of the protected computer. Use the LocalPath parameter to specify the local drive path settings.

    New-VBRComputerDestinationOptions -LocalPath "D:\Backup" -OSPlatform Windows

    Example 2

    This example shows how to create target location settings for the backup policy that Veeam Agent job applies to the protected computers. The job will save the backups to the network shared folder.

    1. Run Get-Credential to specify the network credentials. Save the result to the $creds variable.
    2. Run New-VBRComputerDestinationOptions with the $creds variable. Use the NetworkFolderPath to specify the network path settings.

    $creds = Get-Credential

    New-VBRComputerDestinationOptions -NetworkFolderPath "172.17.53.14:/Veeam" -OSPlatform Linux -TargetShareType NFS
    -UseNetworkCredentials -NetworkCredentials $creds

    Example 3

    This example shows how to create target location settings for the backup policy that Veeam Agent job applies to the protected computers. The job will save the backups to the backup repository managed by the Veeam backup server.

    1. Run Get-VBRBackupRepository to specify the repository. Save the result to the $repository variable.
    2. Run New-VBRComputerDestinationOptions with the $repository variable.

    $repository = Get-VBRBackupRepository -Name "Default Backup Repository"

    New-VBRComputerDestinationOptions -OSPlatform Windows -BackupRepository $repository -BackupServerName "Repository 01"

    Related Commands

    Get-VBRBackupRepository