Enterprise Vault™ PowerShell Cmdlet

Last Published:
Product(s): Enterprise Vault (12.3)
  1. Enterprise Vault PowerShell Cmdlet 简介
    1.  
      关于 Enterprise Vault Management Shell
    2.  
      获取 Enterprise Vault PowerShell cmdlet 的帮助
    3.  
      PowerShell 字符串规则
    4. 从何处获取有关 Enterprise Vault 的详细信息
      1.  
        Enterprise Vault 培训模块
  2. 归档:Exchange
    1.  
      Add-EVPstComputer
    2.  
      Add-EVPstFile
    3.  
      Get-EVExchangeMailboxPolicy
    4.  
      New-EVExchangeMailboxPolicy
    5.  
      Remove-EVExchangeFolderPolicy
    6.  
      Remove-EVExchangeMailboxPolicy
    7.  
      Set-EVExchangeMailboxPolicy
  3. 归档:FSA
    1.  
      Get-EVFSAFileServer
    2.  
      Get-EVFSAFolder
    3.  
      Get-EVFSAVolume
    4.  
      New-EVFSAFileServer
    5.  
      New-EVFSAFolder
    6.  
      New-EVFSAVolume
    7.  
      Remove-EVFSAFileServer
    8.  
      Remove-EVFSAFolder
    9.  
      Remove-EVFSAVolume
    10.  
      Set-EVFSAFileServer
    11.  
      Set-EVFSAFolder
    12.  
      Set-EVFSAVolume
  4. 归档:Skype for Business
    1.  
      Get-EVSkypeForBusinessTarget
    2.  
      New-EVSkypeForBusinessTarget
    3.  
      Remove-EVSkypeForBusinessTarget
    4.  
      Set-EVSkypeForBusinessTarget
  5. 归档:SMTP
    1.  
      Get-EVSMTPHoldingFolder
    2.  
      Get-EVSMTPMessageTrackingLogLocation
    3.  
      Get-EVSMTPPolicy
    4.  
      Get-EVSMTPServerSettings
    5.  
      Get-EVSMTPTarget
    6.  
      New-EVSMTPPolicy
    7.  
      New-EVSMTPServerSettings
    8.  
      New-EVSMTPTarget
    9.  
      Remove-EVSMTPPolicy
    10.  
      Remove-EVSMTPTarget
    11.  
      Set-EVSMTPMessageTrackingLogLocation
    12.  
      Set-EVSMTPPolicy
    13.  
      Set-EVSMTPServerSettings
    14.  
      Set-EVSMTPTarget
    15.  
      Sync-EVSMTPServerSettings
  6. 备份
    1.  
      Clear-IndexLocationBackupMode
    2.  
      Clear-VaultStoreBackupMode
    3.  
      Get-IndexLocationBackupMode
    4.  
      Get-VaultStoreBackupMode
    5.  
      Set-IndexLocationBackupMode
    6.  
      Set-VaultStoreBackupMode
  7. 分类
    1.  
      Disable-EVClassification
    2.  
      Get-EVClassificationFCITags
    3.  
      Get-EVClassificationPolicy
    4.  
      Get-EVClassificationStatus
    5.  
      Get-EVClassificationTestMode
    6.  
      Get-EVClassificationVICTags
    7.  
      Import-EVClassificationFCIRules
    8.  
      Initialize-EVClassificationVIC
    9.  
      New-EVClassificationPolicy
    10.  
      Publish-EVClassificationFCIRules
    11.  
      Remove-EVClassificationPolicy
    12.  
      Set-EVClassificationPolicy
    13.  
      Set-EVClassificationTestMode
  8. 数据库
    1.  
      Get-EVDatabase
    2.  
      Get-EVDatabaseDetail
    3.  
      Get-EVDatabaseFileInfo
    4.  
      Get-EVStorageDatabase
    5.  
      Set-EVDatabaseDetail
    6.  
      Start-EVDatabaseUpgrade
  9. IMAP 访问
    1.  
      Get-EVIMAPUsers
    2.  
      Get-EVIMAPUserSettings
    3.  
      Set-EVIMAPServerDisabled
    4.  
      Set-EVIMAPServerEnabled
  10. 索引
    1.  
      Get-EVIndexLocation
    2.  
      Get-EVMDSStatus
    3.  
      Get-IndexServerForIndexLocation
    4.  
      New-EVMDSBuildTask
    5.  
      Set-IndexMetadataSyncLevel
  11. 记录管理
    1.  
      Export-EVNARAArchive
    2.  
      Get-EVRecordSettings
  12. 保留计划
    1.  
      Get-EVRetentionPlan
    2.  
      New-EVRetentionPlan
    3.  
      Remove-EVRetentionPlan
    4.  
      Set-EVRetentionPlan
  13. 基于角色的管理
    1.  
      Add-EVRBARoleMember
    2.  
      Get-EVRBAAzStoreXml
    3.  
      Get-EVRBARole
    4.  
      Get-EVRBARoleMember
    5.  
      Remove-EVRBARoleMember
    6.  
      Set-EVRBAAzStoreXml
  14. 站点和服务器
    1.  
      Get-EVComputers
    2.  
      Get-EVFileLocation
    3.  
      Get-EVIISWebsite
    4.  
      Get-EVServer
    5.  
      Get-EVSite
    6.  
      Get-EVSiteInfo
  15. 任务和服务
    1.  
      Get-EVDependencyService
    2.  
      Get-EVDependencyServiceState
    3.  
      Get-EVService
    4.  
      Get-EVServiceState
    5.  
      Get-EVTask
    6.  
      Get-EVTaskState
  16. 保管库存储和归档
    1.  
      Export-EVArchive
    2.  
      Get-EVArchive
    3.  
      Get-EVVaultStore
    4.  
      Get-EVVaultStorePartition
    5.  
      Remove-EVArchive
    6.  
      Set-EVArchive
    7.  
      Start-PartitionRollover

