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
Set-EVSMTPTarget
Set-EVSMTPTarget sets or updates the specified properties of an existing SMTP target. If you do not specify a site ID using the -SiteID parameter, and Set-EVSMTPTarget cannot determine the site, you are prompted to enter the site ID.
Set-EVSMTPTarget sets the SMTP target information in the directory and on each Enterprise Vault SMTP server in the site.
Use -ArchivingEnabled $true to enable archiving for the target or -ArchivingEnabled $false to disable archiving.
If Set-EVSMTPTarget fails to update the SMTP settings on any of the Enterprise Vault SMTP servers, the GetFailedEVServerList function can list the servers that were not updated. See the help for Get-EVSMTPTarget for an example.
Set-EVSMTPTarget is provided by the snap-in Symantec.EnterpriseVault.PowerShell.AdminAPI.dll
.
Set-EVSMTPTarget [-SiteId] <String> [-Name] <String> [-PolicyId <String>] [-PolicyName <String>] [-RetentionCategoryId <String>] [-RetentionCategory <String>] [-RetentionPlan <String>] [-Force <Boolean>] [-ArchiveId <String>] [-ArchiveName <String>] [-ArchiveType <object>] [-ArchivingEnabled <Boolean>] [<CommonParameters>]
Set-EVSMTPTarget [-SiteId] <String> [-Name] <String> [-PolicyId <String>] [-PolicyName <String>] [-RetentionCategoryId <String>] [-RetentionCategory <String>] [-RetentionPlan <String>] [-Force <Boolean>] [-ArchiveIds <Symantec.EnterpriseVault.Admin.SMTPTargetArchiveIDs>] [-ArchiveNames <Symantec.EnterpriseVault.Admin.SMTPTargetArchiveNames>] [-ArchiveType <object>] [-ArchivingEnabled <Boolean>] [<CommonParameters>]
Table: Set-EVSMTPTarget parameters
Parameter | Description |
---|---|
-SiteId (required) | The ID of the site in which you want update the SMTP target. |
-Name (required) | The SMTP address of the target. |
-PolicyId | The ID of an existing SMTP policy to be associated with the SMTP target. |
-PolicyName | The name of an existing SMTP policy to be associated with the SMTP target. |
-RetentionCategoryId | The ID of an existing retention category to be associated with the SMTP target. |
-RetentionCategory | The name of an existing retention category to be associated with the SMTP target. If you specify a retention category, you can use any archive type. |
-RetentionPlan | The name of an existing retention plan to be associated with the archive in which Enterprise Vault will archive the target's messages. The retention category that you have defined in the plan is assigned to the target's messages. Note the following:
|
-Force | Applies the retention plan specified in -RetentionPlan without prompting for confirmation. |
-ArchiveId -ArchiveName | Use either ArchiveId or ArchiveName to specify the archive in which Enterprise Vault will archive the target's messages. Note the following:
|
-ArchiveIds -ArchiveNames | Use either ArchiveIds or ArchiveNames to associate multiple archives with an SMTP Journaling or SMTP Group Journaling target. For details of SMTPTargetArchiveIDs object, type get-help about_SMTPTargetArchiveIDs. Note the following:
|
-ArchiveType (required if you want to update the archives) | The type of archive in which Enterprise Vault will archive the messages from the target. The value you can specify here depends on the value that you specified in -TargetType when you created this target using the New-EVSMTPTarget cmdlet. If -TargetType is SMTPJournaling or SMTPGroupJournaling, you can specify one or more archive types. The valid archive types are:
If -TargetType is SMTPMailboxJournaling, you can specify one of the following archive types:
|
-ArchivingEnabled | Set to $true to archive the target's messages (incoming and outgoing). Set to $false to disable archiving for the target. |
Set-EVSMTPTarget 13E9...EV1004.example.com -Name JohnDoe@example.com -PolicyId 162D...EV1004.example.com -RetentionCategoryId 11B6...EV1004.example.com -ArchiveName SMTPLocalPublic -ArchiveType InternetMail -ArchivingEnabled $true
Updates the SMTP target, "JohnDoe@example.com", with the specified properties.
C:\PS> $archNames = new-object Symantec.EnterpriseVault.Admin.SMTPTargetArchiveNames
C:\PS> $archNames.Add("Archive1")
C:\PS> $archNames.Add("Archive2")
Set-EVSMTPTarget -SiteId 13E9...EV1101.example.com -Name SMTPjournal@example.com -PolicyName 'SMTP policy' -RetentionCategory 'Standard retention' -ArchiveNames $archNames -ArchiveType ExchangeJournal -ArchivingEnabled $true
Updates the SMTP target "SMTPjournal@example.com" with the specified properties and associates the specified archives with the SMTP target.
$archIds = new-object Symantec.EnterpriseVault.Admin.SMTPTargetArchiveIDs
C:\PS> $archIds.Add("12DB...110000MW-EV-1-A")
C:\PS> $archIds.Add("15E1...210000MW-EV-1-A")
C:\PS> $archIds.Add("132C...410000MW-EV-1-A")
Set-EVSMTPTarget 13E9...EV1004.example.com -Name sales@example.com -PolicyId 162D...EV1004.example.com -RetentionCategoryId 11B6...EV1004.example.com -ArchiveIDs $archIds -ArchiveType "Shared" -ArchivingEnabled $true
Updates the following configuration details for the SMTP target, sales@example.com:
Policy (using ID value)
Retention category (using ID value)
List of archives
Type of archive permitted for this target's messages
Enables archiving of the target's messages
C:\PS> $target = Get-EVSMTPTarget -Name SMTPjournal2@example.com
Returns the output of Get-EVSMTPTarget into an object named $target.
C:\PS> $archNames = $target.TargetArchives.ArchiveNames
Returns the list of archive names that are associated with this target in the object named $archNames.
C:\PS> $archNames.Remove("Archive1")
Removes "Archive1" from the list.
C:\PS> $archNames.Add("SharedArchive1")
Adds "SharedArchive1" to the list.
C:\PS> $archType = $target.TargetArchives.ArchiveType
Returns information about the type of archive permitted for this target's messages in the object named $archType.
C:\PS> $archType = $archType.ToString() + ", Shared"
Adds the archive type "Shared".
C:\PS> Set-EVSMTPTarget -Name SMTPjournal2@example.com -PolicyId 162D...EV1004.example.com -RetentionCategoryId 11B6...EV1004.example.com -ArchiveType $archType -ArchiveNames $archNames
Updates the following configuration details for the SMTP target, SMTPjournal2@example.com:
Policy (using ID value)
Retention category (using ID value)
List of archives (using the $archNamesobject)
Type of archive permitted for this target's messages (using the $archType object)
C:\PS> $target = Get-EVSMTPTarget -Name marketing@example.com
Returns the output of Get-EVSMTPTarget into an object named $target.
C:\PS> $archIds = $target.TargetArchives.ArchiveIDs
Returns the list of archive names that are associated with this target in the object named $archIds.
C:\PS> $archIds.Remove("184D...110000MW-SQL-EV-2-A")
Removes "184D...110000MW-SQL-EV-2-A" from the list.
C:\PS> $archIds.Add("162D....110000MW-SQL-EV-2-A")
Adds "162D....110000MW-SQL-EV-2-A" to the list.
C:\PS> $archType = $target.TargetArchives.ArchiveType
Returns information about the type of archive permitted for this target's messages in the object named $archType.
C:\PS> $archType = $archType.ToString() + ", Shared"
Adds the archive type "Shared".
C:\PS> Set-EVSMTPTarget -Name marketing@example.com -PolicyId 162D...EV1004.example.com -RetentionCategoryId 11B6...EV1004.example.com -ArchiveType $archType -ArchiveIDs $archIds
Updates the following configuration details for the SMTP target, marketing@example.com:
Policy (using ID value)
Retention category (using ID value)
List of archives (using the $archIdsobject)
Type of archive permitted for this target's messages (using the $archType object)
Set-EVSMTPTarget -SiteId 13E...example.com -Name JohnDoe@example.com -PolicyName 'SMTP policy' -RetentionPlan "Projects Retention Plan" -ArchiveId EA7...example.com -ArchiveType SMTP
WARNING: The target's archive is associated with one or more targets that are associated with other archives. Changing the retention settings of this archive will change the retention settings of the listed archives.
Express Vault Store\A1
Express Vault Store\A2
Express Vault Store\A3
Confirm Do you want to continue? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
Updates the policy, retention plan, and archive of the SMTP target, "JohnDoe@example.com". If this target's archive is associated with one or more targets that are associated with other archives, this command first displays the list of archives and prompts for confirmation to proceed. If you choose 'Yes', the command applies the retention plan called "Projects Retention Plan" to the listed archives. Choose 'N' or 'S' to exit the command without applying any changes.
Set-EVSMTPTarget -SiteId 13E...example.com -Name JohnDoe@example.com -RetentionPlan "RtnForManagers" - Force
Applies the retention plan "RtnForManagers" to "JohnDoe@example.com". If this target's archive is associated with one or more targets that are associated with other archives, this command updates the retention settings of those archives without prompting for confirmation.
Set-EVSMTPTarget returns an object of the type Symantec.EnterpriseVault.Admin.SMTPTarget, which contains the properties listed in the following table.
Table: Symantec.EnterpriseVault.Admin.SMTPTarget properties
Name | Type | Description |
---|---|---|
ArchivingEnabled | Boolean | $true if messages sent to or from the SMTP target are currently being archived, or $false if they are not. |
Name | String | The SMTP target address. |
PolicyId | String | The ID of the SMTP policy associated with the SMTP target. |
PolicyName | String | The SMTP policy associated with the SMTP target. |
RetentionCategory | String | The name of the retention category that Enterprise Vault applies to newly-archived items. If Enterprise Vault appends the words "(From Plan)" to the retention category name, a retention plan has been applied to the archive that is associated with the SMTP target. Enterprise Vault applies the retention category that is defined in the plan to the items. If you have not assigned a retention plan to the archive, the effective retention category is the one that is defined in the SMTP target properties. |
RetentionCategoryId | String | The ID of the retention category that Enterprise Vault applies to newly-archived items. As with RetentionCategory, this is dependent on whether you have assigned a retention plan to the archive in which Enterprise Vault stores the items. |
SiteId | String | The ID of the site to which the target belongs. |
TargetArchives | Object | Symantec.EnterpriseVault.Admin.SmtpTargetArchiveInformation: Provides a list of archives that are associated with the SMTP target address. For more information on TargetArchives details, type get-help about_SmtpTargetArchiveInformation at the PowerShell prompt. |
TargetType | Object | The type of the SMTP journaling configuration associated with the target. |
Table: Symantec.EnterpriseVault.Admin.SmtpTargetArchiveInformation properties
Name | Type | Description |
---|---|---|
ArchiveId | String | The ID of the archive associated with the SMTP target. |
ArchiveName | String | The name of the archive associated with the SMTP target. |
ArchiveType | Object | The type of the archive associated with the SMTP target. |
EVServerName | String | The Enterprise Vault server that hosts the vault store. |
Name | String | The SMTP target address. |
VaultStoreName | String | The name of the vault store that contains the archive that is used for the SMTP target. |
See Get-EVSMTPTarget.
See New-EVSMTPTarget.
See Remove-EVSMTPTarget.