Enterprise Vault™ PowerShell Cmdlets
- Introducing the Enterprise Vault PowerShell cmdlets
- Archiving: Exchange
- Archiving: FSA
- Archiving: Skype for Business
- Archiving: SMTP
- Backup
- Classification
- Databases
- IMAP access
- Indexing
- Records management
- Retention plans
- Roles-based administration
- Sites and servers
- Tasks and services
- Vault stores and archives
Remove-EVArchive
Remove-EVArchive deletes the specified archive and the items that it contains.
Remove-EVArchive does not delete an archive in the following circumstances:
The archive is already marked for deletion.
The vault store that is associated with the archive is in backup mode.
The archive is protected from deletion.
The archive has a status other than Available or Closed.
The archive is being moved.
The archive is associated with one or more Exchange journal mailbox, Exchange public folder, SharePoint site collection, Domino journaling location, SMTP, Skype for Business archiving targets, or SMTP Group Journaling provisioning groups.
This cmdlet prompts you to confirm the removal of the archive.
Caution:
You cannot stop the deletion process or undo the deletion.
Remove-EVArchive supports the WhatIf switch, which lets you view the changes that would occur without having to apply any of those changes.
By default, Remove-EVArchive does not generate any output. You can use the PassThru switch to return an ArchiveInfo object that provides details of the deleted archive.
Remove-EVArchive is provided by the snap-in Symantec.EnterpriseVault.PowerShell.Snapin.dll
Remove-EVArchive [-ArchiveId] <String> [-PassThru [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Table: Remove-EVArchive parameters
Parameter | Description |
---|---|
-ArchiveID (required) | The ID of the archive to be deleted. You can obtain the ID with the Get-EVArchive cmdlet. |
-PassThru | Returns an ArchiveInfo object that provides the details of the archive that you want to delete. By default, this cmdlet does not generate any output. |
-Confirm | Prompts you for confirmation before running the cmdlet. To suppress the confirmation prompt, use the syntax -Confirm:$False. You must include a colon ( : ) in the syntax. |
-WhatIf | Shows what would happen if the cmdlet runs. The cmdlet is not actually run. The WhatIf switch also displays any errors or warnings that could occur when the command is executed. |
Remove-EVArchive -ArchiveId "123...example.com"
Deletes the archive with ID '123...example.com'.
Get-EVArchive -ArchiveName "ArchiveToBeDeleted" | Remove-EVArchive
Pipes the ArchiveInfo object that is obtained from Get-EVArchive to Remove-EVArchive and deletes the archive.
Remove-EVArchive -ArchiveId "123...example.com" -PassThru
Deletes the archive with ID '123...example.com'. It also returns an ArchiveInfo object that provides the details of the deleted archive.
Get-EVArchive -ArchiveName "ArchiveToBeDeleted" | Remove-EVArchive -WhatIf
Pipes the ArchiveInfo object that is obtained from Get-EVArchive to Remove-EVArchive. It then lets you view any errors or warnings that could occur on executing the command. If there are no errors or warnings to display, the command displays the following message:
'This operation will permanently delete archive 'ArchiveToBeDeleted' and all items stored in it. This action overrides the Retention Category option 'Prevent automatic deletion of expired items'. You cannot cancel the operation.'
Get-EVArchive -DeleteProtected:$false | Remove-EVArchive -Confirm:$false
This command uses Get-EVArchive to retrieve all the archives that are not protected from deletion and deletes them using Remove-EVArchive. This command also suppresses the confirmation prompt.
Remove-EVArchive returns no output, or a modified object of the type Symantec.EnterpriseVault.Admin.ArchiveInfo when the -PassThru parameter is specified. Symantec.EnterpriseVault.Admin.ArchiveInfo has the following properties.
Table: Symantec.EnterpriseVault.Admin.ArchiveInfo properties
Name | Type | Description |
---|---|---|
ArchiveId | String | The ID of the deleted archive. |
ArchiveName | String | The name of the deleted archive. |
ArchiveType | EV_STG_API_ARCHIVE_TYPE | The Enterprise Vault archive type enumeration. The possible values are as follows:
|
DeleteExpiredItems | EV_STG_API_EXPIRE_ITEMS | The Enterprise Vault expire items enumeration. The possible values are as follows:
|
DeleteProtected | Boolean | Indicates whether the user could manually delete items from the archive ($false) or not ($true). |
OnHold | Boolean | Indicates whether the archive contained items that are on legal hold ($true) or not ($false). |
Status | EV_STG_API_STATUS | The Enterprise Vault archive status enumeration. The possible values are as follows:
|
RetentionPlanName | String | The name of the retention plan that was applied to the archive. |
See Get-EVArchive.
See Set-EVArchive.