Set-EVSMTPTarget

Set-EVSMTPTarget 设置或更新现有 SMTP 目标的指定属性。如果您未使用 -SiteID 参数指定站点 ID,且 Set-EVSMTPTarget 无法确定站点,则将提示您输入站点 ID。

Set-EVSMTPTarget 设置目录中以及站点各 Enterprise Vault SMTP 服务器上的 SMTP 目标信息。

可使用 -ArchivingEnabled $True 为目标启用归档,或者使用 -ArchivingEnabled $False 禁用归档。

如果 Set-EVSMTPTarget 无法更新 Enterprise Vault SMTP 服务器上的 SMTP 设置,GetFailedEVServerList 函数可以列出未更新的服务器。有关示例,请参见 Get-EVSMTPTarget 的帮助。

Set-EVSMTPTarget 由管理单元 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>]

参数

表:Set-EVSMTPTarget 参数

参数

说明

-SiteId(必填)

要更新其中 SMTP 目标的站点 ID。

-Name(必填)

目标的 SMTP 地址。

-PolicyId

要与 SMTP 目标关联的现有 SMTP 策略 ID。

-PolicyName

要与 SMTP 目标关联的现有 SMTP 策略名称。

-RetentionCategoryId

要与 SMTP 目标关联的现有保留类别 ID。

-RetentionCategory

要与 SMTP 目标关联的现有保留类别名称。如果指定保留类别,则可使用任何归档类型。

-RetentionPlan

将与 Enterprise Vault 要在其中归档目标的邮件的归档相关联的现有保留计划的名称。您已在计划中定义的保留类别将分配到目标的邮件。

如果目标归档与一个或多个可能与其他归档关联的目标相关联,则该命令将更新所有受影响归档的保留计划。

如果该归档已包含一个保留计划,Set-EVSMTPTarget 将保留该计划,而不应用新的计划。

请注意下列事项:

  • 无法同时指定保留类别和保留计划。

  • 无法将保留计划分配给 Exchange 邮箱和 Internet 邮件归档。需要编辑归档的属性以更改保留设置。

-Force

应用在 -RetentionPlan 中指定的保留计划,但不提示进行确认。

-ArchiveId

-ArchiveName

使用 ArchiveIdArchiveName 指定 Enterprise Vault 将用于归档目标邮件的归档。

请注意以下内容:

  • 无法同时指定归档 ID 和归档名称。

  • 如果您已将归档列表与 SMTP 日记记录或 SMTP 组日记记录目标关联,则 Set-EVSMTPTarget 将使用指定的归档覆盖现有的归档列表。

  • 要将多个归档与 SMTP 日记记录或 SMTP 组日记记录目标关联,请使用 ArchiveIdsArchiveNames

