--- title: "New-VBRMongoDBDeployment" description: "This cmdlet discovers replica sets using a single MongoDB daemon within the deployed MongoDB application. Keep in mind the following requirements: You must input a host name, TCP port and valid credentials for the MongoDB application admin database." canonical: "https://helpcenter.veeam.com/docs/vbr/powershell/new-vbrmongodbdeployment.html" breadcrumb: "Veeam PowerShell Reference > Veeam PowerShell Reference > Veeam Plug-Ins for Enterprise Applications, MongoDB Backup and Epic EHR System Protection > Working with Managed Veeam Plug-Ins, MongoDB Backup and Epic EHR System Protection > Application Backup Policy Settings for MongoDB > New-VBRMongoDBDeployment" dateModified: "2026-09-02" --- # New-VBRMongoDBDeployment ## Short Description Connects to and adds MongoDB replica sets to protection groups. **Product Edition**: Standard, Enterprise, Enterprise Plus, Veeam Universal License ## Syntax This cmdlet provides the following parameter sets: ## Detailed Description This cmdlet discovers replica sets using a single MongoDB daemon within the deployed MongoDB application. Keep in mind the following requirements: - You must input a host name, TCP port and valid credentials for the MongoDB application admin database. - The MongoDB application user must have the `backup` role. ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

CACertificatePath

Specifies the folder path to the CA certificate. Use this parameter to verify MongoDB server certificates.

String

False

Named

True (ByPropertyName)

ClientCertificatePassword

Specifies the password for a client certificate.

String

False

Named

True (ByPropertyName)

ClientCertificatePath

Specifies the folder path to a client certificate. Use this parameter for mTLS and x509 authentication methods.

This parameter is required when using the ClientCertificateSetName parameter set.

This parameter is not required when using the SecureCredentials parameter set.

String

False

Named

True (ByPropertyName)

Credentials

Specifies the credentials you want to use for authenticating with the MongoDB replica set.

Accepts the CCredentials object. To create this object, run the Get-VBRCredentials cmdlet.

CInternalCredentials

True

Named

True (ByPropertyName)

HostName

Specifies the DNS name or an IP address of the computer that you want to use within the MongoDB application protection group.

Note: Keep in mind that the MongoDB application host list becomes a template for the MongoHosts list for the UI. You can manually select which hosts should be included in the pool group. After that, you can use Linux root access credentials to automatically deploy Veeam Agent for Linux on the selected hosts.

String

True

Named

True (ByPropertyName)

Port

Specifies the port number over which Veeam Backup & Replication communicates with the MongoDB replica set. By default, Veeam Backup & Replication uses port 27017.

Int32

True

Named

True (ByPropertyName)

UseTls

Specifies the use of the TLS certificate to secure the TLS connection between the Veeam infrastructure and MongoDB deployment.

SwitchParameter

False

Named

True (ByPropertyName)

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see [ Microsoft Docs](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7). ## Output Object [`VBRMongoDBDeployment`](vbrmongodbdeployment.md) ## Examples ::: example ### Replica Set Connection and Data Loading This example shows how to connect to a replica set and load the data from it. ``` $mongoCredentials1 = Get-VBRCredentials -Name "admin" $replicaSet1 = New-VBRMongoDBDeployment -HostName host01 -Credentials $mongoCredentials1 -Port 27017 ``` Perform the following steps: 1. Run the [`Get-VBRCredentials`](get-vbrcredentials.md) cmdlet. Specify the `Name` parameter with the user account you want to connect with. Save the result to the `$mongoCredentials1` variable. 2. Run the `New-VBRMongoDBDeployment` cmdlet. - Specify the `HostName` parameter with the DNS name or IP address of the computer within the replica set. - Specify the `Credentials` parameter with the `$mongoCredentials1` variable. - Specify the `Port` parameter with the port number `27017`. :::