---
title: "New-VEMDBCollectionRestoreOptions"
description: "Defines the restore options that you can apply to a restore job. Product: Veeam Backup & Replication Product Edition: Enterprise Plus, Veeam Universal License This cmdlet provides the following parameter sets: This cmdlet creates restore options "
canonical: "https://helpcenter.veeam.com/docs/vbr/explorers_powershell/new-vemdbcollectionrestoreoptions.html"
breadcrumb: "Veeam Explorers PowerShell Reference > Veeam Explorers PowerShell Reference > Veeam Explorer for MongoDB > New-VEMDBCollectionRestoreOptions"
dateModified: "2026-08-18"
---
# New-VEMDBCollectionRestoreOptions
## Short Description
Defines the restore options that you can apply to a restore job.
**Product**: Veeam Backup & Replication
**Product Edition**: Enterprise Plus, Veeam Universal License
## Syntax
This cmdlet provides the following parameter sets:
-
NonPublishedParamSet
```
New-VEMDBCollectionRestoreOptions [-Collection] [-NewCollectionName ]
[-NewDatabaseName ] []
```
-
PublishedParamSet
```
New-VEMDBCollectionRestoreOptions [-NewCollectionName ] [-NewDatabaseName ]
[-PublishedCollection] []
```
## Detailed Description
This cmdlet creates restore options that you can use in a restore job of MongoDB collections. You can use it to specify the collection you want to restore, the new name for the restored collection, and the name of the database to which the collection will be restored.
## Parameters
|
Parameter
|
Description
|
Type
|
Required
|
Position
|
Accept Pipeline Input
|
|
Collection
|
Specifies a backed-up MongoDB collection to which the settings will apply. Accepts the VEMDBCollection object. To get this object, run the Get-VEMDBCollection cmdlet.
|
VEMDBCollection
|
True
|
1
|
True (ByValue)
|
|
NewCollectionName
|
Specifies the new name of the restored collection.
|
String
|
False
|
Named
|
False
|
|
NewDatabaseName
|
Specifies the name of the database to which the collection will be restored.
|
String
|
False
|
Named
|
False
|
|
PublishedCollection
|
Specifies a published MongoDB collection to which the settings will apply. Accepts the VEMDBPublishedCollection object. To get this object, run the Get-VEMDBPublishedCollection cmdlet.
|
VEMDBPublishedCollection
|
True
|
1
|
True (ByValue)
|
``
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 [`VEMDBCollectionRestoreOptions`](vemdbcollectionrestoreoptions.md) object that contains the restore options for the specified collection.
## Examples
::: example
### Example 1. Specifying Default Restore Options
This example specifies restore options for the *home office* collection. The collection will be restored with its original name, to the original database.
```
$session = Get-VEMDBRestoreSession
$collection = Get-VEMDBCollection $session[0] -Name "home office"
$restoreoptions = New-VEMDBCollectionRestoreOptions -Collection $collection
```
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-VEMDBCollection`](get-vemdbcollection.md) cmdlet. Set the `$session` variable as the `Session` parameter value and specify the necessary restore session. Specify the `Name` parameter value. Save the result to the `$collection` variable.
3. Run the `New-VEMDBCollectionRestoreOptions` cmdlet and set the `$collection` variable as the `Collection` parameter value. Save the result to the `$restoreoptions` variable to use it with other cmdlets.
:::
::: example
### Example 2. Specifying New Name for Restored Collection
This example specifies restore settings for the first collection in the *employees* database. The collection will be restored with a new name, to the original database.
```
$session = Get-VEMDBRestoreSession
$database = Get-VEMDBDatabase -Session $session[0] -Name "employees"
$collection = Get-VEMDBCollection -Database $database[0]
$restoreoptions = New-VEMDBCollectionRestoreOptions -Collection $collection -NewCollectionName "home office"
```
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-VEMDBDatabase`](get-vemdbdatabase.md) cmdlet. Set the `$session` variable as the `Session` parameter value and select the necessary session. Specify the `Name` parameter value. Save the result to the `$database` variable.
3. Run the [`Get-VEMDBCollection`](get-vemdbcollection.md) cmdlet. Set the `$database` variable as the `Database` parameter value and select the necessary database.
4. Run the `New-VEMDBCollectionRestoreOptions` cmdlet and set the `$collection` variable as the `Collection` parameter value. Specify the `NewCollectionName` parameter value. Save the result to the `$restoreoptions` variable to use it with other cmdlets.
:::
::: example
### Example 3. Specifying New Name for Target Database
This example specifies restore settings for the first collection in the *customers* database. The collection will be restored with the original name, to a new database.
```
$session = Get-VEMDBRestoreSession
$database = Get-VEMDBDatabase -Session $session[0] -Name "customers"
$collection = Get-VEMDBCollection -Database $database[0]
$restoreoptions = New-VEMDBCollectionRestoreOptions -Collection $collection -NewDatabaseName "sydney"
```
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 job. In this example, it is the first restore job in the array.
2. Run the [`Get-VEMDBDatabase`](get-vemdbdatabase.md) cmdlet. Set the `$session` variable as the `Session` parameter value and select the necessary restore session. Specify the `Name` parameter value. Save the result to the `$database` variable.
3. Run the [`Get-VEMDBCollection`](get-vemdbcollection.md) cmdlet. Set the `$database` variable as the `Database` parameter value and select the necessary database. Save the result to the `$collection` variable.
4. Run the `New-VEMDBCollectionRestoreOptions` cmdlet and set the `$collection` variable as the `Collection` parameter value. Specify the `NewDatabaseName` parameter value. Save the result to the `$restoreoptions` variable to use it with other cmdlets.
:::
::: example
### Example 4. Specifying Restore Options for Published Collection
This example specifies restore settings for the first collection on the published MongoDB instance. The published collection will be restored with a new name, to a new database.
```
$publishedcollections = Get-VEMDBPublishedCollection -Instance "mongodb01:27018"
$restoreoptions = New-VEMDBCollectionRestoreOptions -PublishedCollection $publishedcollections[0] -NewCollectionName "customers" -NewDatabaseName "detroit"
```
Perform the following steps:
1. Run the [`Get-VEMDBPublishedCollection`](get-vemdbpublishedcollection.md) cmdlet. Specify the `Instance` parameter value. Save the result to the `$publishedcollections` variable.
The cmdlet will return an array of collections on the published instance. Note the ordinal number of the necessary published collection. In this example, it is the first collection in the array.
2. Run the `New-VEMDBCollectionRestoreOptions` cmdlet. Set the `$publishedcollections` variable as the `PublishedCollection` parameter value and select the necessary collection. Specify the `NewCollectionName` parameter value. Specify the `NewDatabaseName` parameter value. Save the result to the `$restoreoptions` variable to use it with other cmdlets.
:::
## Related Commands
- [`Get-VEMDBRestoreSession`](get-vemdbrestoresession.md)
- [`Get-VEMDBDatabase`](get-vemdbdatabase.md)
- [`Get-VEMDBCollection`](get-vemdbcollection.md)
- [`Get-VEMDBPublishedCollection`](get-vemdbpublishedcollection.md)