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

New-VBRCSVContainer

Short Description

Creates a scope of computers listed in a CSV file.

Applies to

Product Edition: Standard, Enterprise, Enterprise Plus

Requires Veeam Agent for Microsoft Windows/Veeam Agent for Linux license

Syntax

New-VBRCSVContainer -Path <string> -MasterCredentials <CCredentials> [-NetworkCredentials <CCredentials>] [-UseCustomCredentials] [-CustomCredentials <VBRCSVCustomCredentials[]>]  [<CommonParameters>]

Detailed Description

This cmdlet creates the VBRCSVContainer object. This object contains a scope of computers listed in a CSV file. Use this object to create a protection group with the Add-VBRProtectionGroup cmdlet.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Path

Specifies the path to the CSV file. The cmdlet will import computer DNS names or IP addresses from this file.

True

Named

True (ByValue
ByProperty
Name)

False

MasterCredentials

Specifies Master account credentials for authenticating with all computers listed in a CSV file.

For authenticating with computers that require different credentials, Veeam Backup & Replication uses custom credentials. If you want to use custom credentials for some computers, set the UseCustomCredentials parameter.

True

Named

True (ByProperty
Name)

False

Network
Credentials

Specifies the credentials you want to use for authenticating with the shared folder. The cmdlet will use these credentials if a CSV file is located on a file share.

False

Named

True (ByProperty
Name)

False

UseCustom
Credentials

Indicates that you want to use custom credentials for authenticating with some computers listed in a CSV file.

To specify custom credentials, use the CustomCredentials parameter.

False

Named

True (ByProperty
Name)

False

CustomCredentials

Specifies custom credentials for authenticating with associated computers.

Accepts VBRCSVCustomCredentials[] type.

False

Named

True (ByProperty
Name)

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

VBRCSVContainer

Example 1

This example shows how to create a scope of computers from a CSV file located on your computer.

You will need to perform the followings steps:

  1. Specify custom credentials for computers from a CSV file:
  • Run Get-Credential to create a credential object you want to use for authenticating with computers. Type the credentials and save the result to the $ccreds variable.
  • Run New-VBRCSVCustomCredentials with the $ccreds variable. Use the ForEach statement to apply the same credentials to multiple computers. Save the result to the $custom variable.
  1. Create a scope of computers from a CSV file located on your computer. To do this, run New-VBRCSVContainer with the $custom variable. Use the Path parameter to specify the path to the CSV file. Use the MasterCredentials parameter to specify Master account credentials.

PS C:\PS> $ccreds = Get-Credential

PS C:\PS> $custom = @("172.19.51.55", "sup-v8931") | ForEach { New-VBRCSVCustomCredentials -HostName $_ -Credentials $ccreds}

PS C:\PS> $netcreds = Get-Credential

PS C:\PS> New-VBRCSVContainer -Path "C:\Computers.csv" -MasterCredentials support\jsmith -UseCustomCredentials -CustomCredentials $custom

Example 2

This example shows how to create a scope of computers from a CSV file located on a file share.

You will need to perform the followings steps:

  1. Specify custom credentials for computers from a CSV file:
  • Run Get-Credential to create a credential object you want to use for authenticating with computers. Type the credentials and save the result to the $ccreds variable.
  • Run New-VBRCSVCustomCredentials with the $ccreds variable. Use the ForEach statement to apply the same credentials to multiple computers. Save the result to the $custom variable.
  1. Create a scope of computers from a CSV file located on a file share.
  • Run Get-Credential to create a credential object you want to use for authenticating with the shared folder. Type the credentials and save the result to the $netcreds variable.
  • Run New-VBRCSVContainer with the $custom and $netcreds variables. Use the Path parameter to specify the path to the CSV file. Use the MasterCredentials parameter to specify Master account credentials.

PS C:\PS> $ccreds = Get-Credential

PS C:\PS> $custom = @("172.19.51.55", "sup-v8931") | ForEach { New-VBRCSVCustomCredentials -HostName $_ -Credentials $ccreds}

PS C:\PS> $netcreds = Get-Credential

PS C:\PS> New-VBRCSVContainer -Path "//support.local/east/Computers.csv" -MasterCredentials support\jsmith -NetworkCredentials $netcreds -UseCustomCredentials -CustomCredentials $custom

Example 3

This example shows how to create a protection group with a scope of computers from a CSV file.

You will need to perform the following steps:

  1. Create a scope of computers from a CSV file located on a file share:
  • Run Get-Credential to create a credential object you want to use for authenticating with computers. Type the credentials and save the result to the $ccreds variable.
  • Run New-VBRCSVCustomCredentials with the $ccreds variable. Use the ForEach statement to apply the same credentials to multiple computers. Save the result to the $custom variable.
  • Run Get-Credential to create a credential object you want to use for authenticating with the shared folder. Type the credentials and save the result to the $netcreds variable.
  • Run New-VBRCSVContainer with the $custom and $netcreds variables. Save the result to the $csvscope variable.
  1. Create a protection group. To do this, run Add-VBRProtectionGroup with the $csvscope variable.

PS C:\PS> $ccreds = Get-Credential

PS C:\PS> $custom = @("172.19.51.55", "sup-v8931") | ForEach { New-VBRCSVCustomCredentials -HostName $_ -Credentials $ccreds}

PS C:\PS> $netcreds = Get-Credential

PS C:\PS> $csvscope = New-VBRCSVContainer -Path "//support.local/east/Computers.csv" -MasterCredentials support\jsmith -NetworkCredentials $netcreds -UseCustomCredentials -CustomCredentials $custom

PS C:\PS> Add-VBRProtectionGroup -Name "CSV" -Container $csvscope

Related Commands

New-VBRCSVCustomCredentials

Add-VBRProtectionGroup

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management 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