--- title: "Start-VEMDBPublishJob" description: "Publishes a backed-up MongoDB instance. Product: Veeam Backup & Replication Product Edition: Enterprise Plus, Veeam Universal License This cmdlet publishes a backed-up MongoDB instance." canonical: "https://helpcenter.veeam.com/docs/vbr/explorers_powershell/start-vemdbpublishjob.html" breadcrumb: "Veeam Explorers PowerShell Reference > Veeam Explorers PowerShell Reference > Veeam Explorer for MongoDB > Start-VEMDBPublishJob" dateModified: "2026-08-18" --- # Start-VEMDBPublishJob ## Short Description Publishes a backed-up MongoDB instance. **Product**: Veeam Backup & Replication **Product Edition**: Enterprise Plus, Veeam Universal License ## Syntax ``` Start-VEMDBPublishJob [-Session] [-PublishInstancePort ] [-Server ] [-SshPort ] -Credential [-ToPointInTimeUTC ] [-RestoreInstancePort ] [-InstanceCredentials ] [-UseTLS] [-UseSystemCertificateAuthority] [-CertificateAuthorityPemFilePath ] [-UseX509Authentication] [-ClientCertificateAndKeyPemFilePath ] [-ClientKeyPassword ] [-Force] [] ``` ## Detailed Description This cmdlet publishes a backed-up MongoDB instance. ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

CertificateAuthorityPemFilePath

Specifies the path to the custom Certificate Authority (CA) PEM file used to verify the certificate issued to the MongoDB deployment. You can use this parameter with the UseTLS and UseX509Authentication parameters.

Note: If you use this parameter, do not specify the UseSystemCertificateAuthority parameter.

String

False

Named

False

ClientCertificateAndKeyPemFilePath

Specifies the path to the PEM file containing the client certificate and the related private key. You can use this parameter with the UseTLS and UseX509Authentication parameters.

String

False

Named

False

ClientKeyPassword

Defines the password used to decrypt the private key specified in the ClientCertificateAndKeyPemFilePath parameter.

SecureString

False

Named

False

Credential

Specifies credentials for authenticating to the primary node of the MongoDB deployment or the target MongoDB server.

Note: The user must have root privileges on the target server.

Accepts the VEMDBLinuxCredentials object. To get this object, run the New-VEMDBLinuxCredentials cmdlet.

VEMDBLinuxCredentials

True

Named

False

Force

Defines that the cmdlet will show no prompt before executing the command.

SwitchParameter

False

Named

False

InstanceCredentials

Specifies the credentials for the target MongoDB instance.

Consider the following:

  • The user must have the root MongoDB role on the target replica set.
  • Do not specify this parameter if you use the UseX509Authentication parameter.

Accepts the PSCredential object. To get this object, run the [`Get-Credential`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.6) cmdlet.

PSCredential

False

Named

False

PublishInstancePort

Specifies a port for the published MongoDB instance.

Int32

False

Named

False

RestoreInstancePort

Specifies the port of the instance to which the contents of the published MongoDB instance will be restored.

Default: 27017

Int32

False

Named

False

Server

Specifies DNS name or IP address of the primary node of the target MongoDB deployment or the target MongoDB server.

String

False

Named

False

Session

Specifies a restore session initiated to perform operations with MongoDB data.

Accepts the VEMDBRestoreSession object. To get this object, run the Get-VEMDBRestoreSession cmdlet.

VEMDBRestoreSession

True

0

True (ByValue)

SshPort

Specifies the SSH port number that the cmdlet will use to connect to the Linux machine.

Default: 22

Int32

False

Named

False

ToPointInTimeUTC

Specifies a point in time in the UTC format within the restore interval of the MongoDB instance.

The cmdlet will publish the instance to the state of the specified point in time. If you do not use this parameter, the cmdlet will restore the instance to the point in time when the restore point for which you started the restore session was created.

DateTime

False

Named

False

UseSystemCertificateAuthority

Defines that the cmdlet will use the Certificate Authority (CA) store of the mount server associated with the backup repository to verify the certificate issued to the MongoDB deployment. You can use this parameter with the UseTLS and UseX509Authentication parameters.

Note: If you use this parameter, do not specify the CertificateAuthorityPemFilePath parameter.

SwitchParameter

False

Named

False

UseTLS

Defines that the cmdlet will connect to the target MongoDB deployment using a secure TLS protocol.

Note: This parameter is obligatory if you use the UseX509Authentication parameter and optional if you use the InstanceCredentials parameter.

SwitchParameter

False

Named

False

UseX509Authentication

Defines that the cmdlet will use X.509 authentication to connect to the target MongoDB deployment.

Note: If you use this parameter, do not specify the InstanceCredentials parameter.

SwitchParameter

False

Named