-ArchiveIds

-ArchiveNames

使用 ArchiveIdsArchiveNames 将多个归档与 SMTP 日记记录或 SMTP 组日记记录目标关联。有关 SMTPTargetArchiveIDs 对象的详细信息,请键入 get-help about_SMTPTargetArchiveIDs

请注意以下内容:

  • 无法同时指定归档 ID 和归档名称。

  • 与某个目标关联的所有归档必须具有相同的保留设置。

  • Set-EVSMTPTarget 会覆盖现有的归档列表。您可以使用 Get-EVSMTPTarget 获取关联的归档列表,然后使用此信息通过 Set-EVSMTPTarget 更新目标。

  • 要将单个归档与 SMTP 日记记录或 SMTP 组日记记录目标关联,请使用 ArchiveIdArchiveName

  • 您不能使用这些参数更新 SMTP 邮箱日记记录目标。

-ArchiveType(如果要更新归档,则为必填)

Enterprise Vault 用于归档从目标发出的邮件的归档类型。可以指定的值取决于使用 New-EVSMTPTarget cmdlet 创建此目标时在 -TargetType 中指定的值。如果 -TargetType 是 SMTPJournaling 或 SMTPGroupJournaling,您可以指定一个或多个归档类型。有效归档类型包括:

  • DominoJournal

  • ExchangeJournal

  • 已共享

  • SMTP

如果 -TargetType 是 SMTPMailboxJournaling,您可以指定下列归档类型之一:

  • ExchangeMailbox

  • InternetMail

-ArchivingEnabled

设置为 $True 以归档目标邮件(传入和传出)。设置为 $False 以禁用目标归档。

示例
  • 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

    使用指定属性更新 SMTP 目标“JohnDoe@example.com”。

  • 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

    使用指定属性更新 SMTP 目标 SMTPjournal@example.com,并将指定的归档与 SMTP 目标相关联。

  • $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

    更新 SMTP 目标 sales@example.com 的以下配置详细信息:

    • 策略(使用 ID 值)

    • 保留类别(使用 ID 值)

    • 归档列表

    • 此目标邮件允许的归档类型

    • 对此目标的邮件启用归档

  • C:\PS> $target = Get-EVSMTPTarget -Name SMTPjournal2@example.com

    在名为 $target 的对象中返回 Get-EVSMTPTarget 的输出。

    C:\PS> $archNames = $target.TargetArchives.ArchiveNames

    在名为 $archNames 的对象中返回与此目标相关联的归档名称列表。

    C:\PS> $archNames.Remove("Archive1")

    从列表中删除“Archive1”。

    C:\PS> $archNames.Add("SharedArchive1")

    将“SharedArchive1”添加到列表。

    C:\PS> $archType = $target.TargetArchives.ArchiveType

    在名为 $archType 的对象中返回目标邮件允许的归档类型的信息。

    C:\PS> $archType = $archType.ToString() + ", Shared"

    添加归档类型“共享”。

    C:\PS> Set-EVSMTPTarget -Name SMTPjournal2@example.com -PolicyId 162D...EV1004.example.com -RetentionCategoryId 11B6...EV1004.example.com -ArchiveType $archType -ArchiveNames $archNames

    更新 SMTP 目标 SMTPjournal2@example.com 的以下配置详细信息:

    • 策略(使用 ID 值)

    • 保留类别(使用 ID 值)

    • 归档列表(使用 $archNames 对象)

    • 此目标的邮件允许的归档类型(使用 $archType 对象)

  • C:\PS> $target = Get-EVSMTPTarget -Name marketing@example.com

    在名为 $target 的对象中返回 Get-EVSMTPTarget 的输出。

    C:\PS> $archIds = $target.TargetArchives.ArchiveIDs

    在名为 $archIds 的对象中返回与此目标相关联的归档名称列表。

    C:\PS> $archIds.Remove("184D...110000MW-SQL-EV-2-A")

    从列表删除“184D...110000MW-SQL-EV-2-A”。

    C:\PS> $archIds.Add("162D....110000MW-SQL-EV-2-A")

    将“162D...110000MW-SQL-EV-2-A”添加到列表。

    C:\PS> $archType = $target.TargetArchives.ArchiveType

    在名为 $archType 的对象中返回目标邮件允许的归档类型的信息。

    C:\PS> $archType = $archType.ToString() + ", Shared"

    添加归档类型“共享”。

    C:\PS> Set-EVSMTPTarget -Name marketing@example.com -PolicyId 162D...EV1004.example.com -RetentionCategoryId 11B6...EV1004.example.com -ArchiveType $archType -ArchiveIDs $archIds

    更新 SMTP 目标 marketing@example.com 的以下配置详细信息:

    • 策略(使用 ID 值)

    • 保留类别(使用 ID 值)

    • 归档列表(使用 $archIds 对象)

    • 此目标的邮件允许的归档类型(使用 $archType 对象)

  • Set-EVSMTPTarget -SiteId 13E...example.com -Name JohnDoe@example.com -PolicyName 'SMTP policy' -RetentionPlan "Projects Retention Plan" -ArchiveId EA7...example.com -ArchiveType SMTP

    警告: 目标归档与一个或多个与其他归档关联的目标相关联。更改此归档的保留设置会更改所列归档的保留设置。

    Express Vault Store\A1

    Express Vault Store\A2

    Express Vault Store\A3

    确认 是否要继续? [Y] 是 [N] 否 [S] 挂起 [?] 帮助 (默认值为“Y”): Y

    更新 SMTP 目标“JohnDoe@example.com”的策略、保留计划和归档。如果此目标的归档与一个或多个与其他归档关联的目标相关联,则此命令将先显示归档列表,然后提示进行确认以继续。如果选择“是”,则该命令将向所列归档应用名为“Projects Retention Plan”的保留计划。选择“N”或“S”将退出命令而不应用任何更改。

  • Set-EVSMTPTarget -SiteId 13E...example.com -Name JohnDoe@example.com -RetentionPlan "RtnForManagers" –Force

    将保留计划“RtnForManagers”应用于“JohnDoe@example.com”。如果此目标的归档与一个或多个与其他归档关联的目标相关联,则此命令将更新那些归档的保留设置,但不提示进行确认。

输出

Set-EVSMTPTarget 返回 Symantec.EnterpriseVault.Admin.SMTPTarget 类型的对象,其中包含下表中列出的属性。

表:Symantec.EnterpriseVault.Admin.SMTPTarget 属性

名称

类型

说明

ArchivingEnabled

布尔值

如果发送到/自 SMTP 目标的邮件当前已归档,则为 $true,否则为 $false

Name

字符串

SMTP 目标地址。

PolicyId

字符串

与 SMTP 目标相关联的 SMTP 策略的 ID。

PolicyName

字符串

与 SMTP 目标相关联的 SMTP 策略。

RetentionCategory

字符串

Enterprise Vault 应用于新建归档项目的保留类别的名称。

如果 Enterprise Vault 将词语“(From Plan)”附加到保留类别名称,则已将保留计划应用于与 SMTP 目标关联的归档。Enterprise Vault 将在计划中定义的保留类别应用到项目。如果未向归档分配保留计划,则生效的保留类别是在 SMTP 目标属性中定义的保留类别。

RetentionCategoryId

字符串

由 Enterprise Vault 应用于新归档项目的保留类别的 ID。

与 RetentionCategory 一样,这取决于是否已将保留计划分配到 Enterprise Vault 在其中存储项目的归档。

SiteId

字符串

目标所属的站点的 ID。

TargetArchives

对象

Symantec.EnterpriseVault.Admin.​SmtpTargetArchiveInformation:提供与 SMTP 目标地址关联的归档的列表。有关 TargetArchives 的详细信息,请在 PowerShell 提示符中键入 get-help about_SmtpTargetArchiveInformation

TargetType

对象

与目标关联的 SMTP 日记记录配置的类型。

表:Symantec.EnterpriseVault.Admin.SmtpTargetArchiveInformation 属性

名称

类型

说明

ArchiveId

字符串

与 SMTP 目标相关联的归档的 ID。

ArchiveName

字符串

与 SMTP 目标相关联的归档的名称。

ArchiveType

对象

与 SMTP 目标相关联的归档的类型。

EVServerName

字符串

承载保管库存储的 Enterprise Vault 服务器。

Name

字符串

SMTP 目标地址。

VaultStoreName

字符串

包含用于 SMTP 目标的归档的保管库存储的名称。

相关的 cmdlet