False

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the [About Common Parameters](http://go.microsoft.com/fwlink/p/?LinkID=113216) section of Microsoft Docs. ## Output Object The cmdlet returns the [`VEMDBInstancePublish`](vemdbinstancepublish.md)`[]` array that contains information about the publishing process for the MongoDB instance. ## Examples ::: example ### Example 1. Publishing MongoDB Instance This example shows how to publish a backed-up MongoDB instance to a machine with MongoDB. This is a temporary operation for testing or development purposes, which allows you to check the data contained in the MongoDB instance. This example uses the TLS protocol to connect to the target MongoDB deployment. ``` $session = Get-VEMDBRestoreSession $instancecreds = Get-Credential $securepassword = Read-Host -Prompt "Enter password" -AsSecureString $linuxcreds = New-VEMDBLinuxCredentials -Account "root" -Password $securepassword $publish = Start-VEMDBPublishJob -Session $session -InstanceCredentials $instancecreds -Credential $linuxcreds -PublishInstancePort 27018 -Server "mongodb01" -UseTLS -UseSystemCertificateAuthority ``` Perform the following steps: 1. Run the [`Get-VEMDBRestoreSession`](get-vemdbrestoresession.md) cmdlet. Save the result to the `$session` variable. The cmdlet will return an array of active restore sessions. Note the ordinal number of the necessary restore session. In this example, it is the first restore session in the array. 2. Run the [`Get-Credential`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.6) cmdlet to specify the credentials to authenticate to the MongoDB replica set. Save the result to the `$instancecreds` variable. 3. Run the [`Read-Host`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/read-host?view=powershell-7.6) cmdlet. Specify the `Prompt` parameter value. Provide the `AsSecureString` parameter. Save the result to the `$securepassword` variable. 4. Run the [`New-VEMDBLinuxCredentials`](new-vemdblinuxcredentials.md) cmdlet. Specify the `Account` parameter value. Set the `$securepassword` variable as the `Password` parameter value. Save the result to the `$linuxcreds` variable. 5. Run the `Start-VEMDBPublishJob` cmdlet. Specify the following settings: - Set the `$session` variable as the `Session` parameter value. - Set the `$instancecreds` variable as the `InstanceCredentials` parameter value. - Set the `$linuxcreds` variable as the `Credential` parameter value. - Specify the `PublishInstancePort` parameter value. - Specify the `Server` parameter value. - Provide the `UseTLS` parameter. - Provide the `UseSystemCertificateAuthority` parameter. Save the result to the `$publish` variable to be able to use it with other cmdlets. ::: ::: example ### Example 2. Publishing MongoDB Instance to Restore Collections to Point-in-Time State This example shows how to publish a backed-up MongoDB instance to a specific point-in-time state, which allows you to restore the collections contained in the instance to that point-in-time state. This example uses X.509 authentication to connect to the target MongoDB deployment. ``` $session = Get-VEMDBRestoreSession $time = Get-Date -Date "2026-06-24 13:00:00" $timeutc = $time.ToUniversalTime() $securepassword = Read-Host -Prompt "Enter password" -AsSecureString $linuxcreds = New-VEMDBLinuxCredentials -Account "root" -Password $securepassword $keypassword = Read-Host -Prompt "Enter password" -AsSecureString $publish = Start-VEMDBPublishJob -Session $session -Credential $linuxcreds -PublishInstancePort 27018 -RestoreInstancePort 27017 -Server "mongodb01" -UseTLS -UseX509Authentication -CertificateAuthorityPemFilePath "C:\Users\Administrator\Documents\MongoDB\certs\CA.pem" -ClientCertificateAndKeyPemFilePath "C:\Users\Administrator\Documents\MongoDB\certs\client.pem" -ClientKeyPassword $keypassword ``` Perform the following steps: 1. Run the [`Get-VEMDBRestoreSession`](get-vemdbrestoresession.md) cmdlet. Save the result to the `$session` variable. The cmdlet will return an array of active restore sessions. Note the ordinal number of the necessary restore session. In this example, it is the first restore session in the array. 2. Run the [`Get-Date`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.6) cmdlet. Specify the `Date` parameter value to set the point in time to which the instance must be published. Save the result to the `$time` variable. 3. Convert the scheduled time to the UTC format using the `ToUniversalTime()` method. Save the result to the `$timeutc` variable. 4. Run the [`Read-Host`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/read-host?view=powershell-7.6) cmdlet. Specify the `Prompt` parameter value. Provide the `AsSecureString` parameter. Save the result to the `$securepassword` variable. 5. Run the [`New-VEMDBLinuxCredentials`](new-vemdblinuxcredentials.md) cmdlet. Specify the `Account` parameter value. Set the `$securepassword` variable as the `Password` parameter value. Save the result to the `$linuxcreds` variable. 6. Run the [`Read-Host`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/read-host?view=powershell-7.6) cmdlet. Specify the `Prompt` parameter value. Provide the `AsSecureString` parameter. Save the result to the `$keypassword` variable. 7. Run the `Start-VEMDBPublishJob` cmdlet. Specify the following settings: - Set the `$session` variable as the `Session` parameter value. - Set the `$linuxcreds` variable as the `Credential` parameter value. - Specify the `PublishInstancePort` parameter value. - Specify the `RestoreInstancePort` parameter value. - Specify the `Server` parameter value. - Provide the `UseTLS` parameter. - Provide the `UseX509Authentication` parameter. - Specify the `CertificateAuthorityPemFilePath` parameter value. - Specify the `ClientCertificateAndKeyPemFilePath` parameter value. - Set the `$keypassword` variable as the `ClientKeyPassword` parameter value. Save the result to the `$publish` variable to be able to use it with other cmdlets. ::: ## Related Commands - [`Get-VEMDBRestoreSession`](get-vemdbrestoresession.md) - [``Read-Host``](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/read-host?view=powershell-7.6) - [``Get-Credential``](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.6) - [`New-VEMDBLinuxCredentials`](new-vemdblinuxcredentials.md) - [``Get-Date``](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.